Arduino 1.0

gfuchs
Posts: 1
Joined: Thu Feb 09, 2012 12:46 pm

Arduino 1.0

Post by gfuchs »

I made the changes to the library to verify the examples successfully. (For instance, WProgram.h does not exist anymore and its definitions are now contained in Arduiono.h.) Contact me if you like to have the updated library. Of course, Modern Device can have it too.

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Arduino 1.0

Post by oz »

Thanks gfuchs,

You embarrased me into updating my files on the wiki. They now work with Ard. 1.0

Paul

dan77062
Posts: 7
Joined: Tue Nov 08, 2011 12:41 am

Re: Arduino 1.0

Post by dan77062 »

I downloaded this version, but it gives the following error (multiple times) from both usb.h and ch9.h
'byte' does not name a type

This makes sense, as the 1.0 version eliminated the type byte.

Is there another version of usb and ch9?

motarius
Posts: 5
Joined: Tue Feb 14, 2012 3:41 pm

Re: Arduino 1.0

Post by motarius »

I'm having the same problem(s) with the 1.0 version from the Wiki.

Environment:
Arudino 1.0
Windows 7

Messages:
error: WProgram.h No such file or directory (the file was not included in the downloaded zip)
error: 'byte' does not name a type (repeated)

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Arduino 1.0

Post by oz »

The latest version of the Freeduino USB Host Board library, which compiles on Arduino 1.0 is here
https://github.com/moderndevice/FreeduinoHostBoard

Just click the "zip" icon and you'll download a zipped version.
I modified the wiki to point to github too. Please let me know if you have any
glitches with Windows. It has been developed and tested on a Mac.

On thing I discovered along the way is that apparently all of the libraries in the libraries folder need to compile, to get any sketch to run.
So read the error messages at the bottom of the sketch and see what files are throwing errors and then isolate those files outside the libraries folder.
Most currently supported libraries have been updated at this point so you should be able to find newer versions of any offending files.

If you want to fix your own libraries, it's not that onerous a task. There are about six of seven total issues that need slight mods, but only about four of them are common.
Here's a good place to start http://arduino.cc/en/Main/ReleaseNotes
I haven't seen a tutorial on all the details but I'd be surprised if it didn't exist yet.

Paul

dan77062
Posts: 7
Joined: Tue Nov 08, 2011 12:41 am

Re: Arduino 1.0

Post by dan77062 »

It works fine in Ubuntu, thanks for fixing up the files, as it is really nice to be able to use Arduino 1.0. Note that ch9.h still does not compile ('byte' does not name a type), but as long as you do not list that in the includes, those errors are not generated. ch9.h looks like it defines USB structures, but is apparently not needed (?).

The first time I tried it on a Samsung 10.1 Galaxy Tab, the tablet did not recognize it as an AndroidAccessory board, but unplugging it and replugging it caused the tablet to recognize it.

Also, just for info, I put the library files under the main arduino libraries folder rather than in the Sketchbook libraries folder.

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Arduino 1.0

Post by oz »

dan77062,

the byte keyword is still supported in my version of Arduino 1.0. Are those the errors you are seeing?

Maybe paste in the first six lines of error messages here if you can spare the time.,

I wonder if there is some difference in whether the files are in the same folder as the sketch. That shouldn't make a difference either but who knows?

Paul

dan77062
Posts: 7
Joined: Tue Nov 08, 2011 12:41 am

Re: Arduino 1.0

Post by dan77062 »

You are correct, it is the BYTE keyword (used under Serial.print()) that has been removed, not the byte type.
And I see that you are indeed using 'byte' type in the main program, which compiles fine.

However, when I #include ch9.h, many lines of these errors result
In file included from FreeduinoHostBoardDemo01.cpp:2:
/home/robot/arduino-1.0/libraries/FreeduinoHostBoard/ch9.h:131: error: ‘byte’ does not name a type
/home/robot/arduino-1.0/libraries/FreeduinoHostBoard/ch9.h:132: error: ‘byte’ does not name a type
/home/robot/arduino-1.0/libraries/FreeduinoHostBoard/ch9.h:134: error: ‘byte’ does not name a type

what does ch9.h do?

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Arduino 1.0

Post by oz »

It's protocol support for USB .
Paul

motarius
Posts: 5
Joined: Tue Feb 14, 2012 3:41 pm

Re: Arduino 1.0

Post by motarius »

I was getting a number of errors on a program I had written as well. It was happening on both Mac and PC. After removing the Ch9.h, as suggested, from the includes I got the following errors:

Code: Select all

<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:35: error: 'MAX3421E' does not name a type
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:36: error: 'USB' does not name a type
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:41: error: 'EP_RECORD' does not name a type
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:45: error: 'USB_DEVICE_DESCRIPTOR' has not been declared
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:54: error: 'EP_RECORD' has not been declared
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:54: error: 'EP_RECORD' has not been declared
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:68: error: 'USB_NAK_LIMIT' was not declared in this scope
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h: In member function 'bool AndroidAccessory::isAccessoryDevice(int*)':
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:47: error: request for member 'idVendor' in '* desc', which is of non-class type 'int'
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:48: error: request for member 'idProduct' in '* desc', which is of non-class type 'int'
<USER_FOLDER>/Documents/Arduino/libraries/Freeduino_USB_Host_Board/FHB.h:48: error: request for member 'idProduct' in '* desc', which is of non-class type 'int'
I was able to fix the errors and get it to compile by adding the following includes to the the FHB.h file:

#include "Max3421e.h"
#include "Usb.h"

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Arduino 1.0

Post by oz »

Are you sure you don't have the old library in the libraries folder too? Sometimes the compiler finds files by the same name that are the older files.

Paul

dan77062
Posts: 7
Joined: Tue Nov 08, 2011 12:41 am

Re: Arduino 1.0

Post by dan77062 »

The protocol support for USB from ch9.h is not needed? The main program compiles fine and runs without it.

You are right that there must not be any other files with the same names anywhere in the libraries. That is one reason that I put all my library files in the main arduino libraries folder rather than a separate libraries folder within the sketchbook folder. It is easier that way to keep track of what is there.

Post Reply