I'm new to developing on the bangle.js watch. I've got an app to a spot where I'd like to store data and update a website. I've been looking at storage options and I understand how I can store data on the watch, and also on an exportable csv... but is there a way for me to programmatically write to a database?
Watch button gets clicked.
Log gets created in database.
Website is updated from log.
Your help is much appreciated.
There's no inbuilt database in Bangle.js, just files.
What data did you want to store in this database?
What I'd suggest is you use the require("Storage").open("file.csv","a").write("some data\n"); that you already came across to append the data each time the watch button is pressed.
Then when you're in contact with the website, you upload the contents of that file and then erase it, so next time you do it you're only uploading the stuff that changed since last time.
@Gordon, thank you for getting back to me. I have been playing around with all the features and I believe I figured out how to do what I wanted to do after reviewing your "data streaming" example :)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem