This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:remotelab:sut:generalpurpose2:b1 [2019/07/24 20:44] – pczekalski | en:iot-open:remotelab:sut:generalpurpose2:b1 [2020/10/25 10:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Basic operations on the 4x20 LCD screen ==== | + | ==== B1: Basic operations on the 4x20 LCD screen ==== |
| Whatever you do, you expect to have some output of the system. Sometimes there is a blinking LED, sometimes information about connected/ | Whatever you do, you expect to have some output of the system. Sometimes there is a blinking LED, sometimes information about connected/ | ||
| 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!) |
| + | |||
| + | <note important> | ||
| + | * Nodes 1 through 5, 8 and 9 use 0x3F | ||
| + | * Nodes 10 and 11 use 0x27 | ||
| + | </ | ||
| === 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 '' | + | 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 '' |
| === Result === | === Result === | ||
| - | You should see the texts in the camera | + | You should see the texts and ticking counter |
| === Start === | === Start === | ||
| Line 22: | Line 27: | ||
| == Step 1 == | == Step 1 == | ||
| - | Include | + | Include |
| <code c> | <code c> | ||
| #include < | #include < | ||
| 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, | + | LiquidCrystal_I2C lcd(0x3F, |
| + | // | ||
| + | // | ||
| </ | </ | ||
| == Step 3 == | == Step 3 == | ||
| Line 70: | Line 77: | ||
| ... | ... | ||
| </ | </ | ||
| + | <note tip>'' | ||
| + | |||
| === 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. | ||