This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:remotelab:sut:generalpurpose3 [2020/05/07 13:35] – pczekalski | en:iot-open:remotelab:sut:generalpurpose3 [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Sensors ===== | ===== Sensors ===== | ||
| Each node contains the following set of sensors: | Each node contains the following set of sensors: | ||
| - | * DHT sensor measuring temperature and humidity | + | * DHT sensor measuring temperature and humidity DHT11, connected to the D4/GPIO2. |
| - | * Bosch BMP280 air pressure sensor, reporting absolute air pressure measurements in Pa, located inside of the yellow air chamber (operating of the fan changes pressure reported by the sensor when the fan is off, it measures absolute air pressure - please note, the laboratory is located at the 3rd floor + base floor, so it is not a ground-level pressure). This sensor uses I2C protocol and is connected to the D1 and D2 GPIOs (D2 is SDA, D1 is SCL). The sensor I2C address is 0x76. | + | * Bosch BMP280 air pressure sensor, reporting absolute air pressure measurements in Pa, located inside of the yellow air chamber (operating of the fan changes pressure reported by the sensor when the fan is off, it measures absolute air pressure - please note, the laboratory is located at the 3rd floor + base floor, so it is not a ground-level pressure). This sensor uses the I2C protocol and is connected to the D1 and D2 GPIOs (D2 is SDA, D1 is SCL). The sensor I2C address is 0x76. |
| ==== Technical overview of the node and air pressure chamber overview ==== | ==== Technical overview of the node and air pressure chamber overview ==== | ||
| Line 88: | Line 88: | ||
| <note important> | <note important> | ||
| - | |||
| - | |||
| - | |||
| - | === Platformio.ini === | ||
| - | < | ||
| - | ; PlatformIO Project Configuration File | ||
| - | ; | ||
| - | ; Build options: build flags, source filter | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; Please visit documentation for the other options and examples | ||
| - | ; http:// | ||
| - | |||
| - | [env: | ||
| - | platform = espressif8266 | ||
| - | board = d1_mini | ||
| - | framework = arduino | ||
| - | lib_deps = Wire, LCD, 528@1.0.6, 31@1.0.3 | ||
| - | </ | ||
| ===== Communication ===== | ===== Communication ===== | ||
| Line 129: | Line 108: | ||
| ===== Support ===== | ===== Support ===== | ||
| - | piotr.czekalski@polsl.pl | + | In case the LCD display hangs and you are sure that your code should work but it does not, it may be the case the I2C bus is stuck and hang the I2C to LCD controller converter.\\ |
| + | In this case, please use the following code to reset the I2C bus (you can embed it to your source code or run separately, then run your original code, again). Mind to use appropriate I2C address, regarding the node booked (nodes 8 and 9 are using 0x3F, nodes 10 and 11 use 0x27): | ||
| + | <code c> | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | LiquidCrystal_I2C lcd(0x3F, | ||
| + | |||
| + | void setup() | ||
| + | { | ||
| + | pinMode(4, | ||
| + | pinMode(5, OUTPUT); | ||
| + | digitalWrite(4, | ||
| + | digitalWrite(5, | ||
| + | delay(2000); | ||
| + | pinMode(5, INPUT); | ||
| + | pinMode(4, INPUT); | ||
| + | delay(2050); | ||
| + | lcd.init(D2, | ||
| + | lcd.backlight(); | ||
| + | lcd.home(); | ||
| + | lcd.print(" | ||
| + | } | ||
| + | void loop() | ||
| + | { | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | Finally, you should see Hello World message on the LCD and I2C bus should be recovered now. | ||