How to expose a c/c++ module to Espruino JS?
For example, the jswrap_hello.c defines the 'Hello' class , it has a method 'world()', then we can do in Espruino:
Hello.world();
How to expose 'Hello' as a module just like 'net' or 'Wifi'? I mean 'Hello' can be required like this:
var hello = require('Hello'); hello.world();
or
require('Hello').world();
@Aifer 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.
How to expose a c/c++ module to Espruino JS?
For example, the jswrap_hello.c defines the 'Hello' class , it has a method 'world()', then we can do in Espruino:
How to expose 'Hello' as a module just like 'net' or 'Wifi'? I mean 'Hello' can be required like this:
or