-
I had the some problem with the new psu too. It was the first impression. I need more time to investigate my code as well.
@Gordon will try to run your code as well. I connected the power to the pins marked with the blue arrow. -
-
-
I have a lot of picos running 7/24, powered DC 5v. I discovered also that some picos (V1,85) does not fire setInterval anymore, everything else is working. I do not have a special crystal. But i sync the time via xbee from a server. So i call every several minutes setTime().
@Gordon: Could it be that when i use setTime() to correct the current time that setIntervals are lost because i corrected the time a huge amount to the future ?
I have to dismount carefully a affected pico without powerloss to discover in the IDE what's the state. Is there a way to debug setTimouts or setIntervals ?
Thanks
Sacha -
-
Hello Espruinos
A few days ago two fix installed picos has frozen. I was not able to connect over USB anymore.
After disconnect and reconnect the power (5 Volt) everything was back and working.The only thing i saw was that one connected relay has switched on and off just before the freeze.
The picos are connected to a little psu with 5V out at the batterie connector. I did not know what happend. Maybe a little little poweroutage. But no other devices are affected.
I expected a reboot, not a freeze.
Are there any recommandations to stable the power ? Installing a capacitor ?
Many thanks for your help
Sacha
-
-
Hi Gordon
This code works in node, but on a espruino we get NaN
R2D=57.29577951308; D2R=0.01745329251; L=1430093322686.17651367187; RA = R2D * Math.atan(0.91764 * Math.tan(L * D2R)); console.log('Gordon:'+RA);
Node:
root@purple:~# cat test.js R2D=57.29577951308; D2R=0.01745329251; L=1430093322686.17651367187; RA = R2D * Math.atan(0.91764 * Math.tan(L * D2R)); console.log('Gordon:'+RA); root@purple:~# node test.js Gordon: 49.01889864197386 root@purple:~#
Espruino 1V84:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v84 Copyright 2015 G.Williams >echo(0); Gordon:NaN =undefined >
Merry Christmas
Sacha
-
-
-
-
In addition magic 'ec' is typed on the console.
After running the above code waiting ten seconds then hit return. We have the following output:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v83 Copyright 2015 G.Williams >echo(0); Move console to loopback Console back to USB Content of test: Sacha Uncaught ReferenceError: "ec" is not defined
-
Hi Gordon
The following code moves the console to LoopbackA. 10 sec. later back to USB.
It works as expected. But we do not have echo on the console and there is no prompt.Code:
var test='Sacha'; setTimeout(function() { USB.setConsole(); console.log('Console back to USB'); console.log('Content of test: '+test); },10000); console.log('Move console to loopback'); LoopbackA.setConsole();
-
-
If your espruino is connected to another device that knows the time,timezone and daylight saving, it could be easy (over Wifi or Xbee in my situation). In my setup i transfer seconds after EPOC (1970) minus/plus the differece to UTC to the espruino. I set the time with setTime on the espruino side then ignore the timezome at all. The time it self is correct ignoring the timezone (UTC) on the espruino at all.
-
@DrAzzy
I'm also interessted. What about selling a complete shield/board for the pico like the arduino one, but as a shield. See gnz dropbox link. I think this will sell much better.
Maybe in a solder your self version. -
-
-
-
-
Hi Espruinos
I try to use the following part library in Eagle 7.5.0:
https://github.com/espruino/EspruinoBoard/tree/master/Pico/Component/espruino_pico.lbrI copied it to the eagle installation directory in the subdir 'lbr'
When i search in eagle for espruino i only get one uncomplete original espruino board presented.
Thanks
Sacha
-
-
Hi Gorden
Sorry, something goes wrong with 1.82. This code worked with 1.81. Now the Pico crashes with the following on the console:>ff = process.memory().flash_start + 384*1024; =134610944 >f=require("Flash"); =function () { [native code] } >f.erasePage(ff); =ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
After reinsert the pico into USB, the red LED is on permanently. Have to reflash to access the pico.
Thanks
Sacha
Hi Gordon
I still have some problems with my pico farm, connected over an xbee mesh.
Problem: setInterval is not called anymore.
I first had the impression that it was the psu. That's not the case.
I broadcast the time every 5 minutes from my Linux server over xbee and set the time on the picos using setTime();
In fact, my setInterval is called often before the first setTime() was executed.
I commented the setTime() function out on my test pico. The problem is gone.
I tried to isolate it to reproduce the problem. At the moment i was not able to reproduce a stop of calling the setInterval function. But this code shows that setInterval and maybe setTimeout is not setTime proof/aware.
Try this code: It should be called every 30 Seconds
console.log('Hello Espruinos');
console.log(getTime());
console.log('Setting up setInterval');
setInterval(function() { console.log('Called:'+getTime()); }, 30000);
setTime(467835036);
The setInterval function is called rapidly as fast as possible.
I need a way to use setInterval in parallel of using setTime. A work around could be to clear the intervals before calling setTime and start it again. But this is not so handy. Because my code is very object oriented. It not easy to handle that. Is there another work around ?
Thanks for your help.
Sacha
Greatings
Sacha