TinyWebServer icon indicating copy to clipboard operation
TinyWebServer copied to clipboard

Update to support newer Arduino IDE and Intel Edison

Open pjalm opened this issue 9 years ago • 9 comments

Would it be possible to get an update to use this library? I can't get it to work with latest Arduino IDE.

Also would it be difficult to use it for the Intel Edison via WiFi?

pjalm avatar Mar 06 '15 12:03 pjalm

Is the issue you're seeing related to the Flash v5 library? If so, add the following lines in Flash.h, just after the #include <avr/pgmspace.h>:

#if ARDUINO >= 150
typedef char prog_char __attribute__((__progmem__));
#endif

The beginning of that file should look something like this:

#include <avr/pgmspace.h>

#if ARDUINO >= 150
typedef char prog_char __attribute__((__progmem__));
#endif

#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

#define FLASH_LIBRARY_VERSION 5
...

ovidiucp avatar Mar 06 '15 22:03 ovidiucp

About the Intel Edison support. TinyWebServer is designed to run in a memory constraint environment like the Arduino. Edison is a full blown Linux-based system, you can run any web server you want. On BeagleBone, a similarly powerful board made by TI, I've had great success with the Python-based Tornado.

ovidiucp avatar Mar 06 '15 22:03 ovidiucp

well i would not even add either library for me, i had to make a src folder, a library.properties file, remove a few other files then it added

pjalm avatar Mar 07 '15 13:03 pjalm

Reason i wanted to try your web server library if to make a web gui thats easy to modify using files on a sd card using arduino code, not node.js or apache etc. All the samples i find are bad, hav files hardcoded and crash a lot.

pjalm avatar Mar 07 '15 13:03 pjalm

btw i did add that to the flash header and still get compile errors

pjalm avatar Mar 07 '15 13:03 pjalm

This is not a very helpful bug report. Please list libraries you're trying to use, what code you're trying to compile and what compile errors are you seeing.

ovidiucp avatar Mar 07 '15 18:03 ovidiucp

I am simply trying to add Flash and TinyWebServer and can't do even that. When I try to add tem i get a lot of errors.

pjalm avatar Mar 07 '15 18:03 pjalm

Can you list the directory structure you have?

What is the Sketchbook location in Arduino IDE's preferences? Do you have a libraries directory inside that directory? Inside the libraries directory do you have the Flash and TinyWebServer directories? Do you see the Flash and TinyWebServer libraries in the Arduino -> Sketch -> Import Library... menu?

Where is your code located?

What compile errors do you see?

ovidiucp avatar Mar 07 '15 18:03 ovidiucp

I am on a Mac does that make any difference?

It shows /Users/pjalm/Documents/Arduino, and no they do not apear unless i manually make the properties file and make a src folder.

I think I got Flash one to party work now, just one error now.

In file included from sketch_mar07b.ino:1:0: /Users/pjalm/Documents/Arduino/libraries/Flash/Flash.h: In member function 'char* _FLASH_STRING::copy(char*, size_t, size_t) const': /Users/pjalm/Documents/Arduino/libraries/Flash/Flash.h:83:70: error: 'strncpy_P' was not declared in this scope strcpy_P(to, _arr + offset) : strncpy_P(to, _arr + offset, size); ^

pjalm avatar Mar 07 '15 18:03 pjalm