Code :
Partial Public Class Program ‘Playing with Cerberus and the Motion Module Private WithEvents timer As GT.Timer = New GT.Timer(1000) Public Sub ProgramStarted() timer.Start() End Sub
Private onSenseSeconds As Integer = 10 Private Sub motion_Sensor_Motion_Sensed( ) Handles motion_Sensor.Motion_Sensed If onSense Then Exit Sub onSense = True led7r.Animate(100, False, True, False) led7r.TurnLightOn(7, True) End Sub
PulseDebugLED() If onSense Then onSenseSeconds += 1 If onSenseSeconds > 10 Then onSenseSeconds = 0 onSense = False led7r.TurnLightOff(7) End If End If End Sub End Class
|
🙂 PepLluis,