A Program to control SuperCollider using IMU data from M5StickC Plus.
The battery duration of the device with this sketch is approx. 1 hour.
Note that the device is turned on as soon as it is connected to a USB power source.
To prevent yaw drifting, keep it stationary until gyroZs are stocked (2 sec) after power-on.
- M5StickC Plus
- SuperCollider
- ArduinoOSC
- WiFi connection
https://www.arduino.cc/en/software
- Download ZIP
- Unzip and run 'Arduino IDE.exe' (as administrator)
https://docs.m5stack.com/en/quick_start/arduino
- Do step 1 to 3
- Click 'Select board' > An available serial port (ex. COM3)
- Select Other Board and Port > Select 'M5Stick-C-Plus' from BOARDS > OK
https://docs.m5stack.com/ja/quick_start/m5stickc_plus/arduino
https://github.com/hideakitai/ArduinoOSC
- Download ZIP
- Sketch > Include Library > Add .ZIP Library... > Select ZIP
- Open 'IMUOSC/Arduino/main/main.ino'
- Change M5ID value (= sensor ID)
#define M5ID 0 // Set the sensor ID
- Set the SSID and PIN of your access point (= Wifi router)
const char ssid[] = "SSID"; // SSID of your access point - router
const char pass[] = "PIN"; // PIN of your access point - router
- Set these parameters to match your PC's IP address
char *pc_addr[] = { "192.168.10.100", "192.168.10.101" }; // Static IP of your PC
IPAddress ip(192, 168, 10, 120 + M5ID); // The first three numbers are the same as IP of your PC
IPAddress gateway(192, 168, 10, 1); // Default gateway of your PC
IPAddress subnet(255, 255, 255, 0); // Subnet mask of your PC
- Upload it to M5StickC Plus
- Place 'SuperCollider/IMU-utils' folder into Platform.userExtensionDir or Platform.systemExtensionDir
- See 'plotter_test.scd'
- Press button A to display screen for 3 seconds.
- Press button B to switch pc_addr.
- Press power switch for approx. 1 second to power on/off.