Introduction: LittleBits Arduino MacBook Air Blink Sketch

Picture of LittleBits Arduino MacBook Air Blink Sketch

Have you tried Littlebits Arduino? It is super simple and straight forward to use.

Step 1: Pull the Littlebits Modules Out of the Kit for the Blink Sketch

Picture of Pull the Littlebits Modules Out of the Kit for the Blink Sketch
  1. Gather the components for the project
    1. 9V Battery + Cable
    2. Power
    3. Bargraph
    4. Arduino
    5. MacBook Air

Step 2: Connect the Littlebits

Picture of Connect the Littlebits

Place battery first ,then attach it to the middle of the LittileBit Aruduino piece. After, add the bargraph to the opposite side of the Arduino. Take the microUSB cable that came with the LittleBit Arduino and connect it to the LittleBit Arduino coonector like in the picture. Connect the full size USB connector to an open USB port on the MacBook Air.

Step 3: Turn on the Power to the Littlebits Arduino Setup

Picture of Turn on the Power to the Littlebits Arduino Setup

After the LittleBits Arduino setup is complete, be sure to turn on the power to the setup as illustrated in the picture.

Step 4: Look for the Arduino Program on Your Computer

Picture of Look for the Arduino Program on Your Computer

Look for your program for aruduino on your desktop .Then, open it. The Arduino program and install instructions can be found here. Arduino Software

Step 5: Leonardo

Picture of Leonardo

First ,click ''Tools" to get your tool bar .To get the right arduino system click board .Then find Arduino Leonadro and click it .It tells the computer if it's littlebits or something else. According to the Littlebits documentation, the Arduino Littebit is compatible the Arduino Leonardo board.

Step 6: Serial Port

Picture of Serial Port

Go again to "Tools" and click "Serial Port". This is so the computer knows how to communicate to the Littlebits Arduino. Select the "/dev/tty.usbmodem411". It may be slightly different for your Mac.

Step 7: Select the Blink Sketch

Picture of Select the Blink Sketch

The Blink Sketch is a basic program that makes the Littlebits Arduino turn the LEDs on the Bargraph blink ON and OFF. Click "File" then "Examples" there you'll find the "Basics" click in then click "Blink" for this Sketch.

Step 8: Set the LED Variable to 5

Picture of Set the LED Variable to 5

When you get the example MAKE SURE TO CHANGE LED VARIABLE TO 5 OR ELSE IT WON'T WORK!! The original Blink Sketch is set to 13. For the LittleBits Arduino, it should be changed to 5. NOTE: There is a swtich below the D5 writing on the Arduino labeled "analog" or "pwm". Be sure your switch is set to PWM. My Arduino was set to "analog" when I first took it out of the box and it took me 30 minutes to figure out it was the switch that was set to the wrong position.

Step 9: Compile and Download the Sketch

Picture of Compile and Download the Sketch

To download to Arduino click "Arrow" as shown in the picture to compile and download the Blink Sketch.You'll see a yellow lights blinking on the Littlebits Arduino for a few seconds - this means it's downloading the Blink Sketch.

Step 10: Program Behavior When Running

Picture of Program Behavior When Running

It will start blinking with all of the lights every second between no LEDs and all the LEDs on the Bargraph module being lit up. You can modify it to change speed of the blinking light .

Step 11: Modify the Duration of LED Blinking

Picture of Modify the Duration of LED Blinking

To modify to a different Blinking rate - look at the example there you'll see two 1000's they each mean a ONE second .You can change it lower or higher and in a fraction of a second. For example I changed the values to 500. That will make the Bargraph blink every half a second when recompiled and downloaded to the Arduino.

Step 12: ENJOY!!

Picture of ENJOY!!

All I can say is "GOOD LUCK BLINKING!!":) Look for more LittleBits Arduino Instructables from me in the future as I get through my LittleBits Arduino kit!

Comments

Arman5592 (author)2014-11-02

You can declare analog inputs as I/O pins in normal arduinos . Might be possible on these too .

NickyG (author)2014-11-01

Thank you Jesus, i figured it out. I would recommend adding a note - to the Step #6. When I selected Select Serial Port. I could not see it in the menu. I had to re-start the Arduino SW to have the computer recognize the port. So, you may want to add that recommendation. In step 7. I would recommend making sure the "Examples" Menu picture under the File/Open is shown to help the user find that folder for finding Blink Examples. - From your BOSS brother Nicky. :)

peppypickle (author)2014-10-31

thanks for sharing your project with us!

About This Instructable

2,115views

19favorites

License:

More by JesusG1:LittleBits Arduino MacBook Air Blink SketchHomemade Reading GlassesElectric Bon-tar
Add instructable to: