This code has worked on previous versions, just not consistantly.
This is implying that we are short on memory, if this is the case, I better stick with lua.
I can cut/snip and store, but don't know how to invoke from within the HTML.
Explore... Chat... Share...
Moderator: Mmiscool
mycommand = " "
rfctr = 0
adc_id = 0
adc_value = 512
k1 = 0.11
p00 = 'P'
apc0 = '11111'
ppm0 = '1770'
cdeg0 = '25.1'
kta0 = '0.01'
lo0 = '12'
hi0 = '20'
prb = '01.0'
ph = '7.0'
sbuf = ""
rfh = '15'
Ipage = 'http://i.imgur.com/KS1dPa7.png'
wprint "<meta http-equiv='refresh' content='15' >"
wprint "<script type = 'text/javascript'>"
wprint "var timeInSecs;"
wprint "var ticker;function startTimer(secs){"
wprint "timeInSecs = parseInt(secs)-1;"
wprint "ticker = setInterval('tick()',1000);}"
wprint "function tick() {"
wprint "var secs = timeInSecs;"
wprint "if (secs>0) {timeInSecs--;} else {clearInterval(ticker);"
wprint "startTimer(15);}document.getElementById('countdown').innerHTML = secs;} startTimer(15);"
wprint "</script><body><div>"
wprint "<table bgcolor='Lawngreen' border='1' cellpadding='5'>"
wprint "<th><h1>ESP8266 Blinker Thing!</h1></th>"
wprint "<td><IMG SRC='http://i.imgur.com/KS1dPa7.png' LEFT='1' WIDTH='120' HEIGHT='60' BORDER='1'></td>"
wprint "<th id='countdown'>15</th></table><br>"
wprint "<div><textarea name='cmd1s' cols='70' rows='14'></textarea></div><br>"
wprint "<div><textarea name='cmd2s' cols='70' rows='6'></textarea></div><br>"
wprint "<div><table bgcolor='Yellow' border='1' cellpadding='5'>"
wprint "<tr><th>Sensor</th><th>TempC</th><th>TempF</th><th>PPMcntr</th><th>PPM__</th><th>Adj__1</th><th>Adj__2</th></tr>"
wprint "<tr><td>DS18B20P</td><td>25.9</td><td>78.6</td><td>43708</td><td>1676</td><td>1644.9</td><td>1644.2</td></tr>"
wprint "<tr><th>Probe-K</th><th>Pool-PH</th><th>PH-Adj</th><th>ADC Value</th></tr>"
wprint "<tr><td>01.0</td><td>7.0</td><td>7</td><td bgcolor='Red'>902</td></tr></table></div><br>"
button "BLINK" [BLINK]
button "RD_ADC" [RDA.DC]
button "TEMP_DN" [TEMP.DN]
button "TEMP_UP" [TEMP.UP]
WPRINT "<BR>CMD:"
textbox mycommand
button "SUBMIT" [SUBMIT.BRANCH]
wprint "<br>
wait
[BLINK]
print "you clicked blink"
wait
[RDA.DC]
print "you clicked rda dc"
wait
[TEMP.DN]
print "you clicked temp dn"
wait
[TEMP.UP]
print "you clicked temp up"
wait
[SUBMIT.BRANCH]
PRINT mycommand
wait
Ipage = 'http://i.imgur.com/KS1dPa7.png'
B_Opn = 'http://i.imgur.com/kzt3tO8.png'
B_Clo = 'http://i.imgur.com/KS1dPa7.png'
and changed
[BLINK]
if Ipage == B_Clo then
Ipage = B_Opn
else
Ipage = B_Clo
endif
SERIALPRINTLN Ipage
wait
AND
wprint "<td><IMG SRC=Ipage LEFT='1' WIDTH='120' HEIGHT='60' BORDER='1'></td>"
Ipage = 'http://i.imgur.com/KS1dPa7.png'
B_Opn = 'http://i.imgur.com/kzt3tO8.png '
B_Clo = 'http://i.imgur.com/KS1dPa7.png'
[BLINK]
if len(Ipage) = len(B_Clo) then Ipage = B_Opn else Ipage = B_Clo
wait
wprint "<td><IMG SRC="
wprint htmlvar(Ipage)
wprint " LEFT='1' WIDTH='120' HEIGHT='60' BORDER='1'></td>"
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]