Available in Chrome 48+
The Web Bluetooth API
lets websites discover and communicate with devices over the
Bluetooth 4 wireless standard using the Generic Attribute Profile (GATT). It is
currently partially implemented
in Chrome OS, Android M, Linux and Mac
behind the experimental flag chrome://flags/#enable-web-bluetooth
. (Enter - or copy and paste -
this address in the Chrome URL bar to set this flag. This may not be necessary on Chrome 56 or later,
but it's worth trying if you are unable to get the meter connection to work.)
Turn on your meter and make it's not connected to another app, device, or webpage. Then hit Connect
to connect to your meter and read the current measurement. Hit the Start Notifications
button
to start getting all measurement updates from the meter. (On Android you may get an error message the first time,
or the first few times, you try to start notifications. Hit the button again to re-try on failure.)
Finally, hit Disconnect
to stop updates and disconnect from your meter.
Once notifications are started, the Web Bluetooth code will deliver all meter measurements to your webpage through a Javascript function [name and details TBD]. You can continuously display this data, or you can observe the measurements for calculations, graphing, or anything else.
Here is a panel that displays all measurements as they are taken, along with the meter-mode and units strings:
Voltage-DC |
0 |
V |
You can capture specific measurements when the user taps on a button or link, and use the captured data to fill out a form or perform calculations.
Here is a form that allows you to take a voltage and a current measurement, and from those
measurements calculate a wattage value. In the Javascript for this page, the Capture
buttons
grab measurement values from the panel above, and the Calculate
button simply verifies the
values and performs a simple multiplication. The Submit
button simply shows an Alert with
the field data, but in a real application it would send the data to a server for storage.