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:generalpurpose2:b1 [2019/07/26 13:41] pczekalskien:iot-open:remotelab:sut:generalpurpose2:b1 [2020/10/25 10:00] (current) – external edit 127.0.0.1
Line 8: Line 8:
  
 === Prerequisites === === Prerequisites ===
-There are no other prerequisites than LCD I2C library. Mind, LCD is controlled via the I2C bus. LCD Display is 4×20 characters. LCD is controlled via I2C extender: LCM1602. The I2C extender address is 0x3F and the I2C bus is connected to the pins D1 and D2 (D1 is SCL and D2 is SDA).+There are no other prerequisites than LCD I2C library. Mind, LCD is controlled via the I2C bus. LCD Display is 4×20 characters. LCD is controlled via I2C extender: LCM1602. The I2C extender address is 0x3F or 0x27 (depends on the laboratory node, please refer to the documentation!) and the I2C bus is connected to the pins D1 and D2 (D1 is SCL and D2 is SDA). 
 + 
 +<note important>There are two types of I2C extenders differing their I2C address: 
 +  * Nodes 1 through 5, 8 and 9 use 0x3F 
 +  * Nodes 10 and 11 use 0x27 
 +</note>
  
 === Scenario === === Scenario ===
-Initialize LCD screen, clear it then write some fancy text on it, i.e. "Hello IOT!" in the first line then your first name in the second line and the name of the city you're in, in the third. In the fourth line, print right-aligned number of ''loop'' iterations (delay it for 1 second between updates - yes, **1**, to observe video stream lag and delays). Note, delays are provided in ms, not in s.+Initialize LCD screen, clear it then write some fancy text on it, i.e. "Hello IOT!" in the first line then your first name in the second line and the name of the city you're in, in the third. In the fourth line, print right-aligned number of ''loop'' iterations (delay it for 1 second between updates - to observe video stream lag and delays). Note, delays are provided in ms, not in s.
  
 === Result === === Result ===
Line 29: Line 34:
 Instantiate software controler component for the LCD display: Instantiate software controler component for the LCD display:
 <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 nodes 1 through 5, 8 and 9 
 +//LiquidCrystal_I2C lcd(0x27,20,4); //for nodes 10 and 11 only! 
 +                                   // for a 20 chars and 4 line display
 </code> </code>
 == Step 3 == == Step 3 ==
Line 70: Line 77:
 ... ...
 </code> </code>
 +<note tip>''sprintf'' uses number of wildcards that are rendered with data. Refer to the c/c++ documentation on ''sprintf''. Here ''%d'' means: having integer number render it to string and as we do not specify number of digits, it is up to the engine to convert it properly.\\''delay(time)'' is measured in milliseconds.</note>
 +
 === Result validation === === Result validation ===
 Observe text, its position and counter ticking in lower, right corner. Observe text, its position and counter ticking in lower, right corner.
  
  
en/iot-open/remotelab/sut/generalpurpose2/b1.1564148516.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