These are chat archives for esp8266/Arduino

24th
Jan 2017
mega-hz
@mega-hz
Jan 24 2017 01:21
Hi everybody, i need a hint.
i want to put a HTML code into a string like this:
const char INDEX_HTML1[] =
"<!DOCTYPE html>"
but how can i put in there those " " ?
is there a method of replacing them?
mega-hz
@mega-hz
Jan 24 2017 01:41
yes?
efess
@efess
Jan 24 2017 01:41
spaces or double quotes?
mega-hz
@mega-hz
Jan 24 2017 01:42
like this one: var leds = ["LED0", "LED1
" var leds = ["LED0", "LED1..... ";
Michael Miller
@Makuna
Jan 24 2017 01:44
did you look at the link?
mega-hz
@mega-hz
Jan 24 2017 01:44
yes, i read \" is that the right one?
seems to be, looks good!
Michael Miller
@Makuna
Jan 24 2017 01:45
yes, the one with the big green check is the one that answers the question.
mega-hz
@mega-hz
Jan 24 2017 01:46
ok, thanky very much!
My problem is: i want to setup a esp webserver and when i try to get the html page of SPIFFS the server gets very slow or the connection doesnt work.
so i try to put the website into chars...
efess
@efess
Jan 24 2017 01:48
flash is pretty fast, I can't imagine that'd be your bottleneck
mega-hz
@mega-hz
Jan 24 2017 01:48
the page itself is ok, is running on an Arduino Ethernet... see http://mega-hz.dnshome.de:85
maybe there is something wrong with SPIFFS because there is also a IL94xx SPI TFT on the SPI?
(the tft is working fine)
Me No Dev
@me-no-dev
Jan 24 2017 02:18
@Makuna analogWrite is 8bit on AVR Arduino, because some of the timers are 8 bit and some are 16 bit. I guess they opted for the lower resolution
Victor Tseng
@Palatis
Jan 24 2017 05:27
let me ask a stupid question...
what's the major difference between crc8 ccitt and crc8 ibutton?
Michael Miller
@Makuna
Jan 24 2017 06:02
@me-no-dev There is another function you can call to expand it to 10bit+, analogWriteResolution(), which what Arm and other Arduino boards use to expand beyond the 8bit.
suraj
@surajk4437
Jan 24 2017 10:10
hello
mega-hz
@mega-hz
Jan 24 2017 10:10
hi
Gleb V
@glebv
Jan 24 2017 10:12
Hi, could you recommend some special open source solution to monitoring (health checking) wifi sensor nodes (esp8266) and all my home IoT infrastructure?
mega-hz
@mega-hz
Jan 24 2017 10:13
sorry, no
suraj
@surajk4437
Jan 24 2017 10:16
plz give me complete path how we can connect the esp8266
mega-hz
@mega-hz
Jan 24 2017 10:25
Hi, can someone help me please? I have a very strange behaivoir of my esp sending a web-page:
If i use this [code]// webFile = SPIFFS.open("/web-io-peter.htm", "r");
// if (webFile)
// {
// while(webFile.available())
// {
// client.write(webFile.read()); // send web page to client
// }
// webFile.close();
// }
[/code]
it doesnt run or runs after long time
if i send the Web Page with client.write(INDEX_HTML1);
client.write(INDEX_HTML2);
it runs very well!
INDEX.HTML is in a char: const char INDEX_HTML1[] =
"<!DOCTYPE html>\r"
"<html>\r"
why can't i read and send it directly of the SPIFFS?
(and how can i put code into this chat?)
Holger Lembke
@holgerlembke
Jan 24 2017 12:11
this makes a download. remove lines as you need...
      File dataFile = SPIFFS.open(downloadfilename.c_str(), "r");
      if (dataFile) {
        webserver->sendHeader("Content-Disposition", "attachment; filename=" + downloadfilename.substring(1));
        webserver->sendHeader("Content-Transfer-Encoding", "binary");
        if (webserver->streamFile(dataFile, "application/octet-stream") != dataFile.size()) {
          SerialUDP.println(F("Sent less data than expected!"));
        }
        dataFile.close();
      }
holgerlembke @holgerlembke needs to be retrained every time for putting code into the chat....
brutzler
@brutzler
Jan 24 2017 17:57
Does anybody know, if Arduino IDE 1.8.x is already working proper with ESP-plugin? Should be "build-time-improvement" in the new release.
bobcroft
@bobcroft
Jan 24 2017 18:43
brutzler, I have the ESPplugin working perfectly on both Arduino IDE 1.8.0 and 1.8.1. Build time is certainly better than the older versions
mega-hz
@mega-hz
Jan 24 2017 19:42
stupid question (using gitter 1st day): how can i post code like that black box above?
donnib
@donnib
Jan 24 2017 20:00
hi, i am using this library which has a method called void OLED::print(char *s, uint8_t r, uint8_t c) and it takes a char *s and in my method i am calling print from i have a uint8_t* data and i am calling print method like this display.print((char*)(data[0])); but the ESP crashes on this, what am i doing wrong ?
brutzler
@brutzler
Jan 24 2017 20:06
@bobcroft
thx. What release of ESP? --> 2.3.0 stable?
BTW: building time:
Can anybody confirm, that the building time with active virus-scanner needs a lot of more time?
Using Windows 7 with Trend Micro Maximum
mega-hz
@mega-hz
Jan 24 2017 20:14
test
ahhh, ok :-)
brutzler
@brutzler
Jan 24 2017 20:17
bulding same sketch: 16 sek with active virus scanner; 7 sec without
OK, files are not on local harddisk, but on a server in my local network
brutzler
@brutzler
Jan 24 2017 20:27
BTW: No improvement on building time from 1.6.13 to 1.8.1 :worried:
Michael Miller
@Makuna
Jan 24 2017 23:35
@donnib You are casting the value stored in data[0] to a char*, I don't think this is what you want. try display.print((char*)data);