Go Down

Topic: Help with errors compiling someone else script (Read 585 times) previous topic - next topic

monti73

Dec 11, 2012, 02:46 am Last Edit: Dec 11, 2012, 03:04 am by Coding Badly Reason: 1
Hi to everyone.

I'm trying to make my own POV clock using a Hard Drive, I was writting my own program but I'm a little bit noob for programing such thing so I looked up for a code on the web, taken from here: https://sites.google.com/site/paulmprojects/5400rpm-hard-disk-clock.

I'm getting these errors when trying to compile it, and don't know how to solve them.
Code: [Select]
C:\Program Files\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -IC:\Program Files\Arduino\hardware\arduino\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\variants\standard C:\Users\Luciano\AppData\Local\Temp\build9195251923891611839.tmp\Reloj_Sketch_pauls_project.cpp -o C:\Users\Luciano\AppData\Local\Temp\build9195251923891611839.tmp\Reloj_Sketch_pauls_project.cpp.o
Reloj_Sketch_pauls_project.cpp:48:58: warning: buttons.h: No such file or directory
Reloj_Sketch_pauls_project:148: error: 'Button' does not name a type
Reloj_Sketch_pauls_project:149: error: 'Button' does not name a type
Reloj_Sketch_pauls_project:150: error: 'Button' does not name a type
Reloj_Sketch_pauls_project.cpp: In function 'void SetupHardware()':
Reloj_Sketch_pauls_project:344: error: 'buttonHOR' was not declared in this scope
Reloj_Sketch_pauls_project:345: error: 'buttonMIN' was not declared in this scope
Reloj_Sketch_pauls_project:346: error: 'buttonMOD' was not declared in this scope
Reloj_Sketch_pauls_project:347: error: 'OneShotTimer' was not declared in this scope
Reloj_Sketch_pauls_project.cpp: In function 'boolean exitpress()':
Reloj_Sketch_pauls_project.cpp:517: warning: statement is a reference, not call, to function 'clear_page'
Reloj_Sketch_pauls_project.cpp:517: warning: statement has no effect
Reloj_Sketch_pauls_project.cpp:518: warning: statement is a reference, not call, to function 'flip_page'
Reloj_Sketch_pauls_project.cpp:518: warning: statement has no effect
Reloj_Sketch_pauls_project.cpp: In function 'void DrawTimev4()':
Reloj_Sketch_pauls_project.cpp:742: warning: statement is a reference, not call, to function 'clear_page'
Reloj_Sketch_pauls_project.cpp:742: warning: statement has no effect
Reloj_Sketch_pauls_project.cpp:743: warning: statement is a reference, not call, to function 'flip_page'
Reloj_Sketch_pauls_project.cpp:743: warning: statement has no effect
Reloj_Sketch_pauls_project.cpp: In function 'int checkbuttons()':
Reloj_Sketch_pauls_project:799: error: 'buttonHOR' was not declared in this scope
Reloj_Sketch_pauls_project:799: error: 'ON' was not declared in this scope
Reloj_Sketch_pauls_project:801: error: 'buttonMIN' was not declared in this scope
Reloj_Sketch_pauls_project:801: error: 'ON' was not declared in this scope
Reloj_Sketch_pauls_project:803: error: 'buttonMOD' was not declared in this scope
Reloj_Sketch_pauls_project:803: error: 'ON' was not declared in this scope
Reloj_Sketch_pauls_project.cpp: In function 'void SerialCommand()':
Reloj_Sketch_pauls_project:867: error: 'BYTE' was not declared in this scope

As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.

Reloj_Sketch_pauls_project.cpp: At global scope:
Reloj_Sketch_pauls_project.cpp:1009: warning: 'TIMER1_0VF_vect' appears to be a misspelled signal handler


Moderator edit: Malicious link removed.

the lines that give me problems are:

Code: [Select]
Button buttonHOR;// = Bounce(HOR,DEBOUNCETIME);
Button buttonMIN;// = Bounce(MIN,DEBOUNCETIME);
Button buttonMOD;// = Bounce(MOD,DEBOUNCETIME);

buttonHOR.assign(HOR);
buttonMIN.assign(MIN);
buttonMOD.assign(MOD);
buttonHOR.setMode(OneShotTimer);
buttonMIN.setMode(OneShotTimer);
buttonMOD.setMode(OneShotTimer);


I added the buttons.h library (I see the word buttons in orange colour) but it doesn't fix the errors...
If someone could give me a little help with this I would appreciate it very much!

Thanks to everyone

Coding Badly

Quote
I added the buttons.h library ...


...to the wrong location.  Move it to...

[font=Courier New]{Arduino Sketch Directory/libraries/Buttons/[/font]

Coding Badly


Note: If you ever again post a link on this forum to mediafire.com I will ban you.


Coding Badly


There is generally no need to host files on an external site.  You can attach largish files to a post...

• While composing a post, click Additional Options (below and left of the edit window)

• Next to Attach, click Browse

• Select the file to attach to the post

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy