Created
August 16, 2019 14:14
-
-
Save ArduinoDiscordBot/ad018a8e6c01b71a1a95ba2afb36e070 to your computer and use it in GitHub Desktop.
Code by kelak1#1222 - Fri Aug 16 2019 14:14:05 GMT+0000 (Coordinated Universal Time)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buttonState = digitalRead(buttonPin); | |
if (buttonState != lastButtonState) { | |
if (buttonState == HIGH) { | |
redValue = random(0,255); | |
greenValue = random(0,255); | |
blueValue = random(0,255); | |
analogWrite(RED, redValue); | |
analogWrite(GREEN, greenValue); | |
analogWrite(BLUE, blueValue); | |
} | |
} | |
digitalWrite(13, buttonState); | |
lastButtonState = buttonState; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment