MrDEB
Well-Known Member
attempting to sequentially
Wanting to avoid using DELAYMS(XXXX) AS IT SCREWS UP THE program. My iterpation is each interval it adds to x. Hoping to use for the delay between letters
turn on the letters R, Y, D, E, R, W, O, D at 1-2 second interval between letters.Wanting to avoid using DELAYMS(XXXX) AS IT SCREWS UP THE program. My iterpation is each interval it adds to x. Hoping to use for the delay between letters
Sub OnTimer()
X = X - 10
End Sub
// initialise the timer module...
Timer.Initialize(2)
// initialise each timer - refresh is every 1000Hz (1ms)...
Timer.Items(Timer1).Interval = 10000 // 100ms
Timer.Items(Timer1).OnTimer = @OnTimer // timer event handler
Timer.Items(Timer1).Interval = 20000 // 2000ms, no event handler
// enable the timers...
Timer.Items(Timer1).Enabled = true
X = 10000
// main program loop...
While true
Timer.Start
For X = 0 To 90000
If X >= 9000 Then //6000 is 5 seconds?
R = 1
EndIf
If X >= 8000 Then
Y = 1
EndIf
If X >= 7000 Then
D = 1
EndIf
If X >= 6000 Then
E = 1
EndIf
If X >= 5000 Then
R_1 = 1
EndIf
If X >= 4000 Then
W = 1
EndIf
If X >= 3000 Then
O = 1
EndIf
If X >= 2000 Then
D_1 = 1
EndIf
Next
If X <= 1000 Then
X = 100000// reset to 100000
End If
Timer.Items(Timer2).Enabled = true
// background flash LED...
Head_light = 1
DelayMS(500)
Head_light = 0
DelayMS(500)