These are chat archives for esp8266/Arduino

7th
Aug 2015
Russ Mathis
@RussMathis
Aug 07 2015 12:54
I ordered some last week but have not got them yet.
simonlord
@simonlord
Aug 07 2015 13:04
anyone else having trouble accessing the board manager url, i can ping the host but http gets connection reduced for port 80: http://arduino.esp8266.com/stable/package_esp8266com_index.json
Ivan Grokhotkov
@igrr
Aug 07 2015 13:08
thanks for noting, smth wrong with server
will check
Ivan Grokhotkov
@igrr
Aug 07 2015 13:13
ok, should be up now
simonlord
@simonlord
Aug 07 2015 13:15
sweet thanks dude :)
Jakub Sobieraj
@sobiso
Aug 07 2015 13:43
hi anyone have example how to use html, js etc in separately file on spiffs not in code like
void handleRoot() {
  digitalWrite(led, 1);
  server.send(200, "text/plain", "hello from esp8266!");
  digitalWrite(led, 0);
}
Ivan Grokhotkov
@igrr
Aug 07 2015 13:50
no example yet, but you need to: 1) do SPIFFS.begin() 2) call server.serveStatic("/", SPIFFS, "/");
smth like this
feel free to experiment :)
Jakub Sobieraj
@sobiso
Aug 07 2015 14:10
thx :D
Jakub Sobieraj
@sobiso
Aug 07 2015 15:17
sorry for noob question but i put include <spiffs.h> and lib not found
Ivan Grokhotkov
@igrr
Aug 07 2015 15:32
include <FS.h>
sorry forgot to mention that in documentation
will fix
Jakub Sobieraj
@sobiso
Aug 07 2015 15:40
ok i have error

HelloServer.ino: In function 'void setup()':
HelloServer:68: error: 'class ESP8266WebServer' has no member named 'serveStatic'
'class ESP8266WebServer' has no member named 'serveStatic'
@igrr can you help me ?
Jakub Sobieraj
@sobiso
Aug 07 2015 15:45
I need latest version from github ?
Neil Kolban
@nkolban
Aug 07 2015 15:53
There is a new story on using the Arduino libraries and tool chain to build ESP8266 Arduino apps on an Eclipse environment ... see ... http://www.esp8266.com/viewtopic.php?f=32&t=4378
Jakub Sobieraj
@sobiso
Aug 07 2015 17:31
ok works, I build latest git repo :)
Ivan Grokhotkov
@igrr
Aug 07 2015 18:07
@sobiso cool, forgot to mention you need to use git version.
I'll write some docs and then will push into staging
Jose Galisteo
@ceritium
Aug 07 2015 19:05
Hello!
Markus
@Links2004
Aug 07 2015 19:06
hi
Jose Galisteo
@ceritium
Aug 07 2015 19:06
I have a nodemcu 0.9, Arduino 1.6.5 and the stable version of ESP board (installed today)
Markus
@Links2004
Aug 07 2015 19:06
yes?
Jose Galisteo
@ceritium
Aug 07 2015 19:07
I have some problems with deepSleep, I saw some issues and a PR
But I think that my problem is a little different
Markus
@Links2004
Aug 07 2015 19:07
PR?
Jose Galisteo
@ceritium
Aug 07 2015 19:08
pull request
Markus
@Links2004
Aug 07 2015 19:08
ok :) is GPIO16 connected to reset for deepSleep?
Jose Galisteo
@ceritium
Aug 07 2015 19:09
nop, then should be connected, right?
Markus
@Links2004
Aug 07 2015 19:10
yes or you will never wake up :)
Jose Galisteo
@ceritium
Aug 07 2015 19:10
ajam, ok, jeje, then I miss understood something :P
I'm going to try
and is normal that the blue led of the board turn on?
Markus
@Links2004
Aug 07 2015 19:12
i not have a nodemcu need to look in the schematic
Jose Galisteo
@ceritium
Aug 07 2015 19:12
ok, thanks
Markus
@Links2004
Aug 07 2015 19:13
blue led on is good then you are in sleep (if GPIO16 is connected to reset)
Jose Galisteo
@ceritium
Aug 07 2015 19:14
:D it's working
Markus
@Links2004
Aug 07 2015 19:14
you can bridge R3 so no wire needed :)
Jose Galisteo
@ceritium
Aug 07 2015 19:14
thankyou very much!
Markus
@Links2004
Aug 07 2015 19:14
blob
sticilface
@sticilface
Aug 07 2015 19:26

