There are currently 0 users and 2 guests online.
3.2 - One wire digital
Submitted by Webbot on October 30, 2008 - 5:05pm.
This mode uses a single output pin to drive the speaker. To activate this mode edit the 'global.h' file and make sure the line
You can select which IO port and pin to use in global.h by changing these lines which currently use PORTB pin 4 :-
#define SOUND_PORT PORTB
This mode only requires the following additional hardware:-
1 x 10k ohm resistor
1 x 47 ohm resistor
1 x 2N2222 or similar NPN transistor
1 x 8 ohm 0.1 watt speaker
The following schematic shows how to assemble the electronics. Note that we use 0v, +5v, and the I/O port pin so you can use a standard 3 way cable (like the ones you use to connect to servos or sensors).