M5StickC sensor information (accuracy, gyro, attitude (rotation)) is transmitted by UDP on Wifi.
日本語はこちら
I am using some of AxisOrange's code. I think it is better to use this for reference of connection and code via Bluetooth.
- PlatformIO
- mahony
- M5StickC : MIT License
- Wifi : esp32 Wifi support. MIT Licnese.
- WiFiUdp : Library to send/receive UDP packets. MIT Licnese.
- git clone
- set the wifi information and the destination IP (set https://github.com/machidyo/Ryap/blob/master/src/main.cpp#L13-L15)
- install to M5StickC
- confirm to connect to Wifi (*1)
- Make sure you see the IP as
--ryap--192.198.137.143
- If you cannot connect to Wifi, only
--ryap--
will be displayed. Please review the SSID, password, etc. - IP is a sample and depends on the environment.
- git clone [RypaUnity] (https://github.com/machidyo/RyapUnity)
- Open and run in Unity.
- Make sure the M5StickC on the Unity screen moves as the M5StickC moves.
- If the movement is correct but the orientation is different in the first place, make the M5StickC horizontal once, press the A button to adjust the initial posture, and then check again. Demonstrated in the middle of the video.