bsiever / microbit-webusb

WebUSB Utils for Micro:bit
MIT License
30 stars 8 forks source link

Architecture: Objects & Emit Events #2

Open bsiever opened 5 years ago

bsiever commented 5 years ago

Consider re-architecting to use Objects & Events. Maybe have a uBitConnector object (to initiate the USB connection) that emits a connected and connection-failure. Create a uBitDevice or augment the existing USBDevice to emit all the message and discnonection events (and host the disconnect() method?