Flora TV B Gone Compiling Error
Moderators: adafruit_support_bill, adafruit

Flora TV B Gone Compiling Error

by Augusto15 on Sat Feb 15, 2014 11:07 pm

Hey there every time i try to compile the code that i downloaded from github title FloraTVBGoneMaster I get this error ( multiple definition of NAand EU codes). The problem seems to bee in WorldCodes.cpp but I could fid it or fix it. Here I leave a Screenshot of the problem.
Attachments
Facepalm.jpg
Facepalm.jpg (257.15 KiB) Viewed 248 times
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Sun Feb 16, 2014 5:30 pm

It sounds like you've put the code in sketchbook/libraries.

The TV-B-Gone firmware isn't a library, so it only goes in 'sketchbook'. Putting it in 'sketchbook/libraries' creates loops that confuse the linker.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Sun Feb 16, 2014 11:24 pm

No, that's not the problem, a lot of people have the same trouble using the WorldCodes.cpp and sincerelly nobody could solve it.
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Mon Feb 17, 2014 9:49 pm

Hmm.. then I'm not sure what to suggest.

The problem is that you have a redundant linker call to WORLDcodes.cpp.o (middle line of white text above the orange errors). Thing is, those calls are generated automatically by the Arduino IDE, and I don't know the build system's internals well enough to say why that's happening.

Try renaming the file to 'WORLDcodes.c' and see if the redundancy has some association with the '.cpp' file type.

If that doesn't do it, just copy all the data from WORLDcodes.cpp into the end of the main script and lose the 'extern' keyword on these lines:

Code: Select all | TOGGLE FULL SIZE
extern PGM_P *NApowerCodes[] PROGMEM;
extern PGM_P *EUpowerCodes[] PROGMEM;
extern uint8_t num_NAcodes, num_EUcodes;
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Mon Feb 17, 2014 10:47 pm

The problem gets worst if i copy the code, but changing it to the .c extension could solve the problem. When I did that i saw that there was a TVBgone Folder in my temp folder it included Worldcodes.cpp but every time I delete and compile the sketch it reappears, I don't know what to do.
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Mon Feb 17, 2014 11:31 pm

Sorry, I wasn't clear.. I meant "copy the code in WORLDcodes.cpp to the main source file, remove the 'extern' keywords (since the constants are now being defined in the same parsing unit as the main code), then delete WORLDcodes.cpp".

Actually, you'd remove the 'extern' lines entirely, because putting the data structures into the main file would remove the need for a local declaration.

I'm not sure what's going on with the extra copy of WORLDcodes.cpp in the temporary directory used to build the hexfile. It's probably there because of some glitch in the build system, so my suggestion would be to delete that sketch directory entirely and start over from a fresh copy, ideally with a different name.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Tue Feb 18, 2014 8:08 pm

This may work, But the problem is still that temp file called worldcodes.cpp. Where does that come from? Could it be created by the main source code from the tv b gone scketch? Probably I will reinstall the arduino IDE and delete that folder. Any other idea is apreciated
Attachments
Sonic.png
Sonic.png (130.11 KiB) Viewed 182 times
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Wed Feb 19, 2014 1:08 am

The build system will copy and compile any .c or .cpp files it finds in the project directory. It will also copy and compile any libraries whose header files are included.

Check your sketchbook/libraries folder to make sure you don't have a redundant copy of the TV-B-Gone code there, then delete the file 'WORLDcodes.cpp' after you've copied the data to the main script file.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Wed Feb 19, 2014 3:39 pm

I was able to get it to compile and upload, seems to work but doesn't turn off my tv
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Wed Feb 19, 2014 9:43 pm

Check with a digital camera to make sure the IR LEDs are working, then check to see if your TV's codes are listed among the ones in the source files.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Wed Feb 19, 2014 9:54 pm

I've allready done that and yes they are listed in the tv b gone scketch, but nothing happens, I'm using a single IR Led could it be that ?
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Wed Feb 19, 2014 11:07 pm

That could be. How much current are you sending through it?
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Tue Feb 25, 2014 10:01 pm

I wasn't able to meassure the current, how much currentt does it need to work properly ?
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am

Re: Flora TV B Gone Compiling Error

by adafruit_support_mike on Wed Feb 26, 2014 1:10 am

Normal LEDs use 20-25mA. The IR LEDs in the TV-B-Gone kit use pulses up to 1A.

The amount of light you get depends on the amount of current you send through the LED, so the 1A pulses are 400-500 times as bright as the ones you'd get at normal LED levels. Brighter pulses are easier for the reciever to pick up.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10841
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora TV B Gone Compiling Error

by Augusto15 on Wed Feb 26, 2014 7:40 pm

That could be the problem, i'm getting 33 mA pulses, and i didn't include the 100 ohm resistors, I'll add them and try again
Augusto15
 
Posts: 16
Joined: Sat Apr 20, 2013 12:37 am