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:roboarm [2019/10/29 14:18] pczekalskien: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 "wall" of the laboratory. On the end of the first arm, there is a servo motor that drives the second, tail part of the arm. Thus, for full operation of the robot arm, user has to control for two different devices: step motor and servomotor. To control the position of the brick, on each end of the rail (left and right wall), there is a binary proximity sensor, to recognize the utmost position of bricks. For feedback, the user can check the position of the arm using accelerometer sensors fixed on each arm (IMU).+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 "wall" of the laboratory. On the end of the first arm, there is a servo motor that drives the second, tail part of the arm. Thus, for full operation of the robot arm, the user has to control for two different devices: step motor and servomotor. To control the position of the brick, on each end of the rail (left and right wall), there is a binary proximity sensor, to recognize the utmost position of bricks. For feedback, the user can check the position of the arm using accelerometer sensors fixed on each arm (IMU).
  
-{{:en:iot-open:remotelab:sut:iotra.jpg?500|}}+{{:en:iot-open:remotelab:sut:iotra.jpg?470|}}
  
-{{:en:iot-open:remotelab:sut:arm_geom.jpg?500|}}+{{:en:iot-open:remotelab:sut:arm_geom.jpg?470|}}
  
-{{:en:iot-open:remotelab:sut:arm_equ.jpg?300|}}+{{:en:iot-open:remotelab:sut:arm_equ.jpg?470|}}
  
 ===== Sensors ===== ===== Sensors =====
Line 42: Line 42:
 Then configure your LCD controller: Then configure your LCD controller:
 <code c> <code c>
-LiquidCrystal_I2C lcd(0x3F,20,4);  // set the LCD address to 0x3F for a 20 chars and 4 line display+LiquidCrystal_I2C lcd(0x3F,20,4);  // set the LCD address to 0x3F  
 +                                   // for a 20 chars and 4 line display
 </code> </code>
  
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, KS0108_PCF8574, CoAP simple library, I2Cdevlib-MPU6050, StepperDriver+lib_deps = Wire, EmonLib, Adafruit NeoPixel, Encoder,DHT sensor library,  
 +Adafruit Unified Sensor, LCD, PubSubClient,  
 +KS0108_PCF8574, CoAP simple library, I2Cdevlib-MPU6050, StepperDriver
 </code> </code>
  
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 <Arduino.h>
 +#include <LiquidCrystal_I2C.h>
  
-gabriel.drabik@polsl.pl+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/roboarm.1572358735.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