First Plugin and Code Upload


Walkthrough Video

Build and upload your first program to Buzz!

Code

The code in the editor below is ready to run! After you have plugged in Buzz and have a green power light, hit 'Upload Your Code' and after you see "Success!", Buzz should look like he does at the end of the video above.


/* Set random LED wing pixels to random color values */ #include "LEDStrip.h" //The LEDStrip.h library gives your code access to special functions exclusive to the LED Pixels LEDStrip wings = LEDStrip(16, A4, A5); //Set up the strip by defining how many pixels (16) and where it's connected to Buzz (always A4 and A5) void setup(){} void loop() { wings.setPixel(random(0,16),random(0,300)); //Set a random pixel including 0-15 to a random color including 0-299 wings.draw(); //send the setPixel data to the wings to be displayed delay(1000); //Wait 1000 milliseconds before starting the loop again } // (c) 2023 Let's Start Coding. License: www.letsstartcoding.com/bsdlicense
 

Challenges

Can you complete the challenge? Change the code in your code editor above. Upload your code to see the effect when you're finished. Complete a challenge? Check it off the list!

Concepts

These are the new code concepts covered in this example program. To become a great coder, read through these concepts to learn new vocabulary.

Quiz

If you're having trouble, try to run an experimental program or look at the example code to help you find the answer.

1. Which syntax ends the entire 'void loop' function?




2. Which syntax ends a single code command?



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 your board is plugged in snugly and the USB cable is turned correctly - the stripes on the green sticker align with the metal stripes on Maker Board. You should see a steady green light on your board when it it powered on.

2) 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.

3) The drop-down menu* at the top of the code editor should say 'LSC Board' for Windows and Mac and something like /dev.tty.... on Chromebook. If it says something else, click the drop-down and select a different option. If the drop-down menu is blank or not clickable, check steps 1 and 2.

*Depending on which version of our software you are using, you may not have a drop-down menu on your code editor.

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 installing the software.

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