If you're new to coding, welcome! It's a whole new universe, which can be exciting....and a little daunting. That's why we provide you with a ton of example code and clear project instructions. Everything you'll build can be used as a building block for something more complex. First, watch this video explaining the different parts of a program and how you can modify code. 

Here are a few projects that will help you get started if you're just not sure where to begin. Completing these will help you get more familiar with the components, uploading code, and making changes. Once you have the hang of it, you can build at any pace you'd like. 

All of the projects referenced here are for Base Kit. If you have a Starter Kit (Maker Board 'stands up' when plugged in to Carrier), you'll find that some of the pictures and pin instructions are slightly different.

1) Blink Alternating LEDs

Here, you'll plug in two LEDs and get used to looking for which leg goes into which pin. If you have any trouble, double-check that you have a snug fit of the LED and that you have the LED in the correct-numbered socket. 

In the program, observe how the code commands are stacked on top of each other. If you don't have a delay, the code will run very quickly- so quickly that it looks like the blink happens simultaneously. 

Try changing the number between the parentheses of each delay(). What does delay (10) look like? What about delay(10000)?

Try moving the LED from pin 11 to pin 3. Change the number 11 to 3 everywhere in the code. Can you make it work?

2) Hold Button to Turn LED On

In this program, you add an input to the code in the form of a button. Line it up with one leg in A5 and the other in any port in the GND row- they are all the same. You can bend the legs of the button a little to make it fit. 

Look at the code and see the if-else statements in there. You're taking similar statements from 1)  and tucking them inside a statement. This is how the code 'makes decisions'. If you want to learn more about how to correctly use an if-else statement, go to the Code Index. You can find a link to the code index at the bottom of every page on this website.

3) Multi-color Glow Lamp

Using a multicolor LED, you'll see how code can go beyond simply 'on or off' commands with analogWrite(). You will also see how an equation can be helpful to create a lamp effect that would be very difficult to code by hand. 

Don't worry too much about understanding every part of the equation and program if you're just getting started. But notice that we are using words in the place of some numbers here. brightness and fade are variables. They'll become more important to you as you continue to code. 

Try changing the value of 'fade' in the program at the very top. Re-upload the code and see how it changes the effect of the light. 

4) Press a Button to Play a Tone

Using the last 'new' component in Base Kit, plug speaker in to Carrier Board. The legs are reversible, so you can't get it backward. 

Your button will trigger an action with the same format that you used turn the LED on in 2). However, you'll see a new command here: tone. Different components require different commands, but we have documented the most common ones in the Code Index under 'functions'.

Try playing with the second value inside the parentheses of tone. Change it and see how the sound changes. 

Moving forward

There you have it! With these building blocks, you've seen every component in Base Kit and many of the code concepts you'll use. With what you've already built at this point, you can probably build the Four Note Piano, Cycle LED Colors with Button, and Countdown LED and Speaker Alarm.

You also have seen some of the resources we offer on the site to help you get through each project and prompt you to make changes. Come back to these resources as often as you need to! You can also download a code cheat sheet that covers the most common things you'll see in our code.

More Advanced Programs

If you're trying to learn code (and we hope you are!), there are some programs that are really fun to modify after you've had some experience playing around. You should still build them to see how they work, but these may be difficult to understand at first: Morse Code, LED Blink Clock, Fade, and Sound Samples.