First Plugin and Upload: LED Rainbow Add-On

First Plugin and Code Upload: LED Rainbow Add-On


Walkthrough Video

Watch the video to see how to connect Code Lab Mini and attach any add-on boards you purchased so you can upload your first program!

Skip to 1:20 if you only need information about attaching an add-on board.

Code

The code in the editor below is ready to run! After you have attached your Add-On board, plugged in Code Lab Mini and have a steady power light on both your Code Lab Mini and your Add-On board, hit 'Upload Your Code' and after you see 'Success!' pop up on the code editor, every LED in your Rainbow Add-On should light up green!

P.S. Don't worry about trying to understand this code just yet, that's what the projects are for.


/* Turn on all of the rainbow pixels */ #include "LEDStrip.h" //The LEDStrip.h library gives your code access to special functions exclusive to the Rainbow LED Pixels LEDStrip rainbow = LEDStrip(15, 13, A5); //Set up the rainbow by defining how many pixels (15) and how they are connected. //The info inside these parentheses will never change when using the Code Lab Mini add-on void setup() { } void loop() { rainbow.setPixel(rainbow.All, 200); //use rainbow.All in the place where the pixel number normally goes,then the color (0-300) rainbow.draw(); //Send the setPixel values to the rainbow } // (c) 2023 Let's Start Coding. License: www.letsstartcoding.com/bsdlicense
 


Subscribe to Launchpad emails

Get resources and tips over the next couple of weeks as you get started with your kit!

Which coding kit(s) do you have?*

Having trouble uploading code? Try these steps in order:

1) Make sure you’ve completed the process at www.letsstartcoding.com/start. There are helpful steps there!

2) Make sure your board is plugged in snugly. You should see a steady green light on your board when it it powered on.

3) Try plugging your cable into a different USB port on your computer. If that fixes it, it doesn't mean the first USB port is broken, it may just be that your board didn't establish a connection with your computer the first time.

4) Unplug other USB devices from your computer to ensure nothing is interfering with the connection.

5) If this is your very first time using your kit, you may need to restart your computer after setting everything up, especially if you manually installed drivers on a Windows computer.

Still having trouble? Send us an email at info@letsstartcoding.com with the subject line: First Upload Problem: Code Lab Mini.
Please describe what type of computer you're using and what happened when you tried each step above. We can help!