| Posted: 10:39am 07 Nov 2022 |
Copy link to clipboard |
 Print this post |
|
Hi Guys
I've updating an old Micromite backpack Sprinkler Control program to work on a MM+ backpack. Trying to make it look better.
I'm stuck on a Spinbox to control the backlight like Geoffs Pump control demo program.
I did the obvious thing... copying the relevant bits of code and massaging it to work on a smaller screen. Some bits of code only work with the SSD1963. Cannot remember which. I've learn't a fair bit going to and fro with the manual but no joy yet.
So I have the Spinbox code below. could you suggest where I've gone wrong please.
Thank you Michael
'SPINBOX TESTING ON MM PLUS Backpack with 2.8" LCD
option explicit
dim integer TS_BRIGHT
TS_BRIGHT=51
CLS GUI Interrupt TouchDown
PWM 2,100,TS_BRIGHT '
'PAGES SETUP GUI SETUP 1 'PAGE 1 SETUP
GUI Caption #1, "Backlight", 22, 100, ,RGB(200,200,255),0
pause 1000 ' delay to help see whats going on
GUI Spinbox TS_BRIGHT, 10, 150, 200, 50,,,2, 2, 100 'CtrlVal(TS_BRIGHT) = 100
Do : Loop
Sub TouchDown TEXT 10,10,STR$(ts_bright),LM,1,2,RGB(BLACK),RGB(GREEN)'Shows the value changing or not 'Case TS_BRIGHT ' the brightness spin box 'BackLight CtrlVal(TS_BRIGHT) PWM 2,100,TS_bright 'END SELECT End Sub
|