Solved: Arduino Noob Needs help using code from an Instructable

[u]The Program I am Using[/u] I am using this exact code from https://github.com/xtremd/Rickrolling-Arduino-Sketch/blob/20f4023e56812adc18869b4387b87eda9d2568c6/RickRollAlarmR2.pde#L295 and am having some difficulties using this code for a project of my own. If you compile this code as it stands, you receive the following errors.

[u]Errors Received[/u] sketch_jan23a.cpp:8:18: error: Time.h: No such file or directory sketch_jan23a.cpp:9:24: error: TimeAlarms.h: No such file or directory sketch_jan23a:5: error: variable or field 'digitalClockDisplay' declared void sketch_jan23a:5: error: 'time_t' was not declared in this scope sketch_jan23a:20: error: 'time_t' does not name a type sketch_jan23a:21: error: 'time_t' does not name a type sketch_jan23a.cpp: In function 'void setup()': sketch_jan23a:46: error: 'setTimeTemp' was not declared in this scope sketch_jan23a:49: error: 'triggerTimeSecs' was not declared in this scope sketch_jan23a:53: error: 'setTime' was not declared in this scope sketch_jan23a:56: error: 'now' was not declared in this scope sketch_jan23a:56: error: 'digitalClockDisplay' was not declared in this scope sketch_jan23a.cpp: In function 'void loop()': sketch_jan23a:83: error: 'now' was not declared in this scope sketch_jan23a:83: error: 'digitalClockDisplay' was not declared in this scope sketch_jan23a:90: error: 'setTimeTemp' was not declared in this scope sketch_jan23a:90: error: 'now' was not declared in this scope sketch_jan23a.cpp: At global scope: sketch_jan23a:103: error: variable or field 'digitalClockDisplay' declared void sketch_jan23a:103: error: 'time_t' was not declared in this scope sketch_jan23a.cpp: In function 'boolean triggerTimeReached()': sketch_jan23a:128: error: 'now' was not declared in this scope sketch_jan23a:128: error: 'triggerTimeSecs' was not declared in this scope sketch_jan23a.cpp: In function 'void rickRollCrashAndBurn()': sketch_jan23a:161: error: 'now' was not declared in this scope sketch_jan23a:161: error: 'triggerTimeSecs' was not declared in this scope sketch_jan23a.cpp: In function 'void setupTheCurrentTimeThroughSerial()': sketch_jan23a:188: error: 'setTime' was not declared in this scope sketch_jan23a:191: error: 'now' was not declared in this scope sketch_jan23a:193: error: 'setTimeTemp' was not declared in this scope sketch_jan23a:208: error: 'triggerTimeSecs' was not declared in this scope

[u]The Issue:[/u] I have a majority of the circuitry complete with the ChipCorder, 5V Resistor, 9V battery, Speaker and of course the Arduino but to be completely honest, I am not sure how to declare a majority of these variables. Should I set their values to 0? EX. int triggerTimeSecs = 0; or is there a proper way to declare these various values. Also.... "sketch_jan23a.cpp:8:18: error: Time.h: No such file or directory" and "sketch_jan23a:5: error: variable or field 'digitalClockDisplay' declared void" have me completely stumped. I realize these are a lot of errors but I'm sure there is something completely obvious that I am doing wrong. I am a huge Noob when it comes to programming errors and honestly don't know how to go about fixing these errors.

[u]Purpose or "Goal" of the Project[/u] I am using this guide http://www.instructables.com/id/Annoying-Autonomous-Rickrolling-Device-For-April-/?ALLSTEPS to create a Autonomous Rickroll machine that will be enclosed inside of a small suitcase with access to the Arduino's USB port. The program uses the serial monitoring to take values which in this case is the current time and target time. After entering these values inside the serial monitor, you then place the enclosure which will then repeatedly play the rickroll song at the targetted time.

I want to use this project to prank my friends and family and would appreciate any possible help or guidance to a section or website that could help me fix this issue.

Re: [URGENT] ... [URGENT]

...

I want to use this project to prank my friends and family ...

That must be some urgent prank you want to pull. :)

Looks like you might be missing a library. Try Googling "TimeAlarms.h" ...

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1263305457

Relax - April 1st is a couple of months off.

(Besides, who would trust code from someone who can’t spell “receive”? :wink:

added time library and time alarm library. Didn't seem to do anything though

Did you restart the IDE?

That did it...LOL my bad. Thanks you two for helping me out. Works like a Charm :D. I had them under the libraries the whole time but had forgotten to reopen arduino. Thank you very much for your assistance