There are a bunch of predefined functions added with addToDictionary. To add one to toggle the LED you can do:
addToDictionary
addToDictionary("led", function (context) { LED.write(context.stack.pop()); });
So 1 led will then turn the LED on.
1 led
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
There are a bunch of predefined functions added with
addToDictionary
. To add one to toggle the LED you can do:So
1 led
will then turn the LED on.