Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
int LEDRpin = 3;
int LEDGpin = 5;
int LEDBpin = 6;
void setup() {
pinMode(LEDRpin, OUTPUT);
pinMode(LEDGpin, OUTPUT);
pinMode(LEDBpin, OUTPUT);
analogWrite(LEDRpin, 0);
analogWrite(LEDGpin, 0);
analogWrite(LEDBpin, 0);
}
void loop() {
for(int i=0; i<256; i++) {
analogWrite(LEDRpin, i);
delay(5);
}
for(int i=255; i>0; i--) {
analogWrite(LEDRpin, i);
delay(5);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.