run JavaScript code from SD Card #424
Replies: 9 comments
-
Posted at 2015-06-01 by @gfwilliams Yes, I think it's as easy as Maybe a 'nicer' way of doing it is:
So then you pass in what you want as arguments, and you load the code in as a function - so it's easy to just delete that function later if you want to free the memory. ... maybe wait for 1v80 before you try writing to the SD card though - @jumjum discovered a bug in 1v73 - 1v79 that could corrupt SD card contents. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by Jorgen @gordon you are the man! Thx for the fast reply and the awesome short snippet. Before I implement this stuff, I have to wait for the ESP12 board from OSHPark and try out the WiFi communication. Next step is to add small library to stream JavaScript content to Pico. Last step is to store this content (effect functions) to SD for later use... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by @gfwilliams Sounds great! You can pick up one of the GitHub builds from here Choose the right binary from the page above, and copy/paste the link into the flasher page in the IDE. That should have the SD card fix... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by Jorgen I just try to flash this one:
Errors:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by DrAzzy This is a bug with debounce. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-03 by Jorgen thx @drazzy. I can modify the demo code to call getTime() instead... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-03 by @gfwilliams Yes, sorry - I'll try and get that fixed for the next release. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-03 by @gfwilliams Fixed now, it'll be in the 1v80 release. Available from www.espruino.com/binaries/git/commits/03bc4de4ed9fee0a7863c0e55040ad79f2a2fa35 in a few minutes |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-03 by Jorgen @gordon you are Mr.FixitFast ;) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-06-01 by Jorgen
Him,
is it possible to load script files from SD card and execute the code/functions in the current environment?
This would be really helpfull to add additional effect code via WiFi and store it for later use on SD card ;)
Beta Was this translation helpful? Give feedback.
All reactions