ovidiucp / TinyWebServer

Small web server for Arduino, fits in 10KB ROM, less than 512 bytes RAM
http://www.webweavertech.com/ovidiu/weblog/archives/000484.html
GNU Lesser General Public License v2.1
245 stars 65 forks source link

Library not compatible with Arduino 1.0 #1

Closed edak closed 12 years ago

edak commented 12 years ago

There will be multiple changes necessary to get this library compatible with Arduino 1.0 due to the changes to the write and Ethernet Server/Client functionality.

In its current state this library will not compile.

edak commented 12 years ago

I tried making the changes myself, including:

Changing imports to compatible ones.

//#include "WProgram.h" // <<< removed

include "Arduino.h" // <<< added

//#include "wiring.h" // <<< removed //#include // <<< removed //#include // <<< removed

include //<<< added

Replacing instances of Server and Client with EthernetServer and EthernetClient to abide by changes to the Ethernet library.

Changing the virtual write functions to return size_t instead of void, to abide by changes to "write"

virtual size_t write(uint8_t c); virtual size_t write(const char str); virtual size_t write(const uint8_t buffer, size_t size);

Now the server appears to work briefly, but stops soon afterwards (after only a few requests).

I personally believe that there may be a problem with the new SD class in 1.0 rc1, but would like some direction.

Cheers for such a great product otherwise.

ovidiucp commented 12 years ago

What is Arduino 1.0? The latest version of the Arduino IDE is 0022, available here:

http://arduino.cc/en/Main/Software

ovidiucp commented 12 years ago

Ops, sorry for closing it, github's button scheme is confusing.

edak commented 12 years ago

Arduino is now almost ready for release as version 1.0 , there is a release candidate available here on github. It will supersede 022 very soon, but there have been some major changes to the language so everyone is going to have to modify their libraries.

ovidiucp commented 12 years ago

I looked at Arduino 1.0, but it seems broken in more ways than one. For one thing, the Ethernet library by itself doesn't seem to work on my Arduinos at all. I tried it on both an Arduino Duemilanove as well as on the original Arduino Uno, none of them work. Until this is fixed, I won't try to get the TinyWebServer work with it.

Hardcore-fs commented 12 years ago

it does not work with 0022 either!!

Hardcore-fs commented 12 years ago

fixed, it now works with IDE 1.0

edak commented 12 years ago

Cool! I will check it out. On Jan 10, 2012 11:05 AM, "Hardcore-fs" < reply@reply.github.com> wrote:

fixed, it now works with IDE 1.0


Reply to this email directly or view it on GitHub: https://github.com/ovidiucp/TinyWebServer/issues/1#issuecomment-3422813

ovidiucp commented 12 years ago

I just merged pull request #3 which makes the code compatible with Arduino 1.0.