Hah! Found the manual page :-) http://www.espruino.com/Reference#Storage
I'll go away now and read up :-)
There is a lot of classical online manual about Espruino and more so new fashion style thru forum... and very understood is the fact that new new born bangle.js baby has to grow its marks... and is already doing so. We try not to use the RTFM since we as a - guidance abiding (?) - community try to stay away from foul, demeaning language. It helps no one. As well known: there are no stupid questions, only stupid answers. --- Yes, it will become subtile communicated when due diligence is intentionally omitted and laziness hailed!... Enjoy and keep asking, communicating, sharing...
To the subject matter: yes memory is a challenge... and with addition of it power becomes an issue too... but it should be possible to squeeze in a serial flash eeprom... of course not without any finicky manual labor.
Best design approach is to band your phone and bangle.js together: make bangle.js the ring leader and include the phone as ring supporter. There are 'bridge apps' for the phone(s) available that help with that.
Aww thanks... blush
blush accepted... my screen did though not change its complex... :O)> - Since the new fashion style doc - forum - stuff is in conversation and they often go down rabbit trails and holes - change the subject mid ways - finding things is not that easy. Google - using search engine - is the only help here. On the other hand, help is much more alive and reality related than a pure reference doc. Context helps not just to answer the immediate question, but to come up with even a better overall solution.
btw, POT / PIOT... like your avatar... just not the weedy way!
...is PI indicating a berry past? ...did you run out of pleasant desert?
I should add that http://www.espruino.com/Reference shows features that are in Espruino 2v04 but not the features that have been added since then (eg for the beta Bangle.js firmware). For that, there's: https://banglejs.com/reference
The specific one that would be most useful to you is https://banglejs.com/reference#l_Storage_open
Some examples of it here: https://github.com/espruino/Espruino/blob/master/tests/test_storage_file.js
It's still early days, but is intended for exactly the kind of thing you're after (eg. logging)
.readLine()returns the newline char at the end - if there is.
What about a
.seek(pos)?` and with no argument being '.length()'? ...may be opt 3rd arg in open? ... and optional 4th arg as like '.substr()' with auto close if not 5th arg 'keepOpen' is supplied?
Interesting that .readLine() returns the newline char at the end - if there is.
I seemed to recall that's what C does, which is why I kept it: https://linux.die.net/man/3/getline
What about a .seek
That could be added, but these are really meant as text files, so seek isn't that much use in this case. Either way you couldn't
seekand then write (it'd be for reading only).
Seek still good enough for writing page display information in a single file and use it from there in pieces - like streaming morsels - to not having load the memory with everything... I'm thinking about my ui definitions... they are now twice in memory: as source and as (tree) structured data.
Hi Team, just got my BangleJS Beta unit today and starting poking around Espruino for the first time.
Any way a Bangle app can save values to a temporary storage on the watch. I realise this might be fairly limited. But I am looking for a mode where the watch stores stuff on device and sends them off to another connected device.
Basically I want continuous heart-rate monitoring (as efficiently as possible)... but there isn't much point in continuous monitoring if I can't save all the data.
Hope this makes sense. Please feel to do a "RTFM" but just give me a page number to look at :D