3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Smart Push-button for Garage Door

Step 3Programming the BlinkM

Programming the BlinkM
To program the BlinkM there are a couple of options and for this step I recommend reading Tod E. Kurt's hack of turning the BlinkM into a mini Arduino: http://todbot.com/blog/2011/03/22/blinkm-smart-led-as-the-smallest-arduino/

This method makes it much easier to program the ATtiny85 microprocessor on the BlinkM than the regular AVR way; my code is included below.

* If you run into the error message “avrdude: stk500_getsync(): not in sync: resp=0×15 ″ when using ArduinoISP to program the BlinkM, it is easily fixable by putting a 100 ohm resistor between the reset pin and 5v of the Arduino after loading the ArduinoISP. It worked great on my Freeduino and Ardweeny.

In my code I have broken down the 'Fade' functions into a 'FadeUp' and a 'FadeDown' and added a 'Delay' variable in order to offer different effects.
Also note that the magnetic door switch I am using is normally open when the magnet is close to it and it closes the contacts when the magnet pulls away.

Here is a short video of how I programmed it:


« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
3
Followers
4
Author:TheRafMan