This code consists of two programs, each for a separate Atmel AVR ATtiny microcontroller:
- shaker implements a program that does these things:
- it controls an LED using PWM (
led_fader.c
) and produces a "glowing" effect while the device is in "idle" mode (i.e. not shaken) - it analyzes voltages of an analog accelerometer and recognizes shocks that, when summed up, will be interpreted as a shake
- on shaking it will fade the LED to full power and give a signal to a second ATtiny chip running the sound program
- it will fall asleep after 5 min. when the battery is not being charged during this time
- it will wake up from sleep when the battery is charged again
- sound implements a modified program named Simple SD Audio Player with an 8-pin IC sd8p from elm-chan.org
- it will receive the signal from the first ATtiny chip and play a sound file on an SD card
- on every further signal during playback it will change to the next sound file
- after playback it will go back to a power saving "idle" mode
The program shaker is released under BSD 3-clause license which is contained in the file shaker/LICENSE
.
The program sound is Copyright (C) 2010 by ChaN and contains only small modifications by INKA Research Group. It is licensed under the conditions published in the source code under sound/sd8psrc
.