UNPKG

j5e

Version:

j5e is a device first robotics an IoT framework built to levarage the ECMA-419 specification

16 lines (12 loc) 264 B
import Switch from "j5e/switch"; import LED from "j5e/led"; const mySwitch = await new Switch(14); const led = await new LED(12); mySwitch.on("open", function() { trace("off"); led.off(); }); mySwitch.on("close", function() { trace("on"); led.on(); });