ILI9488 drivers: MM2 and MM+

Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1927
 Posted: 03:19am 25 Nov 2022

' LCD Panel Tester
Print "Screen Colours Counter Pixel Test"
Dim a\$(2)=(" Blues"," Greens"," Reds")
Dim integer b, c, n
CLS 127<<8
Text 30, MM.VRes *.8, "   Pixel Test    ",,, 2, RGB(white), RGB(0,0,127)
For b = 0 To 16 Step 8
n = 0
For c = 0 To 255
Pixel c+30, b+25, c << b
If  Pixel(c+30,b+25) = c << b Then Inc n
Next
Print
Print n; a\$(b/8); " ="; Log(n)/Log(2); " bits"
Text MM.HRes/2,MM.VRes/2-b*4,Str\$(n)+a\$(b/8)+" = "+Str\$(Log(n)/Log(2))+" bits",C,,2,255<<b
Next
Print
Pause 3000

Print "Blit test"
For v = 0.6 To 0.3 Step -.1
Pause 500
Blit 10, MM.VRes*.2, 10, MM.VRes*v, MM.HRes-20, MM.VRes*.3
Box 10, MM.VRes*v, MM.HRes-20, MM.VRes*.3
Next
Text 30, MM.VRes *.8, "    Blit Test    ",,, 2, RGB(white), RGB(0,0,127)
Pause 3000

Print "SD Card test"
Text 30, MM.VRes *.8, "           SD Card Test          ",,, 2, RGB(white), RGB(0,0,127)
Save Image "SD Card Test.BMP", MM.HRes*.2, MM.VRes*.2, MM.HRes*.3, MM.VRes*.7
Pause 2000
For v=.1 To .4 Step .1
Load Image "SD Card Test.BMP", MM.HRes*v, mm.2res*.2
Pause 500
Box  MM.HRes*v, mm.2res*.2, MM.HRes*.3, MM.VRes*.7
Next
Pause 3000

Print "Touch Test"
n=0
Box .8*MM.HRes, .8*MM.VRes, .2*MM.HRes, .2*MM.VRes, 5, RGB(white), RGB(red)
Text .9*MM.HRes, .9*MM.VRes, "EXIT", CM,, 2, RGB(white)
Text 30, MM.VRes *.8, "Touch Test - draw  now",,, 2, RGB(white), RGB(0,0,127)
Do
Pixel Touch(x),Touch(y),RGB(white)
If Touch(x)>.8*MM.HRes And Touch(y)>.8*MM.VRes Then n=1
Loop Until n

Edited 2022-11-25 21:04 by phil99