I am trying to control a RGB strip light.
Turns LEDs to Red, Waits then White, then waits, then Blue, waits then ALL off then does it again quickly
This code works fine, problem is when I am in this code I miss ANY push buttons (I would have thought that a push it would cause an interrupt and just to the AddListener routine but it seems to miss these pushes when in this loop
Is there a way to Delay and give up control so that if a push button happens I get that interrupt and my AddListener routine gets call?
When I am not in this loop I get the push button interrupts just fine.
Private Sub Patriot Dim LongDelay As Int = 1000
Dim DelayTimes() As Int = Array As Int(LongDelay, 250)
For Each DelayTime As Int In DelayTimes
RPin.AnalogWrite(255)
GPin.AnalogWrite(0)
BPin.AnalogWrite(0)
Delay(DelayTime)
RPin.AnalogWrite(255)
GPin.AnalogWrite(255)
BPin.AnalogWrite(255)
Delay(DelayTime)
RPin.AnalogWrite(0)
GPin.AnalogWrite(0)
BPin.AnalogWrite(255)
Delay(DelayTime)
RPin.AnalogWrite(0)
GPin.AnalogWrite(0)
BPin.AnalogWrite(0)
Delay(DelayTime)
Next
Delay(LongDelay * 3)
End Sub