After upgrading my arduino software from 0022 to 1.0 the wishield library I believe broke. I did a search on the forum and did not find anything with this issue. Currently I have a basic Wifi server setup using the CUHead shield (clone to async) and when I try to upload it to the Arduino from the IDE, I get and error compiling message with 2 errors. See code section
In file included from Wifi_Test.cpp:5:
C:\Users\M\Dropbox\Arduino\arduino-1.0\libraries\WiShield/WiServer.h:199: error: conflicting return type specified for 'virtual void Server::write(uint8_t)'
C:\Users\M\Dropbox\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
I personally am not sure how to fix this issue nor do I want to actually mess with and Arduino Core file to get it working.
Is anyone else seeing this and of have found a solution.
Regards
EDIT BELOW THIS POINT
I changed the data type of the write function in the WiServer.h file to size_t instead of void... this fixed the issue above.. however, a new issue arrised....
C:\Users\M\Dropbox\Arduino\arduino-1.0\libraries\WiShield\clock-arch.c:44:20: error: wiring.h: No such file or directory
I believe this is attempting to access the wiring.h file located in the hardware folder... It is there in version 22 but not in 1.0
I did, but I did not fix the entire lib. I am also not sure if it is "arduino legit" I basically used my knowledge of c and modified it to compile it in V1.0. You can still run it in its original code in v0022.
I am experiencing the same problem getting the CuHead shield working with the UNO with Arduino version 1.0. Has anyone else been able to get this working? Any advice would be greatly appreciated!
PaulS you are absolutely correct, it should be Arduino.h. I was working in a Windows environment (shame I know) and it seems that it didn't care whether or not the A in Arduino.h was capitalized or not, it compiles either way. Thanks for the correction!
In file included from D:\Removable Disk\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:4,
from WebServer.cpp:9:
d:/removable disk/arduino-1.0/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'
d:/removable disk/arduino-1.0/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'
d:/removable disk/arduino-1.0/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'
In file included from WebServer.cpp:9:
D:\Removable Disk\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:108: error: declaration of C function 'long unsigned int pulseIn(uint8_t, uint8_t, long unsigned int)' conflicts with
D:\Removable Disk\arduino-1.0\libraries\WiShield/wiring.h:98: error: previous declaration 'long unsigned int pulseIn(uint8_t, uint8_t)' here
i also made the same changes to the Wiserver.h (to the write function made it of size_t typw)and i got now:
D:\Removable Disk\arduino-1.0\libraries\WiShield\WiServer.cpp:38:22: error: WProgram.h: No such file or directory
Loaded the WProgram.h file with in the libraries under the Wishield directory its done , code is compiling fine now.
That was absolutely the wrong thing to do. The WProgram.h file was renamed for a reason. The changes made to the renamed file make WProgram.h incompatible with newer versions of the IDE. You should not just copy old files into the new environment without knowing what you are doing.
The proper solution is to edit the library, and change WProgram.h to Arduino.h.