Arduino ESP8266 project for UBTech Alpha 1S Controller.
Initial version 1.0 comes from the sample in my UBTech library.
Versionn 2.0 will define a new set of communization protocol. In this version, it will support both V1 & V2 commands.
- New V2.0 communication protocol to avoid misinterpretation (some V1 commands are kept for bluetooth control)
- Support control from USB, Bluetooth and Wifi (connect to router or AP mode)
- Action setup by reading position from robot
- Convert action from UBT action file in aesx and hts format
- Play MP3 with action
- Use MPU 6050 to detect current situation
- Define the action to stand up after fall down for both face up & face down cases
- Touch sensor and response for single, double and triple click, and long touch.
- ...
- UBTech Library
- OLED12864 library
- espsoftwareserial library
- Wifi Manager
Save all above libraries in lib folder.
This is a Visual Studio Code project with PlatformIO IDE.
- Install Visual Studio Code
- Install the PlatformIO IDE extension
- Open the folder in Visual Studio Code
- ESP8266 board
- HC-05 Bluetooth module (optional)
- MP3-TF-16P MP3 player (optional)
- MPU6050 module (optional)
- TTP223 touch sensor (optional)
- SSD1306 OLED module (optional)
Pin | Usage |
---|---|
GPIO-2 | Connect to Rx of serial console for debug output |
GPIO-4 | Connect to SDA of I2C bus |
GPIO-5 | Connect to SCL of I2C bus |
GPIO-12 | Connect to signal pin of Servo |
GPIO-13 | Connect to Touch sensor |
GPIO-14 | Connect to Tx of MP3 module |
GPIO-15 | Connect to head led |
GPIO-16 | Connect to Rx of MP3 module |
Rx | Connect to Tx of HC-05 |
Tx | Connect to Rx of HC-05 |
I2C | for MPU6050 and OLED display |
The PC setup program MyAlphaRobot can be found in https://github.com/Super169/MyAlphaRobotV2/releases/tag/MyAlphaRobot_2.0
You need a ESP8266 control board in order to use this firmware.
You can make a simple PCB like this,
and installed in my robot. You can also add the OLED and MPU6050 via the I2C bus, and connect a touch sensor to GPIO-13.
Or if you cannot make the PCB yourself, you can buy a ready to use control board from Taobo. https://item.taobao.com/item.htm?id=571368655206
ENJOY!