Giter Site home page Giter Site logo

web-serial-api's Introduction

Web Serial API Examples

The Web Serial API makes it possible for web browsers to read and write from serial devices. Soon you can chat with Arduinos, Raspberry Pis and most any device that speaks serial – straight from your website and no drivers needed. The Serial API specification is, as of this writing, not a W3C standard but you can already play with it in the latest beta versions of Chrome and Edge.

This repository is my playground for evaluating this upcoming API. If you possess an Arduino, you can play along too.

Reading analog input, using a potentiometer, and dimming an LED from the browser.

Before Playing With the Serial API

Make sure you have the following to play along at home:

  1. Arduino compatible device and USB cable
  2. Arduino IDE
  3. Beta version of Chrome or Edge
  4. Experimental Web Platform features enabled

After installing your browser of choice, launch it, and enable the Experimental Web Platform features flag.

Serial API Examples

The course of action is the same for toying with all examples. Load one of the includes examples on your device using the Arduino IDE, build the associated circuit, and then point your browser to the example you want to explore.

Analog Read Serial

Open the built-in example sketch 01.Basics → AnalogReadSerial in the Arduino IDE and upload it to your device. Follow the tutorial to connect a potentiometer to the Arduino. Make sure your circuit works by using the Serial Monitor.

Visit my Analog Read Serial example page.

Dimmer

Open the built-in example sketch 04.Communication → Dimmer in the Arduino IDE and upload it to your device. Follow the tutorial to connect an LED to the Arduino. Make sure your circuit works by using the Serial Monitor.

Visit my Dimmer example page.

web-serial-api's People

Contributors

svendahlstrand avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.