Universal Robot Configurer
Overview
The Universal Robot Configurer (URC) is a wrist-worn device with a graphical menu system which allows sending configuration and action commands to a robot. It is an implementation of the design by Jon Hylands found in his github repo at https://github.com/JonHylands/micropython-stuff
The URC code is customized for each robot to include robot-specific commands and screens. It runs on an ESP32-based LCD touch-screen device. The URC communicates with a robot-resident XIAO ESP32 device using the ESP-NOW protocol
Bill of Materials
BOM is at https://jons.page/pics/BOM.html
Micropython Installation
These instructions tell how to configure the ESP32's in the system to run micropython.
Robot-resident XIAO
There is a Seeed Studio XIAO board mounted on the robot which receives commands from the URC device. These instructions tell how to install micropython on it.
First, you need to make sure the board is in bootloader mode.
When you type lsusb with the board unplugged, and then plugged in, it will show up as 303a:4001 if it is not in bootloader mode, and 303a:1001 if it is in bootloader mode
Go to this site:
https://micropython.org/download/ESP32_GENERIC_S3/
and download the "Firmware (Support for Octal-SPIRAM)" latest .bin file (not the uf2 file)
Right now that is called:
ESP32_GENERIC_S3-SPIRAM_OCT-20240222-v1.22.2.bin
if you're not in bootloader mode, unplug the board, push the boot button (right next to the USB port, I use a small hex driver to push it) and plug the board in
ensure you're in bootloader mode
type:
rshell -l
(that's a small L)
you should see something like this:
jon@jon-desktop:~/Downloads$ rshell -l
Serial Device: /dev/ttyS0
USB Serial Device 303a:1001 with vendor 'Espressif' serial 'DC:DA:0C:17:83:80' found @/dev/ttyACM0
jon@jon-desktop:~/Downloads$ esptool.py --chip esp32s3 --port /dev/ttyACM0 erase_flash
esptool.py v4.6.2
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:da:0c:17:83:80
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 3.3s
Hard resetting via RTS pin...
jon@jon-desktop:~/Downloads$ rshell -l
Serial Device: /dev/ttyS0
USB Serial Device 303a:1001 with vendor 'Espressif' serial 'DC:DA:0C:17:83:80' found @/dev/ttyACM0
jon@jon-desktop:~/Downloads$ esptool.py --chip esp32s3 --port /dev/ttyACM0 write_flash -z 0 ESP32_GENERIC_S3-SPIRAM_OCT-20240222-v1.22.2.bin
esptool.py v4.6.2
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:da:0c:17:83:80
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x0018efff...
Compressed 1631616 bytes to 1069093...
Wrote 1631616 bytes (1069093 compressed) at 0x00000000 in 10.3 seconds (effective 1264.9 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Then unplug and replug the board (without touching the boot button)
jon@jon-desktop:~/Downloads$ rshell -p /dev/ttyACM0
Using buffer-size of 256
Connecting to /dev/ttyACM0 (buffer-size 256)...
Trying to connect to REPLÂ connected
Retrieving sysname ... esp32
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... May 03, 2024 07:33:25
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Welcome to rshell. Use Control-D (or the exit command) to exit rshell.
/home/jon/Downloads> repl
Entering REPL. Use Control-X to exit.
>
MicroPython v1.22.2 on 2024-02-22; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3
Type "help()" for more information.
>>>
Something you can try, to make sure you see all the RAM (8 MB):
>>> import gc
>>> gc.mem_free()
8318656
URC Board
For the display board, you want to download this file:
https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.28/Esp32-s3-touch-lcd-1.28-code.zip
and the file from that zip file you're looking for is S3-Touch-LCD-1.28-MPY.bin
strangely, I'm getting the same value whether I'm in bootloader mode or not, but if you type:
jon@jon-desktop:~/Downloads$ rshell -l
Serial Device: /dev/ttyS0
USB Serial Device 1a86:55d3 with serial '54E2033590' found @/dev/ttyACM0 *
You should see that line, specifically with 1a86:55d3
You can follow the exact same directions as the other board, just change the firmware file to the one you extracted from the zip file
Once you're done flashing, you need to unplug and replug the device
Using rshell
Invoke rshell with rshell -p /dev/ttyACM0
The root of the ESP32 micropython filesystem appears at /pyboard in rshell