These are chat archives for esp8266/Arduino

25th
Sep 2015
brutzler
@brutzler
Sep 25 2015 01:54
Hi, anyone tested the "String.substring()" function? I do not get it working. "String.replace" is fine. Want to eleminate redundate spaces of HTML-code in a string before sending:
 while (html_index.substring(0) == "  ") {
 html_index.replace("  "," ");
 }
Michael Miller
@Makuna
Sep 25 2015 04:09
@kzyapkov did you try using the standard Arduino model progmem to accomplish this? I am not at my computer right now but it does work, and there specific methods on classes that can take them, *_P () methods. See Arduino docs on progmem for help.
Kiril Zyapkov
@kzyapkov
Sep 25 2015 10:38
@Makuna thanks for those wrappers btw :)
Neil Kolban
@nkolban
Sep 25 2015 12:46

JavaScript engine port

The JavaScript engine port (Espruino) has run into a snag. See the following post:

http://forum.espruino.com/conversations/274894/

It appears that the engine that runs the JavaScript needs to be able to periodically "yield()" back to ESP8266 otherwise it is starved. @igrr has beautifully solved this problem (as I understand it) in the Arduino library. He has also graciously offered this code for re-use within the Espruino port. However, we need help in comprehending how to use and architect the inclusion of this technique. Does anyone have time, skills and inclination to assist in comprehending the yielding logic in the ESP8266 Arduino project for consumption in another project? --- Neil

Steve Nelson
@zenmanenergy
Sep 25 2015 13:31
@fmgomes I ran into that same problem, at least i think it was the same problem, yesterday @martinayotte said: "@zenmanenergy, I've get it a try, I've got HTTPS request working if I use client.readStringUntil('\r');, but got a crash if I use client.read(msg, size); . I've submitted this bug esp8266/Arduino#813"
Steve Nelson
@zenmanenergy
Sep 25 2015 13:48
does anyone have an example of a timer interupt that works with the esp?
Kiril Zyapkov
@kzyapkov
Sep 25 2015 14:46
Has anyone else observed WiFi flakiness when using ADC reads?
Michael Miller
@Makuna
Sep 25 2015 16:24
@zenmanenergy look at the included servo library, it uses both timer0 and timer1, which are each unique in what they support for options. The timer are abstracted somewhat, so don't get distracted by that.
Steve Nelson
@zenmanenergy
Sep 25 2015 16:25
I see a servo library on github, but not in the IDE examples for the staging version. The way the IDE handles examples has always confused the shit out of me. Should it be in the examples?
I see a “Servo-sweep” by Scott Fitzgerald. is it that one?
Michael Miller
@Makuna
Sep 25 2015 16:51
It's not an example. Just look at the source code for how the servo update is implemented in the servo library.