@elliottkember/leduino
v1.0.9
Published
JavaScript Arduino LED Emulator
Downloads
15
Readme
LEDuino
This is a small wrapper around the Wokwi AVR8js library, for simulating WS2812 LED arrays in the browser.
It's a fairly simple set of configuration values and constants used to configure an Arduino Mega simulator and execute it, including drawing pixels to a canvas element.
Usage
You can see an example of this project in the demo
directory, but basically:
import LEDuino from '@elliottkember/leduino';
new LEDuino({
rows: 14,
cols: 14,
serpentine: true,
hex: {/* A hex object generated by wokwi-hexi */},
canvas: document.getElementById('canvas'),
// onPixels: (pixels) => console.log(pixels.length),
// onSerial: (text) => console.log(text),
});