I put the web page data in flash then use the following code to retrieve and cn:send
It appears to work until you display the webpage, all you see is the text, What Am I doing wrong
using DEV 0.9.6 do this appears to save about 5k - if I can only get it to display..
rfh='15'
local line
file.open("csend.txt","r")
while true do
line = file.readline()
if (line == nil) then break end
cn:send(line)
end
cn:close ( )
collectgarbage()
here's what I see on the web page originally each line was enclosed (~~~~) removing didn't fix
'<!DOCTYPE HTML>\n<html lang="en-US">\n<head><meta http-equiv="refresh" content="'..rfh..'" ></head>\n'
'<script type = "text/javascript">\nvar timeInSecs;\nvar ticker;'
'function startTimer(secs){ timeInSecs = parseInt(secs)-1; ticker = setInterval("tick()",1000); }'
'function tick() { var secs = timeInSecs; if (secs>0) {timeInSecs--;} else {clearInterval(ticker); startTimer('..rfh..');}'
'document.getElementById("countdown").innerHTML = secs;} startTimer('..rfh..'); </script>'
'<body><div><table bgcolor="Lawngreen" border="1" cellpadding="5"><th><h1>ESP8266 Blinker Thing!</h1></th><td>'
'<IMG SRC="'..vt.s_img..'" LEFT="1" WIDTH="120" HEIGHT="60" BORDER="1"></td><th id="countdown">'..rfh..'</th></table><div><br>')
'<div><table bgcolor="'..vt.bgc..'" border="1" cellpadding="5">'
'<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>'
'<tr><td>DS18B20'..vt.p00..'</td><td>'..vt.cdeg0..'</td><td>'..vt.fdeg0..'</td>'
'<td>'..vt.apc0..'</td><td>'..vt.ppm0..'</td><td>'..vt.ppm1..'</td>'
'<td>'..vt.ppm2..'</td></tr><tr><th>Probe-K</th><th>Pool-PH</th><th>PH-Adj</th><th>ADC Value</th></tr>'
'<tr><td>'..vt.prb..'</td><td>'..vt.ph..'</td><td>'..vt.pha..'</td>'
'<td bgcolor="Red">'..vt.adc_value..'</td></tr></table></div><br>'
'<div><textarea name="cmds" cols="70" rows="10">'..vt.sbuf..'</textarea></div><br>'
'<form action="" method="POST">\n'
'<input type="submit" name="pwmi" value="Blink">\n'
'<input type="submit" name="pwmi" value="Adc">\n'
'<input type="submit" name="pwmi" value="D">\n'
'<input type="submit" name="pwmi" value="I">\n'
'<input type="submit" name="pwmi" value="40">\n'
'<input type="submit" name="pwmi" value="50">\n'
'<input type="submit" name="pwmi" value="60">\n'
'<input type="submit" name="pwmi" value="70">\n'
'<input type="submit" name="pwmi" value="W">\n'
'<input type="submit" name="pwmi" value="V">\n'
'<input type="submit" name="pwmi" value="xx"><br>'
'CMD<input type="text" name="pwmi" value="">'
'<input type="submit" value="Entr"></form><br>'