Program executing over bluetooth:
Download and install the conda package manager.
Run these commands to install all app dependencies.
conda env update -f environment.yml
conda activate roo-blocks
cd app && npm i
Ensure that you always activate the roo-blocks
environment before you do anything else:
conda activate roo-blocks
cd app
sudo setcap cap_net_raw+eip bluetooth.py
If on linux, you need full r/w access to usb serial. Add yourself with:
sudo adduser <USER> dialout
Replace serial port below. For Windows this will look like COM12 found in windows device manager. For linux this will look like ttyUSB0.
cd controller
esptool --port /dev/ttyUSB0 erase_flash
esptool --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-idf4-v1.12.bin
cd controller
ampy
In order to utilise local ble devices, the script either needs to be run with sudo
or capabilities granted to node
with:
sudo setcap cap_net_raw+eip $(readlink -f $(which node))
Unfortunately granting capabilities to a conda
binary will break it's ability to resolve dynamic libraries, such as libnode.so.