7fc43402 2efb 4f27 9763 e788d858d304

invention

Blink

by littleBits

Published on May 15, 2014

Make your LED blink!

*To complete this exercise, you will need to download the Arduino software.

This is the classic “getting started” sketch for Arduino beginners. Alter the code to speed up or slow down the pace of the pulse.


For more “getting started” sketches, click here.

For support check out the littleBits and Arduino forums.

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


How To Make It

STEP 1

Download the Arduino software to your computer (it's free!) and open the "Blink" sketch. The Blink sketch can be found on this page in the "other files" section.

STEP 2

Build your circuit (see the photo gallery for an image of the setup). Make sure the bargraph is connected to the D5 output pin.

STEP 3

Plug the micro USB cable into both the Arduino module and a USB port on your computer.

STEP 4

Turn your power module on. You should see a red light illuminate on the power module and a yellow light flash on your Arduino module.

STEP 5

In the Arduino program, select your board. Go to Tools>Board>Arduino Leonardo. This littleBits Arduino module is modeled after the Arduino Leonardo and is therefore compatible.

STEP 6

Next select the serial port that the Arduino will communicate over by going back to "Tools" and selecting the correct port in the "Port" section. The name of the port will depend if you are on a Mac or Windows computer. On a Mac, it will start with /dev/tty.usbmodem... and a PC will start with COMM… In Windows, you can look for the USB serial device in the ports section of the Windows Device Manager. If you are on a Linux machine, the port will look like /dev/ttyUSB…

STEP 7

To upload the Arduino sketch to your Arduino module, press the arrow button in the top left corner of the screen. You will see a blue bar at the bottom of the window that says "compiling sketch", and you should see two yellow lights flash on your Arduino module when this happens. The upload is complete when you see "done uploading" at the bottom of your sketch window.

STEP 8

Once the program is uploaded, you will see that your bargraph is blinking.

STEP 9

To change the speed and gaps between blinks, experiment with the code. You can change the timing of how long the light stays on and the timing in between.

Related Projects

GrindersTea

The GrindersTea is a new electric grinder which allows you to grind all different kind of tea very easily and quickly. This Grinde...

Door Lock + Buzz Cup

Read all about it here: http://blog.thewhatif.co/2013/08/littlebits-what-if.html

Kibbles and (Little) Bits

We made a dog that becomes increasingly hungry as its food bowl becomes full. As you give him food, the dog will light up and craw...