Introduction: Skull With Gradient Eyes.
While cleaning the backyard we found the skull of a little rodent. We were close from Halloween and here came the idea.
If you don't have any skull in your closet you may replace it with an old doll head or anything you want to light.
Step 1: The Box
I bought a small wooden box in a hobby shop. Just need to take care of the size to be sure that all the electronic can fit inside. The wiring may require more volume than initially expected.
The modifications brought to the box are rather limited.
2 small holes for the buttons on the front.
1 bigger hole on the top of the lid for a screw that support the skull. You may also need to make it a little bit bigger to allow the led connectors go through.
In order to guarantee that the main screw that hold the skull stays vertical just glue a nut 2-3 cm higher than the bottom of the box.
Step 2: Power Supply
I used a 9V battery.
The Featherwing requires a 5V max power input so we need the VCC regulator.
The regulator can be mounted directly on the Battery. But it has a power led that turns on as soon as it is connected. In order to spare the battery life, we uses two 9V connectors connected together with an On/OFF switch inserted between them. This way we can totally power off the system.
Step 3: Featherwing
I uses a Featherwing M0 to control the 2 "eyes".
It is simply mounted on a small piece of strip-board using some stacking headers. extra headers are soldered on the side to connect the different pieces.
The pins used on the board are:
- 11: Left eye control
- 12: Right eye control
- 5: Color change button
A 10 kOhm resistor has been used for the button but you can also use the INPUT_PULLUP mode of the Feartherwing.
Step 4: Program
The code provided bellow is rather simple.
After the initialization phase we enter into the infinite loop that creates a gradient of color that is used for both eyes.
The switch button allows selecting either a red gradient or a green one.
You will need the Arduino IDE to upload the program on the micro-controller.