![]() This code will step through the six primary and secondary colors, plus white and black. Serial.println("Basic Color Mixing w/ a Common Cathode RGB LED") while (!Serial) // Comment out to wait for serial port to connect to Serial Monitor. Serial.begin(9600) //initialize Serial Monitor ![]() Create integer variables for our LED pins: #define DEBUG 1 //1 = LEDs w/ serial output debug mode, comment one of these lines out using a syntax for a single line comment: // in various combinations to create eight primary and secondary colors. ![]() This example uses digitalWrite() to turn the three LEDs on and off This example uses a tri-color, also known as an RGB This code is released under the MIT License () Written by: Gella and Ho Yun "Bobby" ChanĬreate primary and secondary colors on the tri-color (Red/Green/Blue) LilyPad Tri-Color LED: Basic Color Mixing Select LilyPad USB Plus if following along with the LilyPad ProtoSnap Plus.Ĭopy and paste the following code into the Arduino IDE and upload it to your LilyPad Arduino. The LilyPad Arduino Simple, LilyPad Arduino, and LilyPad Development Board, and Development Board Simple all use a LilyPad ATmega 328. Choose LilyPad Arduino USB if using a LilyPad Arduino USB. ![]() Upload the following code to your LilyPad Arduino, making sure to select the correct LilyPad board from the drop down menu below. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |