The use of the ESP8266 in the world of IoT

User avatar
By rudi
#6901
alonewolfx2 wrote:its faster than old one. but bootstrap.css is 115kb :) i am looking small ui alternatives like pure( >20kb )

hi mehmet, happy new year!
what you will make with webserver?
switch and adc?
picture and more?
btw: do you watering well? ;-)
best wishes
rudi ;-)
User avatar
By alonewolfx2
#6910
rudi wrote:
alonewolfx2 wrote:its faster than old one. but bootstrap.css is 115kb :) i am looking small ui alternatives like pure( >20kb )

hi mehmet, happy new year!
what you will make with webserver?
switch and adc?
picture and more?
btw: do you watering well? ;-)
best wishes
rudi ;-)

He rudi :)
I am making garden monitor. Switch, adc(I think not stable), humidity, thermometer, watering system for my vegetables and flowers :)
User avatar
By rudi
#7320
alonewolfx2 wrote:[He rudi :)
I am making garden monitor. Switch, adc(I think not stable), humidity, thermometer, watering system for my vegetables and flowers :)


;-)
fine. then let us start:

make inline pic*s with hex tool
http://www.heise.de/download/base64-de- ... 58399.html

and make symbols for your switch on / off
Code: Select allconst char sw_on[]  = "<img src=\"data:image/png;base64,here your data ....==\" />";
const char sw_off[] = "<img src=\"data:image/png;base64,here your data  ....==\" />";
// const char adc[]     = ......adcread();
..



then you can make your trivial fw and function
web responsen:

Code: Select all
// constanten like you want
// or central in a webside.h
// here only for examples
// must be response for doc request in tcp

const char hs0[]="HTTP/1.0 200 OK\r\nCONTENT-TYPE: text/html\r\n\r\n";
const char hs1[]="<html><head><title>Switch</title></head><body>";
const char hs2[]="<center>Relais One<br>";
const char hs3[]="<img src)\""; // here only for synom look to top - hs3 is not need..
const char hs4[]="</center></body></html>";

..
// switch reqeust..
..

if (sw==on) {
os_sprintf(at_dataline,"%s%s%s%s%s%s",hs0,hs1,hs2,hs3,sw_on,hs4);
}
if (sw==off) {
os_sprintf(at_dataline,"%s%s%s%s%s%s",hs0,hs1,hs2,hs3,sw_off,hs4);
}

 at_tranLen = strlen(at_dataLine);
 os_sprintf(WebSide,"\r\n %s\r\n", at_dataLine);
 uart0_sendStr(WebSide);
 espconn_sent (pLink[0].pCon, at_dataLine, at_tranLen);

// close it..
 espconn_disconnect(pLink[0].pCon);

..






best wishes
rudi ;-)