Arduino Sketches

ArduinoAtHeart_top

The littleBits Arduino at Heart module

Ready to take your Arduino module for spin? Before jumping into the sketches below, get up to speed on the basics by checking out our Setup Tutorial.

The first 8 sketches can be made with the modules in the Arduino Starter Bundle

1. Blink
Make your LED blink! This is the classic “getting started” sketch for Arduino beginners. Alter the code to speed up or slow down the pace of the pulse.

IMG_2859

2. Hold an On/Off state
Detect when a button changes from off to on and on to off.

IMG_2860 copy

3. “Blink” Speed Control
Use an analog input to control how fast your output “blinks”.

IMG_2861 copy

4. LED Fading Effect
Learn how to create a “breathing effect” on your LED.

IMG_2861 copy

5. Servo Sequence Recorder
This project, designed by littleBits Evangelist, Glenn Mossy, will repeat a sequence that you create and then play it back on your servo module! It will loop until you press the record mode button again.

IMG_2978 copy

6. DIY Etch A Sketch
Use two dimmers to draw on your computer screen, just like an Etch-a-Sketch.

Etch-a-sketch.Still003

7. Analog Pong
Play pong on your computer screen using two analog sensor modules as inputs.

littleBits_Arduino_pong

8. DIY Computer Mouse
Control your mouse (computer, not pet) with your littleBits Arduino module!!!

IMG_2865 copy

If you have a speaker module, you can make the following sketches:

9. Play A Melody
Upload this sketch to your Arduino module to play the Jeopardy theme song.

IMG_2864 copy

10. Change The Pitch
Use an analog input to generate a pitch on your speaker.

IMG_2862 copy

 

Click here for more tips & tricks.

For support check out the littleBits and Arduino forums.

To learn more about coding, find examples on Arduino’s website.