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:practical:hardware:sut:esp32:emb6_1 [2024/02/26 13:54] – [Start] pczekalskien:iot-open:practical:hardware:sut:esp32:emb6_1 [2024/04/05 09:24] (current) – [Steps] pczekalski
Line 3: Line 3:
 <note tip> The ePaper display is slow and flashes several times during the update. It is also possible to update part of the screen only so that it speeds up displaying and involves more ghosting effects.</note> <note tip> The ePaper display is slow and flashes several times during the update. It is also possible to update part of the screen only so that it speeds up displaying and involves more ghosting effects.</note>
  
 +===== Prerequisites =====
  
 Familiarise yourself with a hardware reference: this ePaper 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 ePaper is controlled with 6 GPIOs as presented in the "//Table 1: ESP32-S3 SUT Node Hardware Details//" on the hardware reference page.\\
Line 33: Line 33:
 <caption>IOT-OPEN.EU Reloaded favicon 60px x 60px</caption> <caption>IOT-OPEN.EU Reloaded favicon 60px x 60px</caption>
 </figure> </figure>
-The corresponding converted code for the logo in Figure {{ref>iotopenfavicon}} (Horizontal 1 bit per pixel, as suitable for ePaper Display) is present below:+ 
 +==== Steps ==== 
 +Remember to include the source array in the code when drawing an image.\\ 
 +The corresponding generated C array for the logo in Figure {{ref>iotopenfavicon}} (horizontal 1 bit per pixel, as suitable for ePaper Display) is present below:
 <code c> <code c>
 // 'logo 60', 60x60px // 'logo 60', 60x60px
 const unsigned char epd_bitmap_logo_60 [] PROGMEM = { const unsigned char epd_bitmap_logo_60 [] PROGMEM = {
- 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xf0,  +0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xf0,  
- 0xff, 0xff, 0xc0, 0x00,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0xff, 0xf9, 0xf1, 0xf8, 0xf9, 0xf0, 0xfc, 0x7f, 0xff, 0xf9, 0xf8, 0x61, 0xf8, 0xc0,  
- 0xfc, 0x3f, 0xff, 0xf9, 0xfc, 0x03, 0xf8, 0x00, 0xfe, 0x1f, 0xff, 0xf9, 0xff, 0x0f, 0xfe, 0x10,  +0xfc, 0x3f, 0xff, 0xf9, 0xfc, 0x03, 0xf8, 0x00, 0xfe, 0x1f, 0xff, 0xf9, 0xff, 0x0f, 0xfe, 0x10,  
- 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,  +0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,  
- 0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,  +0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,  
- 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0,  +0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0,  
- 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,  +0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,  
- 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00+0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00
 }; };
  
-// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 496)+// Total bytes used to store images in PROGMEM = 496
 const int epd_bitmap_allArray_LEN = 1; const int epd_bitmap_allArray_LEN = 1;
 const unsigned char* epd_bitmap_allArray[1] = { const unsigned char* epd_bitmap_allArray[1] = {
Line 75: Line 78:
 }; };
 </code> </code>
-==== Steps ==== 
-Remember to include the source array in the code if you plan to draw an image from the bitmap: 
- 
 === Step 1 === === Step 1 ===
 Include necessary libraries. Include necessary libraries.
Line 85: Line 85:
 #include <GxEPD2_BW.h> #include <GxEPD2_BW.h>
 //Fonts //Fonts
-#include <Fonts/FreeMonoBold9pt7b.h>+#include <Fonts/FreeMonoBold12pt7b.h>
 </code> </code>
 The code above also includes a font to draw text on the ePaper Display. There are many fonts one can use, and a non-exhaustive list is present below (files are located in the ''Adafruit GFX Library'', subfolder ''Fonts''): The code above also includes a font to draw text on the ePaper Display. There are many fonts one can use, and a non-exhaustive list is present below (files are located in the ''Adafruit GFX Library'', subfolder ''Fonts''):
