arduino-appleii/APPLEII/speaker.ino
Damian Peckett 2798ae6d16 First Commit
Uploading Current Source To Github
2015-04-08 17:14:01 +10:00

13 lines
239 B
C++

#define SPEAKER_PIN 5
void speaker_begin() {
pinMode(SPEAKER_PIN, OUTPUT);
digitalWrite(SPEAKER_PIN, LOW);
}
void speaker_toggle() {
static boolean state = false;
state = (state)?false:true;
digitalWrite(SPEAKER_PIN, state);
}