Using a 2.9 inch E-Paper Display with ARDUINO

DonManfred

Expert
Licensed User
Longtime User

Daestrum

Expert
Licensed User
Longtime User
I converted some java to B4J for Floyd-Steinberg dithering - it doesn't currently output any data for e-paper, that's the next step, but it does show what the image will look like.

(Ignore the scrappy code - source contains the original java code I converted to B4J)
 

Attachments

  • dithering.zip
    6 KB · Views: 111

Marc DANIEL

Well-Known Member
Licensed User
Last edited:

Marc DANIEL

Well-Known Member
Licensed User
I tried to switch back to B4X as per Klaus and CableGuy's wishes, so I found the font (rAdafruitGFX) that EREL had already put online since January 16, 2017 and then tried to use the rLCDWIKI_SPI library to run my 2.9 inch E-Paper display. My trial and error only resulted in a blink ending in a screen with a mix of mostly red pixels.

So I leave it to the experts to correct the situation!?
See you soon guys ...

EPaper2:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region

'pin usage As follow:

' GND > GND
' VCC X 5V or 3,5V
' SDI = SDA = MOSI > D51 (MEGA2560) or > D11 (UNO)   
' SCK = SCLK = SPI SCK = SCL > D52 (MEGA2560) or > D13 (UNO)
' CS > D10
' DC = D/C > D9
' RST = RESET > D8
' BUSY = OCCUPÉ > D7

Sub Process_Globals
    Public Serial1 As Serial
    Public EPaper As LCDWIKI_SPI
    Public Font As AdafruitGFX
    Public H, W As Int
    Private model As UInt = 2560
    Private CS As Byte =   10
    Private CD As Byte =   9
    Private  RST  As Byte = 8     
    Private  LED As Byte =  -1   
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    EPaper.Initialize1(model, CS, CD, RST, LED)
    EPaper.Init_LCD
    Log("Let's go !")
    AddLooper("Affichage")   
End Sub

Sub Affichage
    EPaper.Fill_Screen(EPaper.WHITE)
    EPaper.Get_Display_Height
    EPaper.Get_Display_Width
    EPaper.Fill_Rect(0, 0, EPaper.Get_Display_Width, EPaper.Get_Display_Height, 10)
    Font.ConfigureText(2,9,False)
    EPaper.Set_Text_Mode(True)
    
    'EPaper.Print_String("Welcome to B4X !", 0, 32)
    EPaper.write(" Welcome to B4X !")
    EPaper.Set_Rotation(3)
    Delay (5000)
    
End Sub
 

Attachments

  • EPaper2.zip
    1.1 KB · Views: 127

Daestrum

Expert
Licensed User
Longtime User
Could it be you are refreshing too quickly, they recommend refreshing every 180 seconds or more, looks like your loop does it every 5 seconds.
 

Marc DANIEL

Well-Known Member
Licensed User
Could it be you are refreshing too quickly, they recommend refreshing every 180 seconds or more, looks like your loop does it every 5 seconds.
Possible, I continue to experiment. I will come back to the forum when things are better. Thank you for your comment.

But I'm afraid that LCDWIKI SPI library won't work with classic ARDUINO UNO and MEGA2560 boards
 

Attachments

  • LCDWIKI SPI lib Supported display modules&controllers.zip
    178.7 KB · Views: 133
Last edited:

Marc DANIEL

Well-Known Member
Licensed User

Attachments

  • AnywhereB4X.zip
    721 bytes · Views: 116
Last edited:

Marc DANIEL

Well-Known Member
Licensed User

Attachments

  • B4A NodeMCU WiFi UDP.rar
    2.9 KB · Views: 123
Last edited:

Marc DANIEL

Well-Known Member
Licensed User
In fact, this ESP8266 E-Paper Waveshare board is a driver board from the NodeMCU family suitable for managing electronic labels, the same libraries are used and the connection with ARDUINO-IDE is done with the same board: "NodeMCU 1.0 (ESP-12E Module)"

e-Paper-ESP8266-Driver-Board-details-size.jpg


I am waiting to receive this module so I can continue my tests with the E-Paper - E-Ink screens

connexions.png
 
Last edited:

Marc DANIEL

Well-Known Member
Licensed User
Connection pins between an E-Paper screen and the NodeMCU module


Pins.png


Window for selecting images to convert from the Chrome browser (preferably) connected to the ESP8266 module :

PicturesSelect.png


Convert.png
 
Last edited:

Marc DANIEL

Well-Known Member
Licensed User
Depending on the model of E-Paper E-Ink Screen you have, you may need a connection adapter: "the E-Ink Universal Driver Hat"


Adaptateur.jpg


E-Paper_Hat_Connexion.jpg
 
Last edited:

Marc DANIEL

Well-Known Member
Licensed User
Hi guys, I received my E-Paper ESP8266 Driver Board today. I have already successfully tested 2 examples provided for a 2.66 inch E-Paper which I directly connected to this new card ...

I unplugged the connector strip located under my 2.66 inch e-label to plug it directly into the ESP8266 E-Paper module

2.66inches-E-PaperVerso.jpg


 
Last edited:

Marc DANIEL

Well-Known Member
Licensed User
At the moment I cannot correctly install the "Loader.ino" application, an IP number problem (Lines 28 and 29 incorrect).
I continue to fumble. The advice found on the Waveshare video does not correspond to the reality of the files downloaded.

So, I haven't yet been able to perform an image conversion from my Smartphone to the connected E-Paper screen
 

Attachments

  • Loader.zip
    32.2 KB · Views: 95

Daestrum

Expert
Licensed User
Longtime User
This is what I have in my Loader.ino
B4X:
  IP4_ADDR(&info.ip, 192, 168, 0, 189); // ip address to use on my network
  IP4_ADDR(&info.gw, 192, 168, 0, 0);  // gateway address of my network
  IP4_ADDR(&info.netmask, 255, 255, 255, 0); // netmask
 

Marc DANIEL

Well-Known Member
Licensed User
This is what I have in my Loader.ino
B4X:
  IP4_ADDR(&info.ip, 192, 168, 0, 189); // ip address to use on my network
  IP4_ADDR(&info.gw, 192, 168, 0, 0);  // gateway address of my network
  IP4_ADDR(&info.netmask, 255, 255, 255, 0); // netmask
Thank you, I will carry out new tests by changing these lines! Sincerely
 

Daestrum

Expert
Licensed User
Longtime User
Does your phone not find the device?

The only other lines I changed were for the SSID and Password for my wifi
 
Top