Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:remotelab:sut:generalpurpose [2020/05/13 08:47] pczekalskien: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:
 </code> </code>
  
-== Platformio.ini == 
-<code> 
-; PlatformIO Project Configuration File 
-; 
-;   Build options: build flags, source filter 
-;   Upload options: custom upload port, speed and extra flags 
-;   Library options: dependencies, extra library storages 
-;   Advanced options: extra scripting 
-; 
-; Please visit documentation for the other options and examples 
-; http://docs.platformio.org/page/projectconf.html 
- 
-[env:d1_mini] 
-platform = espressif8266 
-board = d1_mini 
-framework = arduino 
-lib_deps = Wire, EmonLib, Adafruit NeoPixel, Encoder,DHT sensor library,  
-Adafruit Unified Sensor,  
-LCD, PubSubClient, KS0108_PCF8574, 2120 
-</code> 
  
 === Communication === === Communication ===
Line 91: 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 <Arduino.h> 
 +#include <LiquidCrystal_I2C.h>
  
 +LiquidCrystal_I2C lcd(0x3F,20,4); 
 +
 +void setup()
 +{
 +  pinMode(4,OUTPUT);
 +  pinMode(5, OUTPUT);
 +  digitalWrite(4,LOW);
 +  digitalWrite(5,LOW);
 +  delay(2000);
 +  pinMode(5, INPUT);       // reset pin
 +  pinMode(4, INPUT);
 +  delay(2050);
 +  lcd.init(D2,D1);
 +  lcd.backlight();
 +  lcd.home();
 +  lcd.print("Hello world...");
 +}
 +void loop()
 +{
 +  
 +}
 +</code>
 +Finally, you should see Hello World message on the LCD and I2C bus should be recovered now.
en/iot-open/remotelab/sut/generalpurpose.1589359667.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
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