This repository contains a few examples on how to connect with USB & Bluetooth devices via the WebUSB & WebBluetooth interfaces.
-
webusb
- WebUSB examples01-connect-device
- Connect to a device via WebUSB & display its meta data02-print-text
- Connect to POS compatible printer & print text03-canvas-to-print
- Connect to POS compatible printer & print the contents of a<canvas>
element04-hid-devices
- Use a USB barcode scanner to scan ISBN numbers from books barcodes & retrieve some meta data from an online service
-
webbluetooth
- WebBluetooth examples01-connect-device
- Connect to a device via Bluetooth & display its meta data02-heartrate
- Connect a heart rate monitor device & display the heart rate03-lightbulb
- Connect to compatible Bluetooth lightbulb & steer it
- WebUSB API - Draft
- Control an Arduino with WebUSB
- WebADB - Connect Android devices via WebUSB
- Building a device for WebUSB
If you'd like to dig further into programming POS printers, have a look at ESC/POS Mode Command Specifications which describe all the commands from the POS spec that can be send to compatible printers in order to make some art™
Any webserver will do, if you have Node.js installed, just run
npx http-server -p ${PORT}
and you're good to go.