Skip to content

Instantly share code, notes, and snippets.

@jpliew
Created March 25, 2020 06:02
Show Gist options
  • Save jpliew/c2eeb2feb1fb861a5e33264fc660182e to your computer and use it in GitHub Desktop.
Save jpliew/c2eeb2feb1fb861a5e33264fc660182e to your computer and use it in GitHub Desktop.
Tutorial 3 - 1B
int pinR = 10;
int pinG = 9;
int pinB = 11;
int valueX;
void setup() {
pinMode(pinR, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinB, OUTPUT);
}
void loop() {
valueX = random(0,255);
analogWrite(pinR, valueX);
delay(100);
valueX = random(0,255);
analogWrite(pinG, valueX);
delay(100);
valueX = random(0,255);
analogWrite(pinB, valueX);
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment