Evil LED Goat
Intro: Evil LED Goat
Around Halloween, even the most innocent of things seem to turn evil. For example our office mascot, Goat, has started acting weird lately...
This tutorial teaches you how to make your own plush toy with LED eyes that can be controlled by an iPhone. The perfect Halloween scare!
STEP 1: Get the Parts
We will be using an Arduino compatible microcontroller called the LightBlue Bean to change the color of the LEDs. It connects to your phone over BLE and comes with an iPhone app called LightBlue that you can use to control it.
This is what you'll need:
STEP 2: Solder the LEDs
STEP 3: Perform Surgery on Goat
STEP 4: Put in the Electronics
STEP 5: Install SoftPWM Library
To be able to fade the LEDs, we will need to use a SoftPWM library. This lets you use any digital pin on the Bean as analog output. By calling the function SoftPWMSetPercent(PIN_NUMBER, BRIGHTNESS) we can go from 0-100 percent brightness. If you need help installing libraries to Arduino, check out this guide.
STEP 6: Upload Code to Bean
Upload this code to your Bean.
Download the iOS application LightBlue, open it and connect to the Bean, click options and choose Sandbox View. Use the sliders and checkboxes to control the LEDs!
The first slider will set how red the LED is, the second green, the third one blue and the last one sets Goat in disco mode. Nothing makes a party like that!
5 Comments
Bling the Book 8 years ago
Thanks for this tutorial. I have a couple of questions. Am I supposed to be soldering the legs of the RGB LEDs as depicted in the image in Step 2 (with Redpin1=0, Greenpin1=1, and Redpin1=2, Redpin2=3, Greenpin2=4, Bluepin2=5) or as delineated in the code?
In the code, the pins are identified as follows:
// The pins that the LEDs are soldered to
#define redPin1 0
#define redPin2 5
#define greenPin2 1
#define greenPin1 4
#define bluePin2 2
#define bluePin1 3
Using your code and the diagram in Step 2, I haven't been able to get the common cathode RGB LEDs to light up. The code is, however, working well to control onboard RGB LED. What am I missing?
(P.S. I have checked the connections of the RGB LEDS. I am able to blink them both in all three colors using a Blink sketch. I am using six 330 Ohm resistors and brand new AA batteries).
SparkySolar 9 years ago
Thank you for your nice instructable.
Rima
KookyKreations 9 years ago
Noooooooooooooooooo! That evil goat is very very evil! Great work on the goat, even if he is evil. You gave me a big laugh today :)
seamster 9 years ago
This is some mighty fine work! The video of the evil LED goat in action is the best.
Poor, poor penguin. : (
simsalapim 9 years ago
Thank you! And don't worry about Penguin, he's a pro stuntman and is doing fine!