/hardware-js

Library to ease use of hardware devices in the browser

Primary LanguageTypeScriptMIT LicenseMIT

Experimental library for browser-accessible hardware

Design notes and other documentation are in doc/.

Development tools

The provided example (in example/) demonstrates usage and is intended to be helpful while developing drivers for new devices.

Development environment set-up

This library is developed with v18 of node.js.

Install required dependencies with

git clone https://github.com/bennorth/hardware-js.git
cd hardware-js
npm install

or (to fetch the latest version once installed)

npm update
git pull origin develop

and then you should be able to do

npm run build
cd output
npx http-server

and visit http://localhost:8080/ in your browser.

ESLint is installed; you can do npx eslint src/**/*.ts to run it.