/web-serial-example

An example of the basics of the Web Serial API

Primary LanguageTypeScriptMIT LicenseMIT

Web Serial API

A demo showing the basics of Web Serial API to connect a browser with serial devices.

Check out the blog post on Web Serial API to learn more about it: https://dev.to/unjavascripter/the-amazing-powers-of-the-web-web-serial-api-3ilc

TL;DR

  1. Upload the code in ./web_serial_onboard_led.ino to your Arduino device
  2. Enable Chrome's Experimental Web Platform Features by visiting chrome://flags/#enable-experimental-web-platform-features
  3. Run the demo app locally
  4. Use the "Connect to serial port" of the web app to connect to the right port
  5. Send a 1 tu turn the led on, or a 0 to turn it off