Sub SpeedMotorTimer_Tick
If SpeedMotor.AnalogRead > 5 And Not(SpeedMotorStatus) Then
'blink fast
Start_Blink(100)
'already send message
SpeedMotorStatus = True
'if speed is ok then START
Else If SpeedMotor.AnalogRead < 5 Then
'maybe for future
SpeedMotorStatus =False
'timer not needed
SpeedMotorTimer.Enabled = False
'blinking slow
Start_Blink(400)
Log("Speed setting already")
'go to main loop
CallSubPlus("MainSub",0,0)
Log("I'm back...")
End If
End Sub
Sub MainSub
Do While True
If SpeedMotor.AnalogRead > 1000 Then
Exit
End If
Loop
Log("Still in MainSub")
Start_Blink(1000)
End Sub