#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