Skip to content

Instantly share code, notes, and snippets.

@marcotchella
Last active November 3, 2015 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcotchella/8141f0d6f9da69987243 to your computer and use it in GitHub Desktop.
Save marcotchella/8141f0d6f9da69987243 to your computer and use it in GitHub Desktop.
/*
03/11/2015
Controle de LED RGB com Arduino UNO
Mais informações em:
https://fazerlab.wordpress.com/
*/
void setup() {
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(11, HIGH);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
}
void loop() {
analogWrite(9, 0); //vermelho
analogWrite(10, 100); //verde
analogWrite(11, 100); //azul
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment