This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:iot-open:practical:hardware:sut:esp32:emb5_1 [2024/02/25 20:19] – created pczekalski | en:iot-open:practical:hardware:sut:esp32:emb5_1 [2024/03/22 08:34] (current) – [Project information] pczekalski | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== EMB5: Using LCD Display ===== | ====== EMB5: Using LCD Display ===== | ||
- | Alphanumerical LCD is one of the most popular output devices in the Embedded and IoT world. Use of LCD with predefined line organisation (here 2 lines, 16 characters each) is as simple as sending character' | + | Alphanumerical LCD is one of the most popular output devices in the Embedded and IoT. Using LCD with predefined line organisation (here, 2 lines, 16 characters each) is as simple as sending |
- | In this scenario you will learn how to handle easily LCD to present information and retrieve it visually with webcam. | + | In this scenario, you will learn how to handle easily LCD to present information and retrieve it visually with a webcam. |
===== Prerequisites ===== | ===== Prerequisites ===== | ||
Familiarise yourself with a hardware reference: this LCD is controlled with 6 GPIOs as presented in the "// | Familiarise yourself with a hardware reference: this LCD is controlled with 6 GPIOs as presented in the "// | ||
- | You are going to use a library to handle the LCD display. It means you need to add it to your '' | + | You are going to use a library to handle the LCD. It means you need to add it to your '' |
<code bash> | <code bash> | ||
lib_deps = adafruit/ | lib_deps = adafruit/ | ||
Line 19: | Line 19: | ||
==== Task to be implemented ==== | ==== Task to be implemented ==== | ||
- | Draw "Hello World" in the upper line of the LCD display | + | Draw "Hello World" in the upper line of the LCD and "Hello IoT" in the lower one. |
==== Start ==== | ==== Start ==== | ||
- | Check if you can see full LCD display | + | Check if you can see a full LCD in your video stream. Book a device |
==== Steps ==== | ==== Steps ==== | ||
- | // Write some extra information if, i.e. some steps are optional; otherwise, cancel this paragraph (but do not remove the header).// | + | |
=== Step 1 === | === Step 1 === | ||
- | Include library | + | Include |
<code c> | <code c> | ||
#include < | #include < | ||
Line 34: | Line 34: | ||
=== Step 2 === | === Step 2 === | ||
- | Declare GPIOs controlling the LCD display, according to the hardware reference: | + | Declare GPIOs controlling the LCD, according to the hardware reference: |
<code c> | <code c> | ||
#define LCD_RS 2 | #define LCD_RS 2 | ||
Line 45: | Line 45: | ||
=== Step 3 === | === Step 3 === | ||
- | Declare a static instance of the LCD controller class and preconigure | + | Declare a static instance of the LCD controller class and preconfigure |
<code c> | <code c> | ||
static Adafruit_LiquidCrystal lcd(LCD_RS, LCD_ENABLE, LCD_D4, LCD_D5, LCD_D6, LCD_D7); | static Adafruit_LiquidCrystal lcd(LCD_RS, LCD_ENABLE, LCD_D4, LCD_D5, LCD_D6, LCD_D7); | ||
Line 57: | Line 57: | ||
=== Step 5 === | === Step 5 === | ||
- | Implement your algorithm. | + | Implement your algorithm. |
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
==== Result validation ==== | ==== Result validation ==== | ||
- | You should be able to see "Hello World" and "Hello IoT" on the LCD display | + | You should be able to see "Hello World" and "Hello IoT" on the LCD now. |
+ | <WRAP noprint> | ||
===== Project information ===== | ===== Project information ===== | ||
{{: | {{: | ||
Line 82: | Line 83: | ||
</ | </ | ||
+ | </ | ||