my name is Sergio, from Italy. This is my firts post, in Arduino forum. I’m working with Arduino Leonardo, and own several of them, they are super!
Now I have to do develop one libray in c or cpp language, in order to manage one o two Timers (1 and 3) for creating a precise time pulse. So a have decide to start with a standard Tone libray, just to have a template. I move it from its original position in IDE and put it in the standard library folder of the Arduino IDE 1.0.5-r2, and changed its original file name, now LibMotori.cpp. I have not modified its contents, just to try if my .ino programm works again. Note that I moved the original one form its folder, so the IDE has to use my one. I compile it but I get several error, lke that:
… undefined reference to `tone(unsigned char, unsigned int, unsigned long).
So I have tried to write an header file LibMotori.h where declare the function (tone(), noTone()) and include also the <inttypes.h> on it. I have included it in my .ino program but in this case I get the several errors relative to the LibMotori.h:
… error: variable or field ‘tone’ declared void
… error: ‘uint8_t’ was not declared in this scope
Of corse I tried to change the name of my .ino file, and, after a libray modification I restated the IDE, but it not works at all. If same body can help my.
Thanks in advance for support and best regards,