-   * ''FreeMono12pt7b.h'' +<code> 
-  * ''FreeMono18pt7b.h'' +   FreeMono12pt7b.h 
-  * ''FreeMono24pt7b.h'' +   FreeMono18pt7b.h 
-  * ''FreeMono9pt7b.h'' +   FreeMono24pt7b.h 
-  * ''FreeMonoBold12pt7b.h'' +   FreeMono9pt7b.h 
-  * ''FreeMonoBold18pt7b.h'' +   FreeMonoBold12pt7b.h 
-  * ''FreeMonoBold24pt7b.h'' +   FreeMonoBold18pt7b.h 
-  * ''FreeMonoBold9pt7b.h'' +   FreeMonoBold24pt7b.h 
-  * ''FreeMonoBoldOblique12pt7b.h'' +   FreeMonoBold9pt7b.h 
-  * ''FreeMonoBoldOblique18pt7b.h'' +   FreeMonoBoldOblique12pt7b.h 
-  * ''FreeMonoBoldOblique24pt7b.h'' +   FreeMonoBoldOblique18pt7b.h 
-  * ''FreeMonoBoldOblique9pt7b.h'' +   FreeMonoBoldOblique24pt7b.h 
-  * ''FreeMonoOblique12pt7b.h'' +   FreeMonoBoldOblique9pt7b.h 
-  * ''FreeMonoOblique18pt7b.h'' +   FreeMonoOblique12pt7b.h 
-  * ''FreeMonoOblique24pt7b.h'' +   FreeMonoOblique18pt7b.h 
-  * ''FreeMonoOblique9pt7b.h'' +   FreeMonoOblique24pt7b.h 
-  * ''FreeSans12pt7b.h'' +   FreeMonoOblique9pt7b.h 
-  * ''FreeSans18pt7b.h'' +   FreeSans12pt7b.h 
-  * ''FreeSans24pt7b.h'' +   FreeSans18pt7b.h 
-  * ''FreeSans9pt7b.h'' +   FreeSans24pt7b.h 
-  * ''FreeSansBold12pt7b.h'' +   FreeSans9pt7b.h 
-  * ''FreeSansBold18pt7b.h'' +   FreeSansBold12pt7b.h 
-  * ''FreeSansBold24pt7b.h'' +   FreeSansBold18pt7b.h 
-  * ''FreeSansBold9pt7b.h'' +   FreeSansBold24pt7b.h 
-  * ''FreeSansBoldOblique12pt7b.h'' +   FreeSansBold9pt7b.h 
-  * ''FreeSansBoldOblique18pt7b.h'' +   FreeSansBoldOblique12pt7b.h 
-  * ''FreeSansBoldOblique24pt7b.h'' +   FreeSansBoldOblique18pt7b.h 
-  * ''FreeSansBoldOblique9pt7b.h'' +   FreeSansBoldOblique24pt7b.h 
-  * ''FreeSansOblique12pt7b.h'' +   FreeSansBoldOblique9pt7b.h 
-  * ''FreeSansOblique18pt7b.h'' +   FreeSansOblique12pt7b.h 
-  * ''FreeSansOblique24pt7b.h'' +   FreeSansOblique18pt7b.h 
-  * ''FreeSansOblique9pt7b.h'' +   FreeSansOblique24pt7b.h 
-  * ''FreeSerif12pt7b.h'' +   FreeSansOblique9pt7b.h 
-  * ''FreeSerif18pt7b.h'' +   FreeSerif12pt7b.h 
-  * ''FreeSerif24pt7b.h'' +   FreeSerif18pt7b.h 
-  * ''FreeSerif9pt7b.h'' +   FreeSerif24pt7b.h 
-  * ''FreeSerifBold12pt7b.h'' +   FreeSerif9pt7b.h 
-  * ''FreeSerifBold18pt7b.h'' +   FreeSerifBold12pt7b.h 
-  * ''FreeSerifBold24pt7b.h'' +   FreeSerifBold18pt7b.h 
-  * ''FreeSerifBold9pt7b.h'' +   FreeSerifBold24pt7b.h 
-  * ''FreeSerifBoldItalic12pt7b.h'' +   FreeSerifBold9pt7b.h 
-  * ''FreeSerifBoldItalic18pt7b.h'' +   FreeSerifBoldItalic12pt7b.h 
-  * ''FreeSerifBoldItalic24pt7b.h'' +   FreeSerifBoldItalic18pt7b.h 
-  * ''FreeSerifBoldItalic9pt7b.h'' +   FreeSerifBoldItalic24pt7b.h 
-  * ''FreeSerifItalic12pt7b.h'' +   FreeSerifBoldItalic9pt7b.h 
-  * ''FreeSerifItalic18pt7b.h'' +   FreeSerifItalic12pt7b.h 
-  * ''FreeSerifItalic24pt7b.h'' +   FreeSerifItalic18pt7b.h 
-  * ''FreeSerifItalic9pt7b.h''+   FreeSerifItalic24pt7b.h 
 +   FreeSerifItalic9pt7b.h 
 +</code>
 === Step 2 === === Step 2 ===
 Declare GPIOs and some configurations needed to handle the ePaper display properly: Declare GPIOs and some configurations needed to handle the ePaper display properly:
 <code c> <code c>
 +#define GxEPD2_DRIVER_CLASS GxEPD2_213_BN
 +#define GxEPD2_DISPLAY_CLASS GxEPD2_BW
 +#define USE_HSPI_FOR_EPD
 +#define ENABLE_GxEPD2_GFX 0
 +
 +#define SPI_SCLK_PIN 18
 +#define SPI_MOSI_PIN 15
 +
 +#define EPAPER_SPI_DC_PIN 13
 +#define EPAPER_SPI_CS_PIN 10
 +#define EPAPER_SPI_RST_PIN 9
 +#define EPAPER_BUSY_PIN 8
 +
 +#define SCREEN_WIDTH 250
 +#define SCREEN_HEIGHT 122
 +#define MAX_DISPLAY_BUFFER_SIZE 65536ul 
 +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
  
 </code> </code>
  
 === Step 3 === === Step 3 ===
 +Declare hardware SPI controller and ePaper display controller:
 +<code c>
 +static SPIClass hspi(HSPI);
  
