I think it depends on what sort of thing you mean. If it's a single file Node.js script then yes, it'll probably be ok. However if you're using a bunch of external modules then probably not - since by themselves they will use up more memory than is available in the microcontroller.
Basically if you're hoping to take exactly the same code that runs on a PC with 8GB of RAM and run it on a microcontroller with 0.000064GB RAM then you'll probably be disappointed, but if you're willing to make a few small changes then you can still use a bunch of the Node.js stuff you're used to - Promises, arrow functions, regex/etc and get them running on a microcontroller.
I'd definitely recommend you start off trying to write your first bits of code for Espruino from scratch though. If you start off trying to port something before you've got a feel for it you may hit issues.
If you want to have a quick play it might be worth checking out the Bangle.js emulator: https://www.espruino.com/ide/emulator.html
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