BangleApps/apps/BLEcontroller
Daniel Kulesz 069abf1a83 Add Changelog for v0.01 apps that lack a changelog 2020-07-29 21:00:41 +02:00
..
BLEcontroller.png Add files via upload 2020-05-17 18:24:17 +01:00
ChangeLog Add Changelog for v0.01 apps that lack a changelog 2020-07-29 21:00:41 +02:00
README.md Documenting message size 2020-06-01 18:11:18 +01:00
app-ex2.js Testing joystick variant 2020-06-01 19:36:21 +01:00
app-icon.js Update app-icon.js 2020-05-17 18:23:51 +01:00
app-joy.js Final changes before pull request 2020-06-01 20:34:04 +01:00
app.js Final changes before pull request 2020-06-01 20:34:04 +01:00

README.md

BLE Customisable Controller with Joystick

A highly customisable state machine driven user interface that will communicate with another BLE device. The controller uses the three buttons and the left and right hand side of the watch to provide a flexible and attractive BLE interface.

Amaze your friends by controlling your robot, your house or any other BLE device from your watch!

To keep the messages small, commands are sent from the Controller to the BLE target in a text string. This is made up of a comma delimited string of the following elements:

  • message number (up to the least significant four digits)
  • screen name (up to four characters)
  • object name (up to four characters)
  • value/status (up to four characters)

The combination of these variables will uniquely identify the status change requested from the watch to the target device that can then be programmed to respond appropriately.

Gordon Williams' EspruinoHub is an excellent way to transform thse BLE advertisements into MQTT messages for further processing. They can be subscribed to via the following MQTT topic (change the watchaddress, to the MAC address of your Bangle.js) /ble/advertise/wa:tc:ha:dd:re:ss/espruino/#

Usage

The application can be configured at will by changing the definitions of the screens, events, icons and buttons.

Most changes are possible via data, rather than code change.

Features

The default package contains three configurations:

  • a simple home light and sockets controller UI (app.js)
  • a robot controller UI with joystick (app-joy.js)
  • a simple static assistant controller (app-ex2.js)

You can try out the other configurations by deleting app.js and renaming the file you want to try as app.js.

I have tested out the application to as many as eight screens without problems, but four screens are usually enough for most situations.

Controls

The controls will vary by screen, but I suggest a convention of using BTN3 (the bottom button) for moving backwards up the menu stack.

I have used the convention of red/green for buttons that are switches and blue buttons that provide single function operation (such as navigating a menu or executing a on-off activity)

Requests

In the first instance, please consult my blog post on this application here

Creator

Richard Hopkins, FIET CEng May 2020