What can I use to configure dozens of pucks with some code?
I'd like to autoscript it is possible with variables. I have a spreadsheet with all the MACs, and I'd like to connect to each one it can see and upload a tailored code to each one.
Is this possible? Please tell me it is Gordon :)
As in your other post: http://forum.espruino.com/conversations/318682/#comment14158558
Install the Espruino CLI: https://www.npmjs.com/package/espruino
You need Node.js and NPM (which should come with it), then run npm install -g espruino.
npm install -g espruino
But then you want to export your code to a CSV file and then write a script that grabs the code out of the CSV file, makes the script you want to upload, and then calls espruino -p de:vi:ce:ad:dr:es script.js
espruino -p de:vi:ce:ad:dr:es script.js
Let me know if you need a hand with that though.
You mentioned "I'd like to connect to each one it can see" rather than just connecting to each in turn - so in that case you'd probably want to call espruino --list | grep Puck, then iterate over the results of that and grab the relevant data out of your CSV file (which you could do with grep again)
espruino --list | grep Puck
You rock... I will give it a go.
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