also works for me with sdk 1.5.4
>require("ESP8266").getState(); ={ "sdkVersion": "1.5.4(baaeaebb)", "cpuFrequency": 160, "freeHeap": 9144, "maxCon": 10, "flashMap": "4MB:512/512", "flashKB": 4096, "flashChip": "0xe0 0x4016" } >var ESP8266=require("ESP8266"); =function () { [native code] } >var Wifi = require("Wifi") =function () { [native code] } >Wifi.getIP(); ={ "ip": "192.168.194.64", "netmask": "255.255.255.0", "gw": "192.168.194.1", "mac": "5c:cf:7f:05:c1:00" } >ESP8266.setLog(2); =undefined >ESP8266.ping("192.168.2.1", function(e){ console.log(e);}); =undefined >140681> Received a ping response! { "totalCount": 0, "totalBytes": 0, "totalTime": 0, "respTime": 5, "seqNo": 1, "timeoutCount": 0, "bytes": 32, "error": 0 } >141775> Received a ping response! { "totalCount": 0, "totalBytes": 0, "totalTime": 0, "respTime": 2, "seqNo": 2, "timeoutCount": 0, "bytes": 32, "error": 0 } >142824> Received a ping response! { "totalCount": 0, "totalBytes": 0, "totalTime": 0, "respTime": 1, "seqNo": 3, "timeoutCount": 0, "bytes": 32, "error": 0 } >144024> Received a ping response! { "totalCount": 0, "totalBytes": 0, "totalTime": 0, "respTime": 1, "seqNo": 4, "timeoutCount": 0, "bytes": 32, "error": 0 } >145149> Received a ping response! { "totalCount": 0, "totalBytes": 0, "totalTime": 0, "respTime": 1, "seqNo": 5, "timeoutCount": 0, "bytes": 32, "error": 0 } >146322> ping 5, timeout 0, total payload 160 bytes, 5646 ms
@MaBe started
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.
also works for me with sdk 1.5.4