├── README.md └── printer.html /README.md: -------------------------------------------------------------------------------- 1 | WebUSB - Arduino Experiment 2 | =========================== 3 | 4 | This repository is an example implementation of WebUSB communicating with Thermal Receupt printer. It consists of a single file containing HTML and Javascript. Demo only, no proper error checking or graphic printing. 5 | 6 | 7 | The demo shows: 8 | 9 | 1. Pairing and connecting to Thermal Printer from Chrome 10 | 2. Sending printer text to the device from Chrome 11 | 3. Reconnecting on Browser refresh (if paired) 12 | 13 | This has been tested on Windows 10 hardware and on a Mac. 14 | 15 | Access the Demo 16 | --------------- 17 | 18 | 1. Plug the device into your PC/Mac and open the browser to https://drffej.github.io/webusb.printer/printer.html 19 | 2. Click on 'Connect' to pair the device 20 | 3. Click on Toggle to turn on/off the Led 21 | 22 | 23 | Alternately you can run this locally via 24 | 25 | $ python -m http.server 26 | 27 | or any other webserver. 28 | 29 | You may also want to check out chrome://device-log where you can see all USB device related events in case of issues. 30 | 31 | JP 26/11/2017 32 | -------------------------------------------------------------------------------- /printer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Type text into box and click on submit button. 6 | 48 | 49 | 50 | --------------------------------------------------------------------------------