Repository navigation
Expand file tree
/
Copy pathsensor-connection.html
More file actions
42 lines (42 loc) · 1.49 KB
/
Copy pathsensor-connection.html
File metadata and controls
42 lines (42 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% case sensor.sensor_type %}
{% when 'nxt-analog-sensor' %}
{% assign connection = "Analog/NXT" %}
{% if sensor.name == 'lego-nxt-light' or sensor.name == 'nxt-analog' %}
{% assign autodetect = "Y" %}
{% elsif sensor.name == 'lego-nxt-touch' %}
{% assign autodetect = "Y[^lego-nxt-touch]" %}
{% elsif sensor.name == "di-dflex" %}
{% assign autodetect = "N[^di-dflex]" %}
{% else %}
{% assign autodetect = "N[^nxt-analog]" %}
{% endif %}
{% when 'ev3-analog-sensor' %}
{% assign connection = "Analog/EV3" %}
{% assign autodetect = "Y" %}
{% when 'nxt-i2c-sensor' %}
{% assign connection = "I2C/NXT" %}
{% if sensor.name == 'mi-xg1300l' %}
{% assign autodetect = "N[^mi-xg1300l]" %}
{% else %}
{% assign autodetect = "Y" %}
{% endif %}
{% when 'wedo-hub-sensor' %}
{% assign connection = "USB" %}
{% assign autodetect = "Y" %}
{% assign sensor.sensor_type = "wedo" %}
{% when 'wedo-sensor' %}
{% assign connection = "Analog/WeDo" %}
{% assign autodetect = "Y" %}
{% when 'gpio-pcf857xr' or 'pcf8591' or 'rtc-ds1307' %}
{% assign connection = "I2C/Other" %}
{% assign autodetect = "N[^standard-i2c]" %}
{% when 'lm75' %}
{% assign connection = "I2C/Other" %}
{% assign autodetect = "Y[^lm75]" %}
{% when 'ev3-uart-sensor' %}
{% assign connection = "UART/EV3" %}
{% assign autodetect = "Y" %}
{% else %}
{% assign connection = "" %}
{% assign autodetect = "" %}
{% endcase %}