This is the Android Remote Control for TheBox was on this repository with an attached relay. This allows us to remote turn on any electric device.
You can enter the IP-address of the local MQTT-Broker (e.g. Mosquitto), then hit Go! It automatically subscribes to all topics necessary by the actuators in "TheBox". It gives basic control functions to the following parts:
The general control scheme looks like this:
The code for the ESP32's in order to control the motors and LEDS can be found here.
The latest version of the signed APK of the app can be downloaded here
- Install the free App MQTT Broker App from the Play Store
- Install the UC2 controler APP using this link
- Setup the WiFi-Acces Point (AP) on your Android Phone (Sometimes called wifi-sharing or Hotspot) under Settings -> Tethering&mobile Hotspot -> WiFi Hotspot
- The settings should be the following:
- SSID: Blynk
- Password: 12345678
- Start the Hotspot
- Open the MQTT Broker App and hit start
- A message "mqtt>Broker URL - 0.0.0.0:1883" appears -> Great!
- Open the UC2 Controler APP and enter the IP-address as 0.0.0.0 and hit Go!
- A message which says Connected should appear
- All set!
- Close the app and restart it (really remove the panel from the task manager)
You can send the commands using 3rd party apps for debugging. The general topic-structure is:
-
/<S><INT3>/<DEV><INT2>/COMD
with S=Setup, DEV=Device, COMD=Command (delimited by "+" sign) and INT3=3 integers, INT2=2 integers. A COMD is built by a<COMMANDSEQUENCE>+<VAL1>+<VAL2>+...+<VALn>
. Here are some examples: -
Motor: Z-Stage:
/S013/MOT01/RECM DRVZ+-50
, -100..100 -
Motor: S-Stage:
/S013/MOT02/RECM DRVZ+-50
, -100..100 -
Fluo LED:
/S013/MOT01/RECM NA+10966
, 0..25600 -
LED-Array:
/S013/LAR01/RECM NA+1
, 0,1,2,3,4
The COMD STATS
or ANNO
are used for inter-device-communication and bug-fixing.