c2-utopia/README.org

81 lines
3.6 KiB
Org Mode
Raw Normal View History

2024-07-16 11:52:01 +02:00
* C2 - utopia
Musical/visual/dance performance of Borut Kržišnik's new album, Utopia, with
Ryuzo Fukohara dancing and triggering / modulating sounds and projections by Simon Svetlik.
2024-09-16 00:18:44 +02:00
We plan to plant 5-6 sensors on Ryuzo, the IMU signals will be converted
into MIDI for Borut in Simon.
2024-07-16 11:52:01 +02:00
** Code
*** Arduino sensor
2024-09-16 00:18:44 +02:00
Arduino code that reads linear acceleration, sensor fused quaternion orientation data and the battery voltage on an ESP32S3 connected to an Adafruit BNO055 orientation sensor.
NOTE: you have to set the sensor ID via source! And the receiver's mac address. Linux monitor mode can receive packages pointed to other mac addresses though.
[[file:src/main.cpp][Arduino source (adafruit BNO055 on ESP32S3)]]
[[file:src/main.cpp][Arduino source (adafruit BNO055 on an OlimexESP32S3)]]
*** Arduino receiver
[[file:src/sprejemnik.cpp][Arduino source (ESP32S3 receiver)]]
2024-09-16 00:18:44 +02:00
This may be simpler since it doesn't depend on the wifi card used, but the max rate seems to be about 160 packets per second.
*** Linux receiver
You need a wifi card that supports monitor mode for this.
Two scripts are provided to turn monitor mode on/off; [[file:linux-receiver/monitor_on.sh][monitor_on.sh]] and [[file:linux-receiver/monitor_off.sh][monitor_off.sh]]. Run the receiver with [[file:linux-receiver/pozeni.sh][pozeni.sh]], the receiver's code in C can be found in [[file:linux-receiver/main.c][main.c]].
This way, around 700-800 packets can be received in a second. Also OSC packages are sent directly to supercollider, bypassing the SLIP decoder.
*** Supercollider receiver code
[[file:utopia.scd][Utopia receiver]]
2024-09-16 00:18:44 +02:00
*** SLIPDecoder source
2024-09-16 00:18:44 +02:00
Library for decoding SLIP encoded OSC data via serial USB directly into supercollider.
[[file:~/.local/share/SuperCollider/downloaded-quarks/SLIPDecoder/SLIPDecoder.sc][SLIPDecoder source]]
** Microcontrollers
*** LilyGo ESP32-S3
https://www.lilygo.cc/products/t7-s3
[[file:doc/t7-s3_v1.1_pinmap.jpg][Pinout]]
Sometimes doesn't want to flash; hold BOOT button and click RESET to enter flash mode.
[[file:lib/OSC/SLIPEncodedSerial.cpp][cnmat/OSC SlipEncodedSerial]] needed a modification; constructor argument typecast to ~HWCDC~.
Should be compiled with ~-DARDUINO_USB_CDC_ON_BOOT=1~ to enable USB CDC.
*** Olimex ESP32-S2-DevKit-Lipo-USB microcontroller
For (testing / development)
https://www.olimex.com/Products/IoT/ESP32-S2/ESP32-S2-DevKit-Lipo-USB/open-source-hardware
[[file:doc/ESP32-S2-DevKitLiPo-GPIO.png][Pinout]]
** Sensor (Adafruit BNO055)
[[file:lib/Adafruit_BNO055-1.6.3/Adafruit_BNO055.cpp::57][Operating modes]]
[[file:doc/BST_BNO055_DS000_12.pdf][Datasheet]]
2024-07-16 11:52:01 +02:00
** Materials
[[file:./dokumentacija.jpg][raw documentation]]
2024-07-16 11:52:01 +02:00
- +8 senzorjev MPU 9250 (9-DOF)+ (wrong models sent, MPU-6500 or similar, returned)
2024-07-16 11:52:01 +02:00
https://www.ebay.com/itm/153559516252
5.88$ * 8 + 3.49$ (posiljka) = 47.89$ * 1.22 davek = 58.43$ (+ carina nekaj?)
- +8 krmilnikov esp32+
2024-07-16 11:52:01 +02:00
https://www.olimex.com/Products/IoT/ESP32-C3/ESP32-C3-DevKit-Lipo/open-source-hardware
6€ * 8 = 48€ * 1.22 davek = 58.56€ (+ shipping = ? - iz bulgarije)
- 14x Li-Po battery 3.7V 800mAh
https://www.tinytronics.nl/en/power/batteries/li-po/li-po-accu-3.7v-800mah
6.75€ * 14
- 10x Adafruit BNO055 9-DOF sensors
https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview
- 8x LilyGo ESP32-S3 microcontrollers
https://www.lilygo.cc/products/t7-s3
[[file:doc/t7-s3_v1.1_pinmap.jpg][Pinout]]
2024-07-16 11:52:01 +02:00
2024-09-16 00:18:44 +02:00
We also need some velcro and elastic tape to make sensors easily mountable and
+protoboards to hold it all together+ compactly designed 3d printed cases.
2024-07-16 11:52:01 +02:00
And a charging station for batteries (TODO).