Bugs in my program?

Hi everyone,

I reacently started my first arduino project, and I've run into a problem.

I found a project at: http://www.instructables.com/id/Control-any-gadgets-with-your-Brain-Nero-Feedbac/?ALLSTEPS

It seemed simple enough, so I bought the supplies and started. I downloaded the software, assembled the hardware, and wrote a few programs to firmilarize myself with the system.

The project includes attatchments for the code needed, but I tried to upload the program I kept getting error messages every time I run it.

I am not very firmiliar with arduinos in general, much less the level of programing involved with this project. I am wondering if anyone would be able to look over the code and find any possible problems with it.

The link to the program attatchments is here: http://www.instructables.com/files/orig/FFC/JM9C/GTZK8EJI/FFCJM9CGTZK8EJI.zip

Thanks

Attach your sketch using the </> icon in the posting menu.

Post the full text of any and all error messages as well - this is critical to finding the problem.

this is the error message:

Arduino: 1.6.4 (Mac OS X), Board: "Arduino Uno"

Brain.cpp:1:22: fatal error: WProgram.h: No such file or directory

include "WProgram.h"

^ compilation terminated. Error compiling.

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

I'm not sure how to attach all of the sketch because there are multiple programs used.

Change WProgram.h to Arduino.h

The name of that particular file was changed a few updates ago.

Replace WProgram.h with Arduino.h

Wouldn't it have been simpler if you'd told us that earlier?

Okay. Now it's telling me that the programmer isn't responding. This is the message it gives me:

Arduino: 1.6.4 (Mac OS X), Board: "Arduino Uno"

Sketch uses 5,308 bytes (16%) of program storage space. Maximum is 32,256 bytes. Global variables use 738 bytes (36%) of dynamic memory, leaving 1,310 bytes for local variables. Maximum is 2,048 bytes. avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

It just does this over and over

Do you have the right com port selected? Your code is no longer throwing errors, but it isn't finding your board when it goes to upload.

Yes, the correct port is selected.

That is a very common problem. It isn't an error in your code. It is a problem with the communications between your PC and the arduino.

Try rebooting your computer.

SwankyDuck: Okay. Now it's telling me that the programmer isn't responding. This is the message it gives me:

Arduino: 1.6.4 (Mac OS X), Board: "Arduino Uno"

Sketch uses 5,308 bytes (16%) of program storage space. Maximum is 32,256 bytes. Global variables use 738 bytes (36%) of dynamic memory, leaving 1,310 bytes for local variables. Maximum is 2,048 bytes. avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

Which function are you using for upload?

File - Upload? or File - Upload using Programmer?

The function "File - Upload using Programmer" will ONLY be working if you actually have connected a working "ISP programmer" to the 6-pin ISP connector of your Arduino board.

In all other cases you do uploads with the "bootloader", and the correct function to use would be "File-Upload".