-...+static GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ EPAPER_SPI_CS_PIN, /*DC=*/ EPAPER_SPI_DC_PIN, /*RST=*/ EPAPER_SPI_RST_PIN, /*BUSY=*/ EPAPER_BUSY_PIN)); 
 +</code> 
 + 
 +You can also declare a message to display as an array of characters: 
 +<code c> 
 +static const char HelloWorld[] = "Hello IoT!"; 
 +</code> 
 + 
 +=== Step 4 === 
 +Initialise SPI and, on top of that, the ePaper controller class: 
 +<code c> 
 +    hspi.begin(SPI_SCLK_PIN, -1, SPI_MOSI_PIN, -1); 
 +    delay(100); 
 +    pinMode(EPAPER_SPI_CS_PIN, OUTPUT); 
 +    pinMode(EPAPER_SPI_RST_PIN, OUTPUT); 
 +    pinMode(EPAPER_SPI_DC_PIN, OUTPUT); 
 +    pinMode(EPAPER_BUSY_PIN,INPUT_PULLUP); 
 +    delay(100); 
 +    digitalWrite(EPAPER_SPI_CS_PIN,LOW); 
 +    display.epd2.selectSPI(hspi, SPISettings(4000000, MSBFIRST, SPI_MODE0)); 
 +    delay(100); 
 +    display.init(115200); 
 +    digitalWrite(EPAPER_SPI_CS_PIN,HIGH);     
 +</code> 
 + 
 +=== Step 5 === 
 +Set display rotation, font and text colour: 
 +<code c> 
 +digitalWrite(EPAPER_SPI_CS_PIN,LOW); 
 +display.setRotation(1); 
 +display.setFont(&FreeMonoBold12pt7b); 
 +display.setTextColor(GxEPD_BLACK); 
 +</code> 
 + 
 +then get the external dimensions of the string to be printed: 
 +<code c> 
 +int16_t tbx, tby; uint16_t tbw, tbh; 
 +display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh); 
 + 
 +uint16_t x = ((display.width() - tbw) / 2) - tbx; 
 +uint16_t y = ((display.height() - tbh) / 2) - tby; 
 +</code> 
 + 
 +=== Step 6 === 
 +Then display contents of the image and the text in the ePaper display: 
 +<code c> 
 +display.setFullWindow(); 
 +display.firstPage(); 
 +do 
 +  { 
 +    display.drawImage((uint8_t*)epd_bitmap_logo_60,0,0,60,60); 
 +    display.setCursor(x, y); 
 +    display.print(HelloWorld); 
 +  } 
 +while (display.nextPage()); 
 +digitalWrite(EPAPER_SPI_CS_PIN,HIGH); 
 +</code>
  
-=== Step n === 
-//Describe activities done in Step n.// 
  
 ==== Result validation ==== ==== Result validation ====
-//Provide some result validation methods for self-assessment.//+You should be able to see an image and a text on the ePaper Display.
  
-===== FAQ ===== 
-This section is to be extended as new questions appear. \\ 
-When using the printed version of this manual, please refer to the latest online version of this document to obtain the valid and up-to-date list of the FAQ. 
-//Provide some FAQs in the following form:\\ 
-**Question?**: Answer. 
-// 
  
 +<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 175: Line 246:
 {{:en:iot-open:ccbync.png?100|}} {{:en:iot-open:ccbync.png?100|}}
 </figure> </figure>
- +</WRAP>
- +
en/iot-open/practical/hardware/sut/esp32/emb6_1.1708955676.txt.gz · Last modified: 2024/02/26 13:54 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