Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:iot-open:practical:hardware:sut:esp32:emb5_1 [2024/02/25 20:19] – created pczekalskien: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 worldUse of LCD with predefined line organisation (here 2 lines, 16 characters each) is as simple as sending character's ASCII code to the device. This is so much simpler than in the case of the use of dot-matrix displays, where it is necessary to use fonts. Obviously, use of fixed organisation LCD has its limits, and here only 32 characters can be presented to the user, simultanously. ASCII presents a limited set of characters but many LCDs provide an ability to re-define character map (the way each letter, digit or symbol looks). This way it is possible to introduce elements of graphics (i.e. frames), special symbols and letters.+Alphanumerical LCD is one of the most popular output devices in the Embedded and IoT. Using LCD with predefined line organisation (here2 lines, 16 characters each) is as simple as sending character's ASCII code to the device. This is so much simpler than in the case of the use of dot-matrix displays, where it is necessary to use fonts. The fixed organisation LCD has limits; here, only 32 characters can be presented to the user simultaneously. ASCII presents a limited set of charactersbut many LCDs can redefine character maps (how each letter, digit or symbol looks). This wayit is possible to introduce graphics elements (i.e. frames), special symbols and letters.
  
-In this scenario you will learn how to handle easily LCD to present information and retrieve it visually with webcam.+In this scenarioyou will learn how to handle easily LCD to present information and retrieve it visually with webcam.
  
 ===== Prerequisites ===== ===== Prerequisites =====
 Familiarise yourself with a hardware reference: this LCD is controlled with 6 GPIOs as presented in the "//Table 1: ESP32-S3 SUT Node Hardware Details//" on the hardware reference page.\\ Familiarise yourself with a hardware reference: this LCD is controlled with 6 GPIOs as presented in the "//Table 1: ESP32-S3 SUT Node Hardware Details//" on the hardware reference page.\\
-You are going to use a library to handle the LCD display. It means you need to add it to your ''platformio.ini'' file. Use the template provided in the hardware reference section and extend it with library definition:+You are going to use a library to handle the LCD. It means you need to add it to your ''platformio.ini'' file. Use the template provided in the hardware reference section and extend it with the library definition:
 <code bash> <code bash>
 lib_deps = adafruit/Adafruit LiquidCrystal@^2.0.2 lib_deps = adafruit/Adafruit LiquidCrystal@^2.0.2
Line 19: Line 19:
  
 ==== Task to be implemented ==== ==== Task to be implemented ====
-Draw "Hello World" in the upper line of the LCD display and "Hello IoT" in the lower one.+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 in your video stream. Book a devicecreate dummy Arduino file with ''void setup()...'' and ''void loop()...''.+Check if you can see full LCD in your video stream. Book a device and create dummy Arduino file with ''void setup()...'' and ''void loop()...''.
  
  
 ==== 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 to your source code:+Include the library in your source code:
 <code c> <code c>
 #include <Adafruit_LiquidCrystal.h> #include <Adafruit_LiquidCrystal.h>
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 it with appropriate control GPIOs:+Declare a static instance of the LCD controller class and preconfigure it with appropriate control GPIOs:
 <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. Most common class'methods that will help youare listed below:+Implement your algorithm. The most common class methods that will help you are listed below:
   * ''.clear()'' - clears all content;   * ''.clear()'' - clears all content;
   * ''.setCursor(x,y)'' - set cursor, writing will start there;   * ''.setCursor(x,y)'' - set cursor, writing will start there;
-  * ''.print(contents)'' - prints text in the cursor locationnote there are many overloaded functions, accepting variety of arguments, including numerical.+  * ''.print(contents)'' - prints text in the cursor locationnote there are many overloaded functions, accepting various arguments, including numerical.
  
 ==== Result validation ==== ==== Result validation ====
-You should be able to see "Hello World" and "Hello IoT" on the LCD display now.+You should be able to see "Hello World" and "Hello IoT" on the LCD now.
  
 +<WRAP noprint>
 ===== Project information ===== ===== Project information =====
 {{:en:iot-open:logo_iot_200_px.png?200|}}\\ {{:en:iot-open:logo_iot_200_px.png?200|}}\\
Line 82: Line 83:
 </figure> </figure>
  
 +</WRAP>
  
en/iot-open/practical/hardware/sut/esp32/emb5_1.1708892377.txt.gz · Last modified: 2024/02/25 20:19 by pczekalski
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