Hello,
I'm trying to make the following script work:
Define PinMode Pin0 As DigitalInputPullDown
Class PIR
Shared Event Boot()
LedGreen = False
LedRed = False
End Event
Shared Event Pin0RisingEdge()
LedRed = True
Thread.Sleep(100000)
LedRed = False
End Event
Shared Event Pin0FallingEdge()
LedGreen = True
Thread.Sleep(100000)
LedGreen = False
End Event
End Class
The issue is that with the latest availble versions of the different softwares, only the FallingEdge event is executed.
The green LED lights as expected on FallingEdge events, but nothing happens on RisingEdge events.
If I comment the falling edge event, then the rising edge event is executed on rising edges: the red LED lights!
My question is: why this behavior? What am I missing? How can I script the behavior "red LED on rising edge on pin 0, green LED on falling edge on pin 0"?
Thanks!