Hello,
Thanks for adding IT8951 Driver HAT on Due in GxEPD2
But I can't find the specific lines for the Arduino DUE (ARM)
I share in photo the assembly this screen 6" with IT8951
I used the command line:
GxEPD2_BW <GxEPD2_it60, GxEPD2_it60 :: HEIGHT> display (GxEPD2_it60 (/ * CS = 5 * / 10, / * DC = * / 8, / * RST = * / 9, / * BUSY = * / 7)); directly . It works very well with example.
But I did not connect the Dc wire to position 8 which does not exist in the SPI connection of the IT8951
This IT8591 Driver Hat is also used for 7.8 ", 9.7", 10.3 "screens Waveshare, Would it be possible to also use these screens by adding them to the GxEPD2 library because they are also very interesting?
Thank you again for your work in using these screens
Jean-Claude
I had to put on my glasses and look twice to verify that this line is really there in GxEPD2_boards_added.h at line 62.
A famous Tesla Member might tell you to "put on your glasses" in such a case.
But I have to refrain from this, because I would risk that a moderator might alter my post, as has happened.
This IT8591 Driver Hat is also used for 7.8 ", 9.7", 10.3 "screens Waveshare, Would it be possible to also use these screens by adding them to the GxEPD2 library because they are also very interesting?
Yes, this would be possible. Note that the IT8951 Driver HAT needs be bought together with the panel, as it comes programmed or parameterized for the matching panel.
It may be enough to adapt WIDTH and HEIGHT in GxEPD2_it60.h for a test.
For supporting these other combinations in GxEPD2 or GxEPD_HD I would need a sponsor or donator.
See line 86 of README.md:
[color=#6ea657]###[/color][color=#608b4e] I can and will only support e-paper panels I have![/color]
- promotion panels from suppliers are welcome, to add support to GxEPD2 - donation panels from users are welcome, to add support to GxEPD2
Hello,
I remind you that I am self-taught in computer science and on arduino and that I realize these assemblies as a hobby.So i need your help.
You are right because considering my age I unfortunately need glasses now.
Excuse me couldn't find the program line because I was looking for the same structure as in the Arduino IDE:
Do not understand why in the program line appears the DC pin at position 8 because I cannot find a DC position in the SPI socket of the IT8951.
GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/CS=77/ SS, /DC=/ 8, /RST=/ 9, /BUSY=/ 7));
To study modifications to your library for larger screens, I need to study and observe it all at length, and my work leaves me with little time.
I understand that you have to help you financially to test new equipment so that we can continue to use new screens in our assemblies and in appreciation of all the work you have already done for us. For that, thank you for sending me your Paypal address to make a donation.
Thank you for your patient and for your help with my questions, which may seem very simple for a specialist like you, but which for me remain very complicated.
I need to specify a value for the DC parameter. I chose the same value as my DUE shield uses for other EPDs.
You can use -1 to avoid that a pin is used.
I don't want to share any account information. If any one wants to donate hardware, just tell me and I send my address in a personal message. Shops on AliExpress can deliver to any address, other shops should be able, too.
I toy around with a TTGO/LLGO LilyGo_T5_V2.3 250x122 epaper display. I use GxEPD, display uses the GxGDEH0213B73.h controller and works totally fine with full update() but looks shitty with partial updateWindow().
I played around with window sizes, align to (%8==0) sizes, but obviously I'm fishing in the dark.
the physical x direction of your display is the short side of the panel.
The start and width of a partial window should be a multiple of 8 in the physical x direction, else it is increased.
That's all I can tell with the limited information you provide.
But I should add this: with GxEPD you need to do an initial full update followed with a partial update of the full screen, before you do any partial window updates. The controller of the GDEH0213B73 has a quirk that makes this especially important. This is handled automatically in GxEPD2.
I recommend GxEPD2 for new users or new projects. It is also available through Library Manager.
ZinggJM:
...
But I should add this: with GxEPD you need to do an initial full update followed with a partial update of the full screen with the same content, before you do any partial window updates. The controller of the GDEH0213B73 has a quirk that makes this especially important. This is handled automatically in GxEPD2.
I'll see that I can create a small example. But before I want to switch to GxEPD2 and test that.
And there we have a problem: I tried condensing GxEPD2_Example to my needs... After multiple checks that my display settings are valid the display still was not working, I found that
display.init(115200);
stops execution. Switch to
display.init();
and everything is wonderful.
Seems to be a known unfixed bug in esp32 code of Serial.end() called by Serial.begin().... (Platform: esp32, dev-modul, 1.0.5-rc2)
I'm working with other guys on an opensource and openhardware variometer.
We offer it with a 1.54 "or 2.9" screen. We use your library for display. Unfortunately, some makers have received new 2.9 "screens which do not support the current libraries because the driver is an SSD1680. Is it possible to send you one of these screens to create a new class?
I understand that you don't like TTGO too much but we don't always know in advance which brand the screen is. But before we design a complete board where we can choose each component, we have to undergo.
The screen that I own is a black and white DEPG0290BNS800F6 from DKE manufacturer.
I tried this screen with the library offered by the good-display GDEM029T94 screen and it works.
I think a class adapted with the code from the Good diplay screen would work but if you don't want the DKE screen we will try to find a solution.
I hope you can help us because it is a pain for our project.
With this information I believe I could add support for this e-paper display to GxEPD2, if I get either the board or the panel. As the panel works with the TTGO V5, it has the same pinout as the other panels from Good Display or Waveshare, I assume.
Please send me a PM if you want to provide the board or the panel, then I answer with my address.
I can't give a guarantee to successfully add support, nor a time schedule when it will be added.
But once I have it, it is in my own interest to get it working.
BTW, I am interested to revise my feeling about devices from TTGO. Maybe I bought too early from them.
Obviously they are good at providing interesting hardware. One of their newer devices nearly made it to me, it just arrived at swiss post customs handling.
Good day Jean-Marc,
I'm trying to make a small test program to use in multiple screens: 800x600, 6inch E-Ink display HAT (IT8951 Driver HAT)
Each screen can work on its own but when I compile the total program for both I have an error message: Compilation error for the Arduino Due board (programming Port)
#define ENABLE_GxEPD2_GFX 0
#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <U8g2_for_Adafruit_GFX.h>
//****************************************Définition objet écran eink avec brochage*********************************************
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT> display1(GxEPD2_it60(/*CS=5*/ 10, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT> display2(GxEPD2_it60(/*CS=5*/ 20, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
//********************************déclaration de la bibliothèque U8g2 pour adafruit********************************************
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts;
void setup()
{
Serial.begin(115200);
display1.init(115200);
display2.init(115200);
u8g2Fonts.begin(display1); // connect u8g2 procedures to Adafruit GFX
u8g2Fonts.begin(display2); // connect u8g2 procedures to Adafruit GFX
annonce1 ();
annonce2 ();
}
void loop()
{
}
void annonce1 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts.setFontDirection(3); // left to right (this is default)
u8g2Fonts.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts.setBackgroundColor(bg); // apply Adafruit GFX color
display1.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display1.fillScreen(bg);
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("BONJOUR");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("Jean-Claude");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("SD-1");
}
while (display1.nextPage());
delay (5000);
}
void annonce2 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts.setFontDirection(3); // left to right (this is default)
u8g2Fonts.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts.setBackgroundColor(bg); // apply Adafruit GFX color
display2.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display2.fillScreen(bg);
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("BONJOUR");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("Jean-Claude");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("SD-1");
}
while (display2.nextPage());
delay (5000);
}
Thank you for your help because I have no idea
best regards
I am quite sure there was some more information about the error, possibly in red.
The Arduino Due has lots of RAM, more than I expected, but two full buffers for these displays don't fit, I think.
Use half HEIGHT page buffers, and it should compile.
You need one instance of U8G2_FOR_ADAFRUIT_GFX for each display.
Otherwise all output will go to the last display you connected with begin().
Good day Jean-Marc,
I did a test by adding the memory limitation lines: #define MAX_DISPLAY_BUFFER_SIZE 7500ul // ~ 15k is a good compromise #define MAX_HEIGHT (EPD) (EPD :: HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD :: WIDTH / 8)? EPD :: HEIGHT: MAX_DISPLAY_BUFFER_SIZE / (EPD :: WIDTH / 8))
(see the program below)
But the result is the same and I still have the error when compiling
See the program below
But the result is the same and I still have the error when compiling
Regarding the instance of U8G2_FOR_ADAFRUIT_GFX for each display
I had realized these two lines:
u8g2Fonts.begin (display1);
u8g2Fonts.begin (display2);
If this is not enough I do not know how to write more command lines, what more should I write?
#define ENABLE_GxEPD2_GFX 0
#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <U8g2_for_Adafruit_GFX.h>
#define MAX_DISPLAY_BUFFER_SIZE 7500ul // ~15k is a good compromise
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
//****************************************Définition objet écran eink avec brochage*********************************************
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT> display1(GxEPD2_it60(/*CS=5*/ 10, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT> display2(GxEPD2_it60(/*CS=5*/ 11, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
//********************************déclaration de la bibliothèque U8g2 pour adafruit********************************************
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts;
void setup()
{
Serial.begin(115200);
display1.init(115200);
display2.init(115200);
u8g2Fonts.begin(display1); // connect u8g2 procedures to Adafruit GFX
u8g2Fonts.begin(display2); // connect u8g2 procedures to Adafruit GFX
annonce1 ();
annonce2 ();
}
void loop()
{
}
void annonce1 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts.setFontDirection(3); // left to right (this is default)
u8g2Fonts.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts.setBackgroundColor(bg); // apply Adafruit GFX color
display1.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display1.fillScreen(bg);
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("BONJOUR");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("Jean-Claude");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("SD-1");
}
while (display1.nextPage());
delay (5000);
}
void annonce2 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts.setFontDirection(3); // left to right (this is default)
u8g2Fonts.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts.setBackgroundColor(bg); // apply Adafruit GFX color
display2.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display2.fillScreen(bg);
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("BONJOUR");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("Jean-Claude");
u8g2Fonts.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts.print("SD-1");
}
while (display2.nextPage());
delay (5000);
}
I put the details of the compilation in attachment which indicates the errors
Thank you for your help
Jean-Claude
//********************************déclaration de la bibliothèque U8g2 pour adafruit********************************************
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts_for_dispay1;
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts_for_dispay2;
I tried to modify the program according to your precious indications because I did not know and I would not have dared to modify these lines on my own.
The program is now compiled and I am trying it with only one screen by alternately changing the CS pin to 10 or 11
but the program "annonce1" for screen 1 works correctly but the program "annonce2 for screen 2 does not produce anything even though the CS pin is changed.
I don't understand if you see a problem thanks for your help
I have tried aligning the lines of the program but i dont know if this is correct indentation
//****************************************Librairies eink 6"***********************************************************************
#define ENABLE_GxEPD2_GFX 0
#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <U8g2_for_Adafruit_GFX.h>
#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
//****************************************Définition objet écran eink avec brochage*********************************************
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT/2> display1(GxEPD2_it60(/*CS=5*/ 10, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT/2> display2(GxEPD2_it60(/*CS=5*/ 11, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
//********************************déclaration de la bibliothèque U8g2 pour adafruit********************************************
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts_for_display1; // pour l'écran1
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts_for_display2; // pour l'écran2
//U8G2_FOR_ADAFRUIT_GFX u8g2Fonts; // lorsqu'il n'y a qu'un écran par défaut
void setup()
{
Serial.begin(115200);
display1.init(115200);
display2.init(115200);
u8g2Fonts_for_display1.begin(display1); // connect u8g2 procedures to Adafruit GFX
u8g2Fonts_for_display2.begin(display2); // connect u8g2 procedures to Adafruit GFX
annonce2 ();
annonce1 ();
}
void loop()
{
}
void annonce1 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts_for_display1.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts_for_display1.setFontDirection(3); // left to right (this is default)
u8g2Fonts_for_display1.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts_for_display1.setBackgroundColor(bg); // apply Adafruit GFX color
display1.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display1.fillScreen(bg);
u8g2Fonts_for_display1.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display1.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display1.print("BONJOUR");
u8g2Fonts_for_display1.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display1.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display1.print("Jean-Claude");
u8g2Fonts_for_display1.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display1.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display1.print("SD-1");
}
while (display1.nextPage());
delay (5000);
}
void annonce2 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts_for_display2.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts_for_display2.setFontDirection(3); // left to right (this is default)
u8g2Fonts_for_display2.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts_for_display2.setBackgroundColor(bg); // apply Adafruit GFX color
display2.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display2.fillScreen(bg);
u8g2Fonts_for_display2.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display2.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display2.print("BONJOUR");
u8g2Fonts_for_display2.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display2.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display2.print("Jean-Claude");
u8g2Fonts_for_display2.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display2.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display2.print("SD-1");
}
while (display2.nextPage());
delay (5000);
}
I don't work at this time, so I might check tomorrow.
But I ask the following questions:
Did you observe diagnostic output in Serial Monitor? This might help to analyze.
How did you wire the BUSY lines of your 2 displays? Do you use wired-or?
With only 2 displays you would have enough pins for separate BUSY connections
Irrelevant for your test with only one display.
You could add some "normal" output, directly using display2. , to see if it is related to U8G2_for_Adafruit_GFX.
This is it, it works correctly, great.
I changed as you expected CS and BUSY and immediately it works fine.
I am also attaching the serial output to you.
I put the modified code below
//****************************************Librairies eink 6"***********************************************************************
#define ENABLE_GxEPD2_GFX 0
#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <U8g2_for_Adafruit_GFX.h>
#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
//****************************************Définition objet écran eink avec brochage*********************************************
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT/2> display1(GxEPD2_it60(/*CS=5*/ 10, /*DC=*/ 100, /*RST=*/ 9, /*BUSY=*/ 7));
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT/2> display2(GxEPD2_it60(/*CS=5*/ 11, /*DC=*/ 100, /*RST=*/ 9, /*BUSY=*/ 8));
//********************************déclaration de la bibliothèque U8g2 pour adafruit********************************************
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts_for_display1; // pour l'écran1
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts_for_display2; // pour l'écran2
//U8G2_FOR_ADAFRUIT_GFX u8g2Fonts; // lorsqu'il n'y a qu'un écran par défaut
void setup()
{
Serial.begin(115200);
display1.init(115200);
display2.init(115200);
u8g2Fonts_for_display1.begin(display1); // connect u8g2 procedures to Adafruit GFX
u8g2Fonts_for_display2.begin(display2); // connect u8g2 procedures to Adafruit GFX
annonce2 ();
annonce1 ();
}
void loop()
{
}
void annonce1 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts_for_display1.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts_for_display1.setFontDirection(3); // left to right (this is default)
u8g2Fonts_for_display1.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts_for_display1.setBackgroundColor(bg); // apply Adafruit GFX color
display1.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display1.fillScreen(bg);
u8g2Fonts_for_display1.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display1.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display1.print("BONJOUR");
u8g2Fonts_for_display1.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display1.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display1.print("Jean-Claude");
u8g2Fonts_for_display1.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display1.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display1.print("SD-1");
}
while (display1.nextPage());
}
void annonce2 ()
{
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts_for_display2.setFontMode(1); // use u8g2 transparent mode (this is default)
u8g2Fonts_for_display2.setFontDirection(3); // left to right (this is default)
u8g2Fonts_for_display2.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts_for_display2.setBackgroundColor(bg); // apply Adafruit GFX color
display2.firstPage();
// mettre les paramètres
do // réaliser l'action
{
display2.fillScreen(bg);
u8g2Fonts_for_display2.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display2.setCursor(200, 420); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display2.print("BONJOUR");
u8g2Fonts_for_display2.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display2.setCursor(400, 500); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display2.print("Jean-Claude");
u8g2Fonts_for_display2.setFont(u8g2_font_logisoso58_tf);
u8g2Fonts_for_display2.setCursor(600, 360); // démarrage position premier chiffre position verticale 0 le plus en haut 800 le plus en bas deuxième chiffre position horizontale inverse 600 est le plus à gauche et 0 le lus à droite
u8g2Fonts_for_display2.print("SD-111");
}
while (display2.nextPage());
}