Arduino remote control app using a wireless module available in Arduino.
Bluetooth 2.0 Classic / 4.0 BLE : HC-05, HC-06, HM-10, AT-09, BT05, ESP32, etc.
Wi-Fi : ESP01, ESP8266 NodeMcu, ESP32, etc.
https://play.google.com/store/apps/details?id=com.tistory.postpop.hmi
Characteristic
- 15 buttons:
Toggle and push button property setting available.
Button label customization feature.
- 6 SeekBar (slide bar):
Min and Max value setting available.
Color Picker mode for RGB LED control.
Dial knob mode for PWM control.
- Text transmission and option settings:
NO: none, NL: new line, CR: carriage return, BOTH: carriage return+new line.
- floating button:
4 pushbuttons (16, 17, 18, 19).
Button to send system date and time.
Button to send time set value.- Color picker for RGB LED control
- Dial knob for PWM control
- Web viewer for HTML page in Arduino Sketch
- Provides a dialog window to set the control authority using a password
- Provides custom dialog windows (radio box, check box, text input, etc.)
- The screen stays on while the app is running (prevents the screen from turning off)
- Bluetooth and Wi-Fi connection permissions are set according to the latest Android API level.
*** If not obtain permission for the API level, the connection will be restricted.
In the case of the older version (advertisement version), permission updates are not performed, so Bluetooth and Wi-Fi connections are limited depending on the Android version.
Top menu
1. Name of code for Arduino, click - Show code information.
2. Blinker of timer for sending "CheckHD(%%F5)", click - timer ON/OFF (works only in connected state).
3. Information for wireless connection, long click - Display connection information (only works when connected to Arduino and display option is enabled).
Main menu
4. Wi-Fi ON/OFF display and Set Arduino connection via Wi-Fi.
5. Display settings: Button / SeekBar label and main screen display settings.
6. Property settings: push and toggle for button / minimum and maximum for SeekBar.
7. App settings and storage: button-related color designation and protocol settings.
8. Bluetooth connection button.
Main screen
Set transport options: NO(none), NL(new line), CR(carriage return), BOTH(carriage return + new line)
Button: Send specified value according to push/toggle setting
- Toggle button (on/off) 1byte number:
Button1 on(11)/off(10), Button2 on(21)/off(20) ....... Button14 on(141)/off(140), Button15 on(151)/off(150)
- Push button (down/up) 1byte number:
Button1 down(11)/up(10), Button2 down(21)/up(20) ....... Button14 down(141)/up(140), Button15 down(151)/up(150)
*** Short touch of a push button: send only down value
SeekBar (slide bar): Transmits a specific value through sliding or text box in the set maximum/minimum value area.
In the case of Active Slide Mode, values are continuously transmitted at designated time intervals, and in case of Passive Slide Mode, values are transmitted at touch-up.
Floating Button: Sends a specified value, system date/time or specific time value with a push button.
Button16: 161 .. Button19: 191
Display settings
Web View: Display the button to move to the web viewer that can display the web page set in Arduino, and is displayed only when connected to Arduino through Wi-Fi.
Text Input: Whether or not the text box is displayed on the main screen.
Floating Button: Whether or not the floating button is displayed on the main screen.
Blue box area: Set when you want to control SeekBar with Color Picker or Pwm Nob.
- DP Main check: When SeekBar is displayed on both the main screen and the Color Picker or Pwm Nob control screen.
- DP Main uncheck: In case the SeekBar is not displayed on the main screen and is displayed only on the Color Picker or Pwm Nob control screen.
- Add Group: Add a Group to the Color Picker or Pwm Nob control screen.
* SeekBar of three are displayed as a group. If you want to control them with two groups, change to check.
Setting button and SeekBar properties
Beep: Outputs a beep when a button or SeekBar is touched.
VIB: Vibrate on touch of buttons and SeekBar.
Floating BT VIB: Vibrate when touching the floating button.
Echo Text color: Whether to change text color when echo data is received.
Acitve Slide: Active / Passive SeekBar settings.
Acitve Slide check: Transmits the value of SeekBar at specified intervals. (Default: 40 millis)
Acitve Slide uncheck(Passive Slide): Transmit value only when SeekBar is touched up.
* Does not affect the maximum/minimum value of Color Picke. It's fixed between 0 and 255.
App settings
Open folder Icon: Display file list in designated path (Download/) and read selected data (txt) file.
Backup: Back up app settings and save them to path (Download)/Config.pwm.txt.
Recovery: Restore backed up settings.
Share icon: Attach Config.pwm.txt file to SNS (Email, etc.).
Set button and text color
Push Button color: The color of the button when the button property is push.
Push Text color Down: Button label color when the push button is pressed.
Push Text color Up: Button label color when the push button is released.
Toggle Button color On: The color of the button in the on state when the button property is toggled.
Toggle Button color Off: The color of the button in the off state when the button property is Toggle.
Echo color: If the Echo text color is checked, the text color of the corresponding Echo value.
Connect with Custom UUID: If you want to use a specific UUID when connecting to BLE (Bluetooth 4.0)
* In the general case, you can connect without specifying a custom UUID.
Read data from arduino: Set whether or not using of the timer to send Check(0xF5) for reflecting values independently changed on Arduino without specific operations (buttons and SeekBar) of the app.
Reading Interval: Interval of timer to send Check(0xF5).
Save BT & Slide state: Save when button state and SeekBar value changeed. Display saved states and values when starting the app.
Send Date/Time: Send date/time of Android system upon connection.
First Web Login: Go to the login page when connected to Wi-Fi.
Detect Logout: Output a message and Disconnect when login is disabled by other connection.
Protocol header settings
Button: "F0" - Bluetooth: 0xF0, WiFi: "%%F0"
Slide(SeekBar): "F3" - Bluetooth: 0xF3, WiFi: "%%F3"
String: "F4" - Bluetooth: 0xF4, WiFi: "%%F4"
Footer: "F1" - Bluetooth: 0xF1, WiFi: "%%F1"
Echo: "E1" - Bluetooth: 0xE1, WiFi: "%%E1"
Check: "F5" - Bluetooth: 0xF5, WiFi: "%%F5"
Connect: "F8" - Bluetooth: 0xF8, WiFi: "%%F8"
Option: "F9" - Bluetooth: 0xF9, WiFi: "%%F9"
Wifi add: "%%" - WiFi: "%%" + "Header"
DB clear and Reload: Initialize all data of the app
Connect to Arduino
- Bluetooth Classic:
1. Bluetooth pairing
Select the module you want to connect on the Bluetooth setting screen of your mobile phone.
Depending on the module, input the password when requesting the pairing password and click the confirm when the connection message is output as shown below.
Bluetooth pairing complete
2. Bluetooth 2.0 Search and Connection in App
Click the Bluetooth icon in the app and select Bluetooth 2.0 in Select Ver.
Click the Bluetooth button and select the module name you want to connect.
- Bluetooth BLE:
For BLE, Bluetooth pairing is not required.
An error message is displayed when Bluetooth pairing is attempted with the BLE module.
In case of the ESP32 module, if the same mac address is registered as Bluetooth Classic, it is recommended first to unpair it and connect it to the ESP32 BLE.
Select Bluetooth 4.0 in Select Ver and then select the BLE module to connect.
- Wifi:
A. Direct connection to Access Point of Arduino Wi-Fi module
1. Select the name of Wi-Fi module on your phone's Wi-Fi connection screen.
2. Check that the app's wifi connection name is the name of Wi-Fi module (e.g. Esp32).
Connect to the specified Access Point IP: 192.168.4.1.
B. Connection through a router
If the Wi-Fi module of Arduino is connected to a router (eg skynet) and the IP assigned by the router (eg 192.168.1.6) is known, connect to the assigned IP.
If you click the icon displayed after connecting to the Wi-Fi or Bluetooth module, 0xF5 or "%%F5" is transmitted for checking whether there is a new value or not in Arduino.
원격제어용 프로토콜
Send Data From App To Arduino
- Bluetooth Classic:
Button: 0xF0 + 1byte Num + 0xF1
SeekBar: 0xF3 + 1byte Num + 2byte Num + 0xF1
Connection: 0xF8 + "connect" + \n
Disconnction: 0xF8 + "disconnect" + \n
Date/Time: 0xF9 + "09/22/2022 13:32:39" + \n
SetTime: 0xF9 + "21:20" + \n
Text: Text + Endline Option(None / '\n' / '\r' / "\r\n")
Check: 0xF5
- Bluetooth BLE:
Button: 0xF0 + 1byte Num + 0xF1
SeekBar: 0xF3 + 1byte Num + 2byte Num + 0xF1
Connection: "%%F8" + "connect" + \n
Disconnction: "%%F8" + "disconnect" + \n
Date/Time: "%%F9" + "09/22/2022 13:32:39" + \n
SetTime: "%%F9" + "21:20" + \n
Text: Text + Endline Option(None / '\n' / '\r' / "\r\n")
- Wifi (String)
Button: %%F0 + Value + %%F1
SeekBar: %%F3 + Count + %% + Slide Num + Value + %%F1
Connection: %%F8 + connect + \n
Disconnction: %%F8 + disconnect + \n
Date/Time: %%F9 + 09/22/2022 13:32:39 + \n
SetTime: %%F9 + 21:20 + \n
Text Send: String + Endline Option(None / '\n' / '\r' / "\r\n")
Check: %%F5
Recieve Data From Arduino To App
- Bluetooth Classic:
///////////////////////////////////////// ESSENTIAL (0xF0, 0xF3,0xF4)
Button State: 0xF0 + 1byte Num + 0xF1
SeekBar State: 0xF3 + 1byte Num + 2byte Num + 0xF1
Button Echo: 0xF0 + 1byte Num + 0xE1
SeekBar Echo: 0xF3 + 1byte Num + 2byte Num + 0xE1
Text: 0xF4 + Text + 0xF1
///////////////////////////////////////// CONNECTION (0xF8)
requst Date Time: 0xF8 + 0x01 + 0x00
request Pass: 0xF8 + 0x02 + 1byte Num(length) + "Pass Name"
response Pass: 0xF8 + 0x03 + 1byte Num
send Message: 0xF8 + 0x04 + String + 0xF1
send Disconnect: 0xF8 + 0x05 + 0x00
///////////////////////////////////////// OPTION (0xF9)
set Active Slide: 0xF9 + 0x01 + 1byte Num + 0x00
set Slide Interval: 0xF9 + 0x02 + 2byte Num
set Request: 0xF9 + 0x03 + 1byte Num + 0x00
set Request Interval: 0xF9 + 0x04 + 2byte Num
set SSID Label Mode: 0xF9 + 0x05 + 1byte Num + 0x00
show Dialog Menu: 0xF9 + 0x06 + 2byte Num
set Color Nob: 0xF9 + 0x07 + String + 0xF1
set Display: 0xF9 + 0x08 + String + 0xF1
set Button Label: 0xF9 + 0x09 + String + 0xF1
set Button Toggle: 0xF9 + 0x0A + String + 0xF1
set Min Max: 0xF9 + 0x0B + String + 0xF1
set App Title Message: 0xF9 + 0x0C + String + 0xF1
dialog Radio: 0xF9 + 0x0D + "RAD:" + String + 0xF1
dialog Checkbox: 0xF9 + 0x0D + "CKB:" + String + 0xF1
dialog Choose: 0xF9 + 0x0D + "CHD:" + String + 0xF1
dialog List: 0xF9 + 0x0D + "LSD:" + String + 0xF1
dialog Input: 0xF9 + 0x0D + "STR:" + String + 0xF1
- Bluetooth BLE:
///////////////////////////////////////// ESSENTIAL (0xF0, 0xF3,0xF4)
Button State: 0xF0 + 1byte Num + 0xF1
SeekBar State: 0xF3 + 1byte Num + 2byte Num + 0xF1
Button Echo: 0xF0 + 1byte Num + 0xE1
SeekBar Echo: 0xF3 + 1byte Num + 2byte Num + 0xE1
Text: 0xF4 + Text + 0xE1/F1
///////////////////////////////////////// CONNECTION (0xF8)
requst Date Time: 0xF8 + 0x01 + 0x00
request Pass: 0xF8 + 0x02 + 1byte Num(length) + "Pass Name"
response Pass: 0xF8 + 0x03 + 1byte Num
send Message: 0xF8 + 0x04 + String + 0xE1/F1
send Disconnect: 0xF8 + 0x05 + 0x00
///////////////////////////////////////// OPTION (0xF9)
set Active Slide: 0xF9 + 0x01 + 1byte Num + 0x00
set Slide Interval: 0xF9 + 0x02 + 2byte Num
set SSID Label Mode: 0xF9 + 0x03 + 1byte Num + 0x00
show Dialog Menu: 0xF9 + 0x04 + 1byte Num + 0x00
set Color Nob: 0xF9 + 0x05 + String + 0xE1/F1
set Display: 0xF9 + 0x06 + String + 0xE1/F1
set Button Label: 0xF9 + 0x07 + String + 0xE1/F1
set Button Toggle: 0xF9 + 0x08 + String + 0xE1/F1
set Min Max: 0xF9 + 0x09 + String + 0xE1/F1
set App Title Message: 0xF9 + 0x0A + String + 0xE1/F1
dialog Radio: 0xF9 + 0x0B + "RAD:" + String + 0xE1/F1
dialog Checkbox: 0xF9 + 0x0B + "CKB:" + String + 0xE1/F1
dialog Choose: 0xF9 + 0x0B + "CHD:" + String + 0xE1/F1
dialog List: 0xF9 + 0x0B + "LSD:" + String + 0xE1/F1
dialog Input: 0xF9 + 0x0B + "STR:" + String + 0xE1/F1
- Wifi (String):
///////////////////////////////////////// ESSENTIAL (%%F0, %%F3, %%F4)
1. Button State: %%F0 + Value + %%F1 + '\n'
2. SeekBar State: %%F3 + Slide Num + Value + %%F1 + '\n'
3. Button Echo: %%F0 + Value + %%E1 + '\n'
4. SeekBar Echo: %%F3 + Slide Num + Value + %%E1 + '\n'
5. Text: %%F4 + Text + %%F1 + '\n'
///////////////////////////////////////// CONNECTION (%%F8)
6. set First Login: %%F8 + FIR: + "Value" + '\n'
7. detect Logout: %%F8 + DET: + "Value" + '\n'
8. requst Date Time: %%F8 + RDT: + '\n'
9. request Pass: %%F8 + "bool" + "Pass Name" + '\n'
10. response Pass: %%F8 + RES: + "Cookie or bool" + '\n'
11. send Wifi Info: %%F8 + INF: + String + '\n'
12. send Message: %%F8 + MES: + String + '\n'
13. response Fail Resend: %%F8 + RFR: + "bool" + '\n'
14. send Disconnect: %%F8 + DIS + '\n'
///////////////////////////////////////// OPTION (%%F9)
15. set Active Slide: %%F9 + ACT: + "bool" + '\n'
16. set Slide Interval: %%F9 + SLI: + "value" + '\n'
17. set Request: %%F9 + REQ: + "bool" + '\n'
18. set Request Interval: %%F9 + INT: + "value" + '\n'
19. set SSID Label Mode: %%F9 + SLM: + "value" + '\n'
20. show Web View: %%F9 + SWV: + "bool" + '\n'
21. show Dialog Menu: %%F9 + SDM: + "bool" + '\n'
22. set Color Nob: %%F9 + CNB: + "String" + '\n'
23. set Display: %%F9 + SDP: + "String" + '\n'
24. set Button Label: %%F9 + ABL: + "String" + '\n'
25. set Button Toggle: %%F9 + BTG: + "String" + '\n'
26. set Min Max: %%F9 + MNM: + "String" + '\n'
27. set App Title Message: %%F9 + ATM: + "String" + '\n'
28. dialog Radio: %%F9 + RAD: + "String" + '\n'
29. dialog Checkbox: %%F9 + CKB: + "String" + '\n'
30. dialog Choose: %%F9 + CHD: + "String" + '\n'
31. dialog List: %%F9 + LSD: + "String" + '\n'
32. dialog Input: %%F9 + STR: + "String" + '\n'
App items that can be controlled by Arduino according to the protocol
Other protocol control
9. request Pass
10. response Pass
11. send Wifi Info
This code applies only to Wi-Fi and transmits Wi-Fi connection information to use in 19. set SSID Label Mode.
12. send Message
13. response Fail Resend
This code only applies to Wi-Fi and set whether or not to use the function to retransmit if the response to the app's request fails.
false: Applies only when the Arduino intentionally does not respond to HTTP requests of the app. (e.g. ESP01)
14. send Disconnect
click "Disconnect" button of Wi-Fi and Bluetooth.
16. set Slide Interval
19. set SSID Label Mode
21. show Dialog Menu
Button value: 201
28. dialog Radio
29. dialog Checkbox
30. dialog Choose
31. dialog List
32. dialog Input
ARDUINO ESP01 HMI CONTROL
[Arduino] - Setting up Wi-Fi module ESP01 and basic code for Arduino remote control
[Arduino/ADUCON] - Arduino WiFi remote control with ADUCON and ESP-01
[Arduino] - Arduino Basic code for bluetooth remote contol with HC-06
[Arduino/ADUCON] - Arduino Bluetooth remote control with ADUCON and HC-06
[Arduino] - Arduino Basic code for BLE remote contol with BT05
[Arduino/ADUCON] - Arduino BLE remote control with ADUCON and BT05
[Arduino] - ESP32/NodeMcu Basic code for WiFi remote contol
[Arduino/ADUCON] - ESP32/NodeMcu WiFi remote control with ADUCON
[Arduino/ADUCON] - ESP32 Bluetooth remote control with ADUCON
[Arduino/ADUCON] - ESP32 BLE remote control with ADUCON
'Arduino > ADUCON' 카테고리의 다른 글
ESP32 BLE remote control with ADUCON (0) | 2022.12.04 |
---|---|
ESP32 Bluetooth remote control with ADUCON (0) | 2022.12.03 |
ESP32/NodeMcu WiFi remote control with ADUCON (0) | 2022.12.01 |
Arduino BLE remote control with ADUCON and BT05 (0) | 2022.11.25 |
Arduino Bluetooth remote control with ADUCON and HC-06 (0) | 2022.11.24 |
Arduino WiFi remote control with ADUCON and ESP-01 (0) | 2022.11.17 |