Code: RGB LED
Code to make the 3 Colour LED change between red, green, blue, white. Put resistors between the pin inputs and the led pins. If you use the right resistors then the colours will be more precise. // Use Resistors…
Code to make the 3 Colour LED change between red, green, blue, white. Put resistors between the pin inputs and the led pins. If you use the right resistors then the colours will be more precise. // Use Resistors…
/* circuit: * 8-ohm speaker on digital pin 8 * photoresistor on analog 0 to 5V * 4.7K resistor on analog 0 to ground created 21 Jan 2010 by Tom Igoe This example code is in the public domain. …
/* * 8-ohm speaker on digital pin 8 created 21 Jan 2010 by Tom Igoe This example code is in the public domain. */#define NOTE_B0 31#define NOTE_C1 33#define NOTE_CS1 35#define NOTE_D1 37#define NOTE_DS1 39#define NOTE_E1 41#define NOTE_F1 44#define NOTE_FS1…
#define ON HIGH#define OFF LOWvoid setup() { pinMode(13, OUTPUT); }void loop() { digitalWrite(13, ON); delay(1000); digitalWrite(13, OFF); delay(1000); }