problem programming

hello im having a problem when you go to the link https://github.com/moyuchin/WiiRemote_on_Arduino and download all the source code and header files. when i started compiling i got an error that stated that " 'USB_SETUP_DEVICE_TO_HOST' was not declared in this scope i don't get it can someone pleae help thank You for your time

I downloaded the library, opened the example file, selected the Arduino Duemilanove board, and compiled. No errors.

What board are you using?

Post the complete output that you get.

hey im using an aruduino duimilanova ATMEGA328 and what i did was i downloaded the files and copied and pasted the codes frm the source code and header file of the one called WiiRemote and it did not work. i want to put those source codes and header files into the arduino. so if it worked for you can you please tell me the step by step direction that you did to get no errors because im pretty sure im doing something wrong. also can you also look the this link https://github.com/felis/USB_Host_Shield_2.0 because even the codes that i get from here are not compiling to my arduino.

p.s. when i try to compile the source code and header files from the links i would get something like not declared and stuff please help me

so if it worked for you can you please tell me the step by step direction that you did to get no errors because im pretty sure im doing something wrong.

You are. Why are you copying and pasting code anywhere?

Download the zip file from that site. Extract the files, to the desktop or some temporary location. In the zip file, there is a folder called WiiRemote.

Move that folder to the libraries folder in your sketch folder. If you don't have a libraries folder in your sketch folder, create one.

Then, start the IDE. Select File + Examples + WiiRemote + SteeringWii. Compile. No errors.

i want to put those source codes and header files into the arduino.

I don't think you understand the process of getting a sketch onto the Arduino. The compile process parses any file in the sketch directory, creating a list of files to be compiled. It then compiles each file. Upon completion, the linker is invoked to create a hex file. Finally, the uploader is invoked to copy that hex file to the Arduino. The source and header files are never put on the Arduino.

thank you very much for making it very clear but how exactly do i put the wiimote file into the library file in my sketch file that is a problem im facing. also when i hit compile all those header and source code files will be compiled in the arduino? again thank you very much for your help

how exactly do i put the wiimote file into the library file in my sketch file that is a problem im facing.

It could be a language translation issue, or a simple terminology issue, but, I’m not sure that I understand your problem.

The Tools + Import Library menu item will show you what libraries are available to use. If you select one, the function will add the required #include statements to the sketch. Or, you can add them manually.

also when i hit compile all those header and source code files will be compiled in the arduino?

No, they will be compiled (and linked) on the PC. When you hit Upload, the sketch, all included header files and related source files will be compiled, linked, and the resulting hex file will be uploaded to the Arduino. The header and source files never are uploaded.

hey when i follow your step on how to move theWiiRemote file into the libraries file that worked but when i try to move other files like USB-Host/Blueutils.pde at master · ribbotson/USB-Host · GitHub for some reason the arduino would say something like "library named old school can not be used. the library must have names with only basic letters and numbers "something like that can please tell me why.

P.S. this is what i did also i added three more sketches into the library folder after the WiiRemote one also the information i stated on top the messege box is called bad library names can you please tell me how to add the link into my librarie file?
thank you very much for your help

i added three more sketches into the library folder after the WiiRemote one

Why? Quit f**king with the library. Get out of the library. Leave it alone.

I have no clue what version of the IDE the stuff on that site is intended to work with. Certainly not 22 or later.

something like that can please tell me why.

Sure. Because the Arduino team makes the rules. There is nothing at the last site you linked to that refers to a library named "old school", so I have no idea what library you are referring to. The IDE prints messages at the bottom. You can, and should, cut and paste those messages to your post, instead of trying to paraphrase.

the program from the link is called ribbotson usb host acf1581 and when i try to put it into the libraries folder it says that their is something wrong with the name and also if the ide 22 is to new do you think i should go lower and am i supposed to go deeper into the file can you please tell me how?

the program from the link is called ribbotson usb host acf1581

OK. So, you need to rename it to something that the Arduino IDE likes, not something that ribbotson likes (unless you are using the library with your ribbotson, in which case you are on the wrong forum).

when i try to put it into the libraries folder it says that their is something wrong with the name

So, change it.

if the ide 22 is to new do you think i should go lower

Version 22 is not too new. The code on that site is too old. The site should say what version of the Arduino IDE it has been tested with, and there should be some effort on the part of the developer to maintain the code as Arduino releases new versions of the IDE.

hey thank you for helping me i found out that the codes made were for arduino 0017 or 0018 and can you please help me get all these codes into the arduino because im following the steps you showed me to put these codes into the arduino but for some reason they do not appear in the example file. the links to all the codes i need are (ignore the ones with PS3 on them ) again the links to codes i need is https://github.com/ribbotson/USB-Host/blob/master/examples/USB_desc.pde thank you very much for your help