-
-
Hi Gordon
- Espruino Wifi is powered by VUSB and GND Pin, 5v (Not USB)
- Wifi is connected
- Relay is connected to the same powersource, 5v, trigger on A5 (Nothing connected to the relay on the load side)
- A6 is monitored by setWatch, nothing connected to A6
SetWatch:
pinMode(A6, "input_pulldown");
setWatch(function(e) { do something }Relay:
When i switch the relay width "digitalWrite(A5,1)" on, relay will be triggered as expected.
Sometimes the A6 setWatch is triggered in the same moment as the relay is triggered. Not allways, it is reproduceable out of 25 on/off switches of the relay.
I was not able to reproduce it when i have the setWatch on A1.
I was also not able to reproduce it then i powered the EspruinoWifi by USB.Is this becuase A5 and A6 are neighbors ?
Thanks
Sacha - Espruino Wifi is powered by VUSB and GND Pin, 5v (Not USB)
-
-
-
-
Hi Gordon
I noticed that i get from time to time the following error in the console on the EspruinoWifi:
"New interpreter error: FIFO_FULL"
It happens, when i send socket data (small junk of JSON data) after a setWatch of a button is triggered.
It is very difficult to reproduce.
- process.memory shows more than 3500 free mem after the error
- I think it never happens when i send data triggered by setTimeout or setInterval
- It happens very rarely
- It seams to be that it happens only after powerup, triggered by one of the first setWatches but well after the board is wifi connected.
- After the error, everything is working as expected with additional setWatches and socket transfers.
I use the following pins with setWatch:
A1, A5, A6, A7, B9, B8, B4
I think it's not dedicated to a special pin i used.
Greetings
Sacha
- process.memory shows more than 3500 free mem after the error
-
-
-
-
Hi Gordon
I would like to share my first experiences with the EspruinoWifi.
For testing i have two Espruinos, both as a socket server and client. In the last 24h i connected every 7 second to the other Espruino and catched some data.
More than 12'000 times without any error or glitches. Most important, memory usage is stable too.
Very nice.
Sacha
-
Hi There
I just received a few espruino.wifi boards. Nice work!I try to detect the connected or disconnected event without success. I did not get any of this two events. No connected event on connect and no disconnect event when i switch off my wifi AP.
Code:
var wifi = require("EspruinoWiFi"); var WIFI_NAME = "XYZ"; var WIFI_OPTIONS = { password : "PW" }; console.log('Starting...'); wifi.on('connected', function(data) { console.log("> connected "+data); }); wifi.on('disconnected', function(data) { console.log("> disconnected "+data); }); wifi.connect(WIFI_NAME, WIFI_OPTIONS, function(err) { if (err) { console.log("Connection error: "+err); return; } wifi.getIP(function(f,ip) { console.log("Connected: ", ip); }); });
The console output is:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v94 Copyright 2016 G.Williams >Starting... =undefined Connected: { "ip": "192.168.68.175", "mac": "5c:cf:7f:c0:14:c8" } >
-
Thanks. As far a i know the xbee modules only supprts HW flow control.
@Gordon: What about HW flowcontrol ? -
Dear Espruinos
I use several picos with an xbee modul to communicate to each other.
I only connected power and rx/tx. So there is no flow control used.Maybe as a result, when i communicate faster than 2400bps i have data losses.
I would like to test it with flowcontrol. Do the pico support HW flowcontrol ?
Thanks for your advise
Sacha
-
-
@allObjects
Thanks, i know about onInit. I didn't know that the watchdog function has to be called/restarted after a reset while other internal functions like Intervals/Timers for example not. -
Dear Gordon
I've done some tests with the new watchdog function. My testcode is the following (right side):doreset=false;
setInterval(function() { if(doreset===false) { console.log('kick'); E.kickWatchdog(); } },20000);
E.enableWatchdog(25,false);
save();You will see in the console every 20 seconds 'kick'. E.kickWatchdog is called.
Then please set the var doreset to true:doreset=true;
After a few seconds the pico will reset. Then please reconnect to the console.
You will see the output of 'kick' again.Please give the variable doreset again the value of true.
doreset=true;
On the console 'kick' messages are gone. E.kickWatchdog is not called anymore.
But the pico does not reset after more that 25 seconds. Please see the attached screenshot.
Do I understand something wrong ? It only resets once ?
Thanks
Sacha
-
-
-
-
-
-
Hi Gordon
I try to use the new UDP/Broadcast feature. First to receive UDP packages/messages.
Here is the code on the serverside, nodejs on linux. It sends a small JSON string every 10 seconds:
Please replace "BROADCAST_ADDR" with yours.
Please start it with node:
node test.js
And now, this is the code running on EspruinoWiFi. Please replace your WLAN SSID and PW:
Please type "save" on the EspruinoWiFi.
Espruino receives packets. They are often corrupt, not complete or even from a wrong IP Address ??
It's a question of time, then the espruino is crashing.
Thanks for your help.
Sacha