This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:remotelab:sut:generalpurpose [2020/05/21 20:05] – pczekalski | en:iot-open:remotelab:sut:generalpurpose [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| ===== Sensors ===== | ===== Sensors ===== | ||
| - | There is a temperature and humidity sensor in the lab node: DHT22, connected to the GPIO0 (D4). | + | There is a temperature and humidity sensor in the lab node: DHT11, connected to the GPIO0 (D4). |
| ===== Actuators ===== | ===== Actuators ===== | ||
| Line 51: | Line 51: | ||
| </ | </ | ||
| - | == 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, 1574, PubSubClient, | ||
| - | </ | ||
| === Communication === | === Communication === | ||
| Line 89: | Line 71: | ||
| - | ==== Support ==== | + | ===== Support |
| - | gabriel.drabik@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): | ||
| + | <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. | ||