I made this alarm clock with the TimeAlarms library, and I cannot get the buzzer to beep. I am sure something is wrong with my code, since I'm a noob, so can someone please help me?
(P.S. Ignore the comments, they are from the example sketch I modified this from.)
/*
* TimeAlarmExample.pde
*
* This example calls alarm functions at 8:30 am and at 5:45 pm (17:45)
* and simulates turning lights on at night and off in the morning
* A weekly timer is set for Saturdays at 8:30:30
*
* A timer is called every 15 seconds
* Another timer is called once only after 10 seconds
*
* At startup the time is set to Jan 1 2011 8:29 am
*/
#include <Time.h>
#include <TimeAlarms.h>
int buttonPin = 4;
int buzzerPin = 2;
void setup(){
pinMode(buttonPin, INPUT);
pinMode(buzzerPin, OUTPUT);
setTime(6,11,0,4,20,16); // set time to Saturday 8:29:00am Jan 1 2011
// create the alarms
Alarm.alarmRepeat(8,30,0, MorningAlarm); // 8:30am every day
}
void loop(){
if(buttonPin == HIGH){
digitalWrite(buzzerPin, LOW);
}
}
// functions to be called when an alarm triggers:
void MorningAlarm(){
digitalWrite(buzzerPin, HIGH);
}
Thanks 
There could be syntax error or your logic would be wrong.
If you write a simple sketch with just this in it (in setup() for example) does your buzzer buzz?
#define buzzerPin 2
In setup():
digitalWrite(buzzerPin, HIGH);
That way you know if it's your code or your buzzer. Try that first and post back.
The main problem is that you need to call 'Alarm.delay()' in your loop function.
You didn't read the documentation well enough.
Add this inside your 'loop()' function:-Alarm.delay(0);
From the "TimeAlarms" library documentation:-
Normal Running Usage
Alarm.delay(milliseconds);
Alarms and Timers are only checks and their functions called when you use this delay function. You can pass 0 for minimal delay. This delay should be used instead of the normal Arduino delay(), for timely processing of alarms and timers.
Edit: I also just noticed that you set the time incorrectly. You've set it for 6:11am on the 4th day of the 20th month of 2016.
Instead of this:-setTime(6,11,0,4,20,16);try this:-setTime(6,11,0,20,4,16); // Set time to 6:11:00am April 20 2016
Or if you want to set it to 8:29am to test your 8:30am alarm after 1 minute:-setTime(8, 29, 0, 20, 4, 16); // set time to Saturday 8:29:00am Apr 20 2016
Again from the "Time" library documentation:-
setTime(hours, minutes, seconds, days, months, years);