This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:remotelab:ume:smartme:u1 [2019/10/26 10:39] – pczekalski | en:iot-open:remotelab:ume:smartme:u1 [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== IU1: Showing temperature, | + | ==== IU1: Showing temperature, |
| - | ===== Target group ===== | + | === Target group === |
| This hands-on lab guide is intended for the Undergraduate but other target groups may benefit from it, treating it as basics for advanced projects. | This hands-on lab guide is intended for the Undergraduate but other target groups may benefit from it, treating it as basics for advanced projects. | ||
| - | ===== Prerequisites | + | === Prerequisites === |
| - | ==== Liquid Crystal | + | == Liquid Crystal == |
| - | For this library, you may refer to the [[en: | + | For this library, you may refer to the [[en: |
| - | ==== DHT ==== | + | == DHT == |
| - | For this library, you may refer to the [[en: | + | For this library, you may refer to the [[en: |
| - | ==== PMS7003 | + | == PMS7003 == |
| All the SmartME Network Laboratory Arduino nodes are equipped with a PMS7003 sensor. | All the SmartME Network Laboratory Arduino nodes are equipped with a PMS7003 sensor. | ||
| This sensor allows measuring the air quality by taking into account the PMx concentration. The working principle of such a sensor is based on producing scattering by using a laser to radiate suspending particles in the air, then collecting scattering light to a certain degree, and finally obtaining the curve of scattering light change with time. In the end, the equivalent particle diameter and the number of particles with different diameters per unit volume can be calculated [1]. | This sensor allows measuring the air quality by taking into account the PMx concentration. The working principle of such a sensor is based on producing scattering by using a laser to radiate suspending particles in the air, then collecting scattering light to a certain degree, and finally obtaining the curve of scattering light change with time. In the end, the equivalent particle diameter and the number of particles with different diameters per unit volume can be calculated [1]. | ||
| Line 29: | Line 28: | ||
| [3]https:// | [3]https:// | ||
| - | ==== Arduino Serial | + | == Arduino Serial == |
| This function is used for communication between the Arduino board and a computer or other devices. All Arduino boards have at least one serial port. On Uno pins 0 and 1 are used for communication with the computer. Serial communication on pins TX/RX uses TTL logic levels (5V or 3.3V depending on the board) [4]. | This function is used for communication between the Arduino board and a computer or other devices. All Arduino boards have at least one serial port. On Uno pins 0 and 1 are used for communication with the computer. Serial communication on pins TX/RX uses TTL logic levels (5V or 3.3V depending on the board) [4]. | ||
| Line 39: | Line 38: | ||
| [5] https:// | [5] https:// | ||
| - | ===== Scenario | + | === Scenario === |
| First, initialize LCD screen with the labels of temperature (“T”), relative humidity (“H”), and dust particles (“PM10”). | First, initialize LCD screen with the labels of temperature (“T”), relative humidity (“H”), and dust particles (“PM10”). | ||
| Then, after the sensor detection, next to the labels, the sensor values will be displayed, every 1 second. | Then, after the sensor detection, next to the labels, the sensor values will be displayed, every 1 second. | ||
| Line 50: | Line 49: | ||
| [6]https:// | [6]https:// | ||
| - | ===== Result | + | === Result === |
| You should see the values of temperature, | You should see the values of temperature, | ||
| - | ===== Start ===== | + | === Start === |
| There are no special steps to be performed. | There are no special steps to be performed. | ||
| - | ===== Steps ===== | + | === Steps === |
| - | ==== Step 1 ==== | + | == Step 1 == |
| Include LCD driver library, DHT library and Software Serial library: | Include LCD driver library, DHT library and Software Serial library: | ||
| Line 67: | Line 66: | ||
| </ | </ | ||
| - | ==== Step 2 ==== | + | == Step 2 == |
| Instantiate the software controller component for the LCD display. Then set up: | Instantiate the software controller component for the LCD display. Then set up: | ||
| - 1) the DHTPIN (which refers to the digital pin we use to get the signal); | - 1) the DHTPIN (which refers to the digital pin we use to get the signal); | ||
| Line 82: | Line 81: | ||
| SoftwareSerial mySerial(9, | SoftwareSerial mySerial(9, | ||
| </ | </ | ||
| - | + | === Step 3 == | |
| - | ==== Step 3 ==== | + | |
| Initialize display. | Initialize display. | ||
| Initialize the DHT sensor. | Initialize the DHT sensor. | ||
| Line 107: | Line 105: | ||
| </ | </ | ||
| - | ==== Step 4 ==== | + | == Step 4 == |
| Implement loop() to sample and display the values of the temperature, | Implement loop() to sample and display the values of the temperature, | ||
| Line 155: | Line 153: | ||
| </ | </ | ||
| - | ===== Result validation | + | === Result validation === |
| Observe the temperature, | Observe the temperature, | ||
| - | ===== Platformio.ini | + | === Platformio.ini === |
| < | < | ||
| [env:uno] | [env:uno] | ||
| Line 177: | Line 175: | ||
| </ | </ | ||
| - | ===== U1.cpp ===== | + | === IU1.cpp === |
| <code c> | <code c> | ||
| #include < | #include < | ||