trying to port some code from nodemcu
Posted: Fri Oct 02, 2015 6:32 pm
This is a try to port a small amount of code over from nodemcu,, and of course it don't work, since I really don't know what to do....the save option is not working for me pops up the security login junk and does not save.
I tried RUN on the following code snip ... It's a simple HTML header with some java for a counter , I suspect the syntax is bad,but don't get any indication . I'm not sure if this basic can even handle the all the characters..
I thought I would get a dhcp connection , How do I check if connection accomplished?
So how do I display the page
This is the actual html page I'm trying to use
I tried RUN on the following code snip ... It's a simple HTML header with some java for a counter , I suspect the syntax is bad,but don't get any indication . I'm not sure if this basic can even handle the all the characters..
I thought I would get a dhcp connection , How do I check if connection accomplished?
So how do I display the page
Code: Select all
ssid = "12345-NETGEAR"
password = "mikeis12345"
rfh='15'
connect ssid password
wprint {<!DOCTYPE HTML>\n<html lang="en-US">\n<head><meta http-equiv="refresh" content= rfh ></head>\n}
wprint {<script type = "text/javascript">\nvar timeInSecs;\nvar ticker;}
wprint {function startTimer(secs){ timeInSecs = parseInt(secs)-1; ticker = setInterval("tick()",1000); } }
wprint {function tick() { var secs = timeInSecs; if (secs>0) {timeInSecs--;} else {clearInterval(ticker); startTimer(rfh);}}
wprint {document.getElementById("countdown").innerHTML = secs;} startTimer(rfh); </script>}
wprint {<body><div><table bgcolor="Lawngreen" border="1" cellpadding="5"><th><h1>ESP8266 Blinker Thing!</h1></th>'}
wprint {<td><IMG SRC= &s_img LEFT="1" WIDTH="120" HEIGHT="60" BORDER="1"></td>
wprint {<th id="countdown"> rfh </th></table><div><br>}
wait
This is the actual html page I'm trying to use
Code: Select all
<!DOCTYPE HTML>
<html lang="en-US">
<head><meta http-equiv="refresh" content="15" ></head>
<script type = "text/javascript">
var timeInSecs;
var 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(15);}document.getElementById("countdown").innerHTML = secs;} startTimer(15);
</script>
<body>
<div>
<table bgcolor="Lawngreen" border="1" cellpadding="5">
<th><h1>ESP8266 Blinker Thing!</h1></th>
<td><IMG SRC="http://i.imgur.com/KS1dPa7.png" LEFT="1" WIDTH="120" HEIGHT="60" BORDER="1"></td>
<th id="countdown">15</th>
</table>
<br>
<div>
<textarea name="cmd1s" cols="70" rows="14"></textarea>
</div>
<br>
<div>
<textarea name="cmd2s" cols="70" rows="6"></textarea>
</div>
<br>
<div>
<table bgcolor="Yellow" 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>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>
<tr>
<th>Probe-K</th>
<th>Pool-PH</th>
<th>PH-Adj</th>
<th>ADC Value</th>
</tr>
<tr>
<td>01.0</td>
<td>7.0</td>
<td>7</td>
<td bgcolor="Red">902</td>
</tr>
</table>
</div>
<br>
<form action="" method="POST">
<input type="submit" name="m_do" value="BLINK" style="padding:5px;10px;">
<input type="submit" name="m_do" value="RD_ADC" style="padding:5px;10px;">
<input type="submit" name="m_do" value="TEMP_DN" style="padding:5px;10px;">
<input type="submit" name="m_do" value="TEMP_UP" style="padding:5px;10px;">
<br>
"CMD:"<input type="text" name="m_do" value="" maxlength="100" style="padding:5px;10px;">
<input type="submit" value="Submit">
</form>
<br>
</body>
</html>