Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iotcluj:labs:05 [2016/07/12 14:41]
ioana_maria.culic [The Setup]
iotcluj:labs:05 [2016/07/13 12:33] (current)
ioana_maria.culic [Exercises]
Line 63: Line 63:
 The first property allows you to set the Raspberry Pi connection to the Arduino board so the Raspberry Pi knows the port through which it should send the messages. Usually, the port is **/​dev/​ttyACM0**. However, in order to make sure, go to the **Shell** tab and type **dmesg**. There you should see messages stating that an FTDI cable has been connected to the board and the port it is connected to. Concatenate that value to **/dev/** and place the value as the first property of the node. The first property allows you to set the Raspberry Pi connection to the Arduino board so the Raspberry Pi knows the port through which it should send the messages. Usually, the port is **/​dev/​ttyACM0**. However, in order to make sure, go to the **Shell** tab and type **dmesg**. There you should see messages stating that an FTDI cable has been connected to the board and the port it is connected to. Concatenate that value to **/dev/** and place the value as the first property of the node.
  
 +<​note>​When you configure the Arduino port set the it to **global**</​note>​
 +{{ :​iotcluj:​labs:​arduino-global.png?​400 |}}
 Further on, you need to specify which pin you want to read from. In this case, the pin is 0 and is an analog pin. Afterwards, you will use a **range** node in order to map the read values to values that should light up the LED. For this, you need to adapt the system to your environment. Depending on the regular amount of light, usually you will read a value of around 400. So in this case, the range scales values going from 400 to 1024 to 0 to 255. However, if the regular value is different, you will need to scale a different range. Further on, you need to specify which pin you want to read from. In this case, the pin is 0 and is an analog pin. Afterwards, you will use a **range** node in order to map the read values to values that should light up the LED. For this, you need to adapt the system to your environment. Depending on the regular amount of light, usually you will read a value of around 400. So in this case, the range scales values going from 400 to 1024 to 0 to 255. However, if the regular value is different, you will need to scale a different range.
  
Line 76: Line 78:
  
 ===== Exercises===== ===== Exercises=====
 +  - Connect a potentiometer and send the read values to the dashboard.
   - Display the values coming from the light sensor in the dashboard using the **gauge** graph.   - Display the values coming from the light sensor in the dashboard using the **gauge** graph.
   - Connect all the sensors in the kit to the Arduino and display the values you read in the dashboard. **Note:** Do not connect the Hall sensor, which works in a different way.   - Connect all the sensors in the kit to the Arduino and display the values you read in the dashboard. **Note:** Do not connect the Hall sensor, which works in a different way.
   - Search the temperature sensor'​s datasheet online (TMP36) and transform the read values to celsius degrees.   - Search the temperature sensor'​s datasheet online (TMP36) and transform the read values to celsius degrees.
 +  - Use the gas sensor and display the read value on a graph.
  
iotcluj/labs/05.1468323662.txt.gz ยท Last modified: 2016/07/12 14:41 by ioana_maria.culic
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0