/* Program to send 440 Hz signal to the buzzer on Wytec EduBase/EduPad board * with Tiva TM4C123/MSP432. * This program toggles the output pin 37 at 440 Hz using 1126 ms delay * between toggles. Pin 37 is connected to the speaker on the board. * * Energia 1.6.10E18 */ const int BUZZER = 37; const int HALF_PERIOD = 1126; void setup() { // initialize the digital pin as an output. pinMode(BUZZER, OUTPUT); } void loop() { digitalWrite(BUZZER, HIGH); // turn the signal to buzzer high delayMicroseconds(HALF_PERIOD); // wait for half cycle digitalWrite(BUZZER, LOW); // turn the signal to buzzer low delayMicroseconds(HALF_PERIOD); // wait for half cycle }