How to read weight, battery level and button presses from the Atomax Skale I and Skale II Bluetooth scales, and send them commands. The de1app supports these scales; this page is for programmers. For Decent's own scales, see the Decent Scale API.
Skale I and Skale II
There are APIs for Android and iPhone, if you don't want to use BLE directly:
If you want to use BLE directly, it's also pretty easy, that's what I do, because I don't program in Java on Android.
Before programming BLE directly, you'll want to poke around with a debugging tool. I recommend you start with:
BLE API specification for Skale I and II
Weight comes in on 0000EF81-0000-1000-8000-00805F9B34FB
Like so:
A simpler way to think of this is to discard the first two bytes, and then read the next 4 bytes as an unsigned long.
In Tcl/Androwish, my code to parse this is:
Battery level on Skale 1 came in on 00002A19-0000-1000-8000-00805F9B34FB but is on 0x180F for Skale II. On Skale I this always returned 100%: it was a firmware bug that's been fixed for Skale II.
Button presses for Skale I and II come in on 0000EF82-0000-1000-8000-00805F9B34FB
As single bytes unsigned chars. A pressed button returns a 1 in that byte.
In Tcl/Androwish, my code to parse this is:
To Send Commands to the Skale II use UUID 0000EF80-0000-1000-8000-00805F9B34FB
Skale 1: there are no commands to send on Skale I. If you need to tare you do it in your own software.
UUID: 0xEF80, write value:
On Skale II, for BLE tare function, you can use CMD: 0x10.
#developers #api #scales