In this sketch I'm trying to get the last color in the sketch, (green) to flash.
Could someone add into this sketch the code to affect the
low times?
It's just goes on 255 right now of course for 500ms, with no 'low' times.
int redPin = 11;
int greenPin = 10;
int bluePin = 9;
void setColor(int red, int green, int blue)
{
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}
void setup()
{
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop()
{
setColor(255, 0, 0);
delay(4000);
setColor(0, 255, 0);
delay(4000);
setColor(0, 0, 255);
delay(4000);
setColor(0,255,0); //I need these to have 100ms LOW Times in between each High time
delay(100);
setColor(0,255,0);
delay(100);
setColor(0,255,0);
delay(100);
setColor(0,255,0);
delay(100);
setColor(0,255,0);
}