Much better I think. My -7 error and out of sockets seem better/fixed, but I am still seeing
[Fiddler] The socket connection to 192.168.254.248 failed.
ErrorCode: 10061.
No connection could be made because the target machine actively refused it 192.168.254.248:8080
when I repeatedly click on the various buttons created by this code
E.enableWatchdog(10);
var eth = require("WIZnet").connect();
/* eth.setIP({ ip : "192.168.254.248" });
eth.setIP({ dns : "208.67.222.222" });
eth.setIP({ gateway: "192.168.254.100" }); */
eth.setIP();
eth.getIP();
function onPageRequest(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('<html><body>');
res.write('<p>Button is '+(BTN.read()?'on':'off')+'</p>');
res.write('<p>Turn LED1 <a href="/on1">on</a> or <a href="/off1">off</a></p>');
res.write('<p>Turn LED2 <a href="/on2">on</a> or <a href="/off2">off</a></p>');
res.write('<p>Turn LED3 <a href="/on3">on</a> or <a href="/off3">off</a></p>');
res.write('<p>Turn all LEDs <a href="/onall">on</a> or <a href="/offall">off</a></p>');
res.end('</body></html>');
if (req.url=="/on1") digitalWrite(LED1, 1);
if (req.url=="/off1") digitalWrite(LED1, 0);
if (req.url=="/on2") digitalWrite(LED2, 1);
if (req.url=="/off2") digitalWrite(LED2, 0);
if (req.url=="/on3") digitalWrite(LED3, 1);
if (req.url=="/off3") digitalWrite(LED3, 0);
if (req.url =="/onall") {
digitalWrite(LED1,1);
digitalWrite(LED2,1);
digitalWrite(LED3,1);
}
if (req.url =="/offall") {
digitalWrite(LED1,0);
digitalWrite(LED2,0);
digitalWrite(LED3,0);
}
}
require("http").createServer(onPageRequest).listen(8080);
I am using a little chrome extension called iMacros to record a set of clicks on the page and then run in a loop.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Much better I think. My -7 error and out of sockets seem better/fixed, but I am still seeing
when I repeatedly click on the various buttons created by this code
I am using a little chrome extension called iMacros to record a set of clicks on the page and then run in a loop.