Fermé

Fixing my c++ code for a universal remote control

So I am trying to make an arduino based TV-B gone by this instructable:

[url removed, login to view]

Here is my wiring:

So my issue appears in Arduino.

When I first tried to verify the code I got an error saying I had to put const after the * in this code, both for EUpowerCodes and NApowerCodes:

"const struct IrCode *EUpowerCodes[] PROGMEM = {"

And So I filled out the const in the areas needed, but then I got this new error where there was an undefined reference to both EUpowerCodes and NApowerCodes. More specifically here's the error message:

Arduino:1.6.0 (Windows 8), Card "Arduino Uno"

TVB.cpp.o: In function `sendAllCodes()':

/Arduino/[url removed, login to view]: undefined reference to `NApowerCodes'

/Arduino/[url removed, login to view]: undefined reference to `NApowerCodes'

/Arduino/[url removed, login to view]: undefined reference to `EUpowerCodes'

/Arduino/[url removed, login to view]: undefined reference to `EUpowerCodes'

collect2: error: ld returned 1 exit status

Error by compiling.

The error occures at line 261 and 264, here I have the code from line 259 to 265:

259// point to next POWER code, from the right database

260 if (region == NA) {

261 data_ptr = (PGM_P)pgm_read_word(NApowerCodes+i);

262 }

263 else {

264 data_ptr = (PGM_P)pgm_read_word(EUpowerCodes+i);

265 }

Now I have tried putting "* cons" or just "const" in front of NApowerCodes and EUpowerCodes, and removing + i, and putting "const struct IrCode *EUpowerCodes[] PROGMEM = {" instead inside of the parenthesis.

Does anyone know what I did wrong or what I can add of code to fix this?

Attached is the TVB file with the undefined reference error.

[url removed, login to view]

Compétences : Programmation C++

Voir plus : universal remote control programming codes, universal remote control programming, vb6 remote control code, android bluetooth remote control eclipse source code, universal remote control, java remote control code, car remote control code grabber, rs232 remote control projector source code, inet control source code, freelancer remote control, remote control wm6, schematic diagram remote control helicopter, webcam remote control java, user control source code, remote control using gsm project

Concernant l'employeur :
( 1 commentaire ) Oslo, Norway

N° du projet : #12664733

10 freelances ont fait une offre moyenne de 20 € /heure pour ce travail

15 € EUR / heure
(6 Commentaires)
4.6
prashushinde9

Hello, We have accomplished 90% of the project which is similar of your requirement. All we need 10% customization as per your requirement set and specifications. I want to discuss in personal chat in order to explore Plus

18 € EUR / heure
(2 Commentaires)
4.0
goharriz

Hi, let me know of this solves your problem. [url removed, login to view]

20 € EUR / heure
(2 Commentaires)
1.1
16 € EUR / heure
(0 Commentaires)
0.0
16 € EUR / heure
(0 Commentaires)
0.0
16 € EUR / heure
(0 Commentaires)
0.0
votuananhs

Hello, if possible, I hope we will have a discussion about your project to make more detail your issues. When you are online, please send to me a message on chat tool box

13 € EUR / heure
(0 Commentaires)
0.0
bonapps

Hello Team, "BONAPPS - Delivering Excellence just a click away" We read your entire proposal and are happy to share that we are interested in your proposal. We would like to have an in-depth discussion about the Plus

27 € EUR / heure
(0 Commentaires)
0.0
unboltsoft

We are a young Ukrainian software development company that employs several passionate engineers. Our main direction is the engineering, development and implementation of custom software with a deep scientific focu Plus

16 € EUR / heure
(0 Commentaires)
0.0
serverfireteam

in your code you should have #include "main.h" and i don't see that file , i can make that work for you but at last you need 20 hours budget

38 € EUR / heure
(0 Commentaires)
0.0