- Name: ClusterController
- Version: 4.0.0
- License: BSD
- URL: https://github.com/janelia-arduino/ClusterController
- Author: Peter Polidoro
- Email: [email protected]
- PCB: https://github.com/janelia-kicad/cluster-pcb
Firmware for each cluster of prisms in the Voigts Lab honeycomb maze.
- protocol-version = 0x04
- prism-count = 7
- command = protocol-version command-length command-number command-parameters
- response = protocol-version response-length command-number response-parameters
- duration units = ms
- position units = mm
- velocity units = mm/s
- current units = percent
- stall-threshold -> higher value = lower sensitivity, 0 indifferent value, 1..63 less sensitivity, -1..-64 higher sensitivity
- home-parameters = travel-limit, max-velocity, run-current, stall-threshold
- controller-parameters = start-velocity, stop-velocity, first-velocity, max-velocity, first-acceleration, max-acceleration, max-deceleration, first-deceleration
- double-position = position-0, position-1
| command-name | command-format | command-length | command-number | command-parameters | response-format | response-length | response-parameters | 
|---|---|---|---|---|---|---|---|
| invalid-command | '<BBB' | 3 | 0xEE | ||||
| read-cluster-address | '<BBB' | 3 | 0x01 | '<BBBB' | 4 | 0x00..0xFF | |
| communicating-cluster | '<BBB' | 3 | 0x02 | '<BBBL' | 7 | 0x12345678 | |
| reset-cluster | '<BBB' | 3 | 0x03 | '<BBB' | 3 | ||
| beep-cluster | '<BBBH' | 5 | 0x04 | duration | '<BBB' | 3 | |
| led-off-cluster | '<BBB' | 3 | 0x05 | '<BBB' | 3 | ||
| led-on-cluster | '<BBB' | 3 | 0x06 | '<BBB' | 3 | ||
| power-off-cluster | '<BBB' | 3 | 0x07 | '<BBB' | 3 | ||
| power-on-cluster | '<BBB' | 3 | 0x08 | '<BBB' | 3 | ||
| home-prism | '<BBBBHBBb' | 9 | 0x09 | prism-address, home-parameters | '<BBBB' | 4 | prism-address | 
| home-cluster | '<BBBHBBb' | 8 | 0x0A | home-parameters | '<BBB' | 3 | |
| homed-cluster | '<BBB' | 3 | 0x0B | '<BBBBBBBBBB' | 10 | 0..1[prism-count] | |
| write-target-prism | '<BBBBH' | 6 | 0x0C | prism-address, position | '<BBBB' | 4 | prism-address | 
| write-targets-cluster | '<BBBHHHHHHH' | 17 | 0x0D | position[prism-count] | '<BBB' | 3 | |
| pause-prism | '<BBBB' | 4 | 0x0E | prism-address | '<BBBB' | 4 | prism-address | 
| pause-cluster | '<BBB' | 3 | 0x0F | '<BBB' | 3 | ||
| resume-prism | '<BBBB' | 4 | 0x10 | prism-address | '<BBBB' | 4 | prism-address | 
| resume-cluster | '<BBB' | 3 | 0x11 | '<BBB' | 3 | ||
| read-positions-cluster | '<BBB' | 3 | 0x12 | '<BBBhhhhhhh' | 17 | -1..32767[prism-count] | |
| write-run-current-cluster | '<BBBB' | 4 | 0x13 | run-current | '<BBB' | 3 | |
| read-run-current-cluster | '<BBB' | 3 | 0x14 | '<BBBB' | 4 | run-current | |
| write-controller-parameters-cluster | '<BBBBBBBBBBB' | 11 | 0x15 | controller-parameters | '<BBB' | 3 | |
| read-controller-parameters-cluster | '<BBB' | 3 | 0x16 | '<BBBBBBBBBBB' | 11 | controller-parameters | |
| write-double-target-prism | '<BBBBHH' | 8 | 0x17 | prism-address, double-position | '<BBBB' | 4 | prism-address | 
| write-double-targets-cluster | '<BBBHHHHHHHHHHHHHH' | 31 | 0x18 | double-position[prism-count] | '<BBB' | 3 | 
https://github.com/janelia-arduino/ClusterController.git
git clone https://github.com/janelia-arduino/ClusterController.githttps://docs.platformio.org/en/latest/core/installation/index.html
python3 -m venv .venv
source .venv/bin/activate
pip install platformio
pio --versionLinux users have to install udev rules for PlatformIO supported boards/devices.
- 
Download udev rules file to /etc/udev/rules.d curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules
- 
Restart udev management tool sudo service udev restart 
- 
Add user to groups sudo usermod -a -G dialout $USER && sudo usermod -a -G plugdev $USER 
- 
Remove modemmanager sudo apt-get purge --auto-remove modemmanager 
- 
After setting up rules and groups You will need to log out and log back in again (or reboot) for the user group changes to take effect. After this file is installed, physically unplug and reconnect your board. 
- 
Gnu/Linux make firmware 
- 
Other pio run -e pico 
- 
Gnu/Linux make upload 
- 
Other pio run -e pico -t upload 
- 
Gnu/Linux make monitor 
- 
Other pio device monitor --echo --eol=LF 
https://www.arduino.cc/en/software
File > Preferences
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
- Raspberry Pi Pico/RP2040 by Earle F Philhower, III
