-
• #2
Hi - The issue is just that the 'console' reverts to Serial1 (which you have the GPS on when USB is disconnected).
Just add
USB.setConsole(1)
toonInit()
and you'll be sorted - it forces the console to stay on USB.Also, I would:
- Rename
oninit
toonInit
(it's case sensitive) - Remove the call to
oninit()
andsave()
from your code, and just typesave()
on the left-hand side after upload.
That'll make sure
onInit()
is called just once on startup (it's done automatically after thesave()
). If it gets called twice (once before save and once after) then you'll end up with 2 sets of GPS modules added and so two sets of identical readings added to the file.Hope that helps!
- Rename
-
• #3
Gordon that's amazing!
thank you all up and running now - coming from using arduinos i'm still getting my head around the espruino workflow
thanks
b
Hi - trying to solve an issue using an espruino pico and an sd card loggin gps and other sensor data
when connected to the usb and the ide it functions fine and logs the data as csv but as soon as i go to standalone mode using a battery nothing seems to happen
i have placed it all in onInit but can't seem to get anything going
any help would be super appreciated as i am super up against a project deadline on this thanks