@igrr got spiffs working, to serve up a html page using this

       File f = SPIFFS.open("/power.htm", "r");
       server.send (200, "text", f.readString());
       f.close();

now when i try and use your example code, adding these appropriate lines, even to the webserverexmple

#include <FS.h>
...
SPIFFS.begin();
...
  server.serveStatic("/test", SPIFFS, "/power.htm");

I get this output:

Build options changed, rebuilding all
In file included from AdvancedWebServer.ino:35:0:
/Users/a/Library/Arduino15/packages/esp8266/hardware/esp8266/1.6.5-1023-gc7d4e49/cores/esp8266/FS.h:113:11: error: 'FS' is already declared in this scope
 using fs::FS;
           ^
AdvancedWebServer.ino: In function 'void setup()':
AdvancedWebServer:123: error: no matching function for call to 'ESP8266WebServer::serveStatic(const char [6], fs::FS&, const char [11])'
AdvancedWebServer.ino:123:51: note: candidate is:
In file included from AdvancedWebServer.ino:33:0:
/Users/a/Library/Arduino15/packages/esp8266/hardware/esp8266/1.6.5-1023-gc7d4e49/libraries/ESP8266WebServer/src/ESP8266WebServer.h:65:8: note: void ESP8266WebServer::serveStatic(const char*, FS&, const char*)
   void serveStatic(const char* uri, FS& fs, const char* path);
        ^
/Users/a/Library/Arduino15/packages/esp8266/hardware/esp8266/1.6.5-1023-gc7d4e49/libraries/ESP8266WebServer/src/ESP8266WebServer.h:65:8: note:   no known conversion for argument 2 from 'fs::FS' to 'FS&'
no matching function for call to 'ESP8266WebServer::serveStatic(const char [6], fs::FS&, const char [11])'
Jakub Sobieraj
@sobiso
Aug 07 2015 19:34
@sticilface you must have latest git repo
@sticilface
$ git clone https://github.com/esp8266/Arduino.git
$ cd Arduino/build
$ ant dist
sticilface
@sticilface
Aug 07 2015 19:37
I've git cloned Updating e836e7c..c7d4e49 , but then build my own package using build_board_manager_package.sh does that make a difference?
Ivan Grokhotkov
@igrr
Aug 07 2015 19:45
the first string in serveStatic should be a "directory" and the last one as well
but apparently that's not what is causing compiler error
sticilface
@sticilface
Aug 07 2015 19:54
ah i see, but nope that did not change anything!
as you predicted.
Ivan Grokhotkov
@igrr
Aug 07 2015 20:42
@sticilface yep, found the bug
sticilface
@sticilface
Aug 07 2015 20:43
figured it out... the #include <FS.h> has to come before the #include <ESP8266WebServer.h>
then it works
Ivan Grokhotkov
@igrr
Aug 07 2015 20:43
the workaround is to place includes in the following order:
#include "FS.h"
#include <ESP8266WebServer.h>
not the other way around
will fix that
sticilface
@sticilface
Aug 07 2015 20:43
:)
that was good timing
sticilface
@sticilface
Aug 07 2015 21:54
@igrr Are floats implemented with the 6-7 digits of precision? When I use serial it always seems to print two decimals. Ie 1.00
sticilface
@sticilface
Aug 07 2015 22:42
Ignore that, my bad for not doing my research.