Menu
The circuit consists of an ATtiny85 connected to the speaker and LED. I programmed mine using an Arduino Uno (more info on programming using Arduino can be found at http://highlowtech.org/?p=1695). To use the tone function you will have to use the Arduino-tiny core (which can be downloaded at https://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0150-0020.zip) To use this core copy it into the Arduino folder and rename the prospective board file to 'Boards'. you should have a file like this: C:Program Files (x86)ArduinohardwaretinyavrBoards.txt.
Upload the Sonic_Screwdriver file to the ATtiny
Download royalty free Screwdriver Electric sound effect with WAV and MP3 clips available. Click here to.
int count;
void setup()
void setup()
{
pinMode(0, OUTPUT);
}
void loop()
{
count = count+1;
if(count<5)
{
tone(0,1471);
delay(10);
tone(0,1575);
delay(5);
}
else
{
tone(0,1470);
delay(10);
tone(0,1575);
delay(5);
if(count>10)
{
count=0;
}
}
}
Once the program is uploaded solder the speaker to pin 5 and ground, and two wires to the power input and ground. Solder two wires to the LED for later.