This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:remotelab:sut:roboarm [2019/10/29 14:18] – pczekalski | en:iot-open:remotelab:sut:roboarm [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| ===== Technical details ===== | ===== Technical details ===== | ||
| - | Robo arm is a set of two arms. The first part of the arm is fixed to the axle of step motors that are fixed to the " | + | Robo arm is a set of two arms. The first part of the arm is fixed to the axle of step motors that are fixed to the " |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| ===== Sensors ===== | ===== Sensors ===== | ||
| Line 42: | Line 42: | ||
| Then configure your LCD controller: | Then configure your LCD controller: | ||
| <code c> | <code c> | ||
| - | LiquidCrystal_I2C lcd(0x3F, | + | LiquidCrystal_I2C lcd(0x3F, |
| + | // | ||
| </ | </ | ||
| Line 98: | Line 99: | ||
| board = d1_mini | board = d1_mini | ||
| framework = arduino | framework = arduino | ||
| - | lib_deps = Wire, EmonLib, Adafruit NeoPixel, Encoder,DHT sensor library, Adafruit Unified Sensor, LCD, PubSubClient, | + | lib_deps = Wire, EmonLib, Adafruit NeoPixel, Encoder,DHT sensor library, |
| + | Adafruit Unified Sensor, LCD, PubSubClient, | ||
| + | KS0108_PCF8574, | ||
| </ | </ | ||
| Line 121: | Line 124: | ||
| ===== Support ===== | ===== Support ===== | ||
| + | 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 < | ||
| - | gabriel.drabik@polsl.pl | + | 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. | ||