This week's aim was to integrate the Spirometer with Arduino and Unity.
The integration of the Spirometer with Arduino and Unity was a steep learning curve. With guidance from Prof. Vangelis, we were able to achieve this task.
We were able to create a setup process, which is as follows:
I. Arduino Side
1. Follow this link https://github.com/m5stack/m5-docs/blob/master/docs/en/quick_start/m5stick/m5stick_quick_start_with_arduino_Windows.md to set up the Arduino IDE.
2. Find the code at https://drive.google.com/open?id=124uAyDuRaVKKAhJXvvgv7dUbl4TBwgaM
3. Change the following as per your network:
const char * networkName = "SSID";
const char * networkPswd = "password";
const char * udpAddress = "192.168.43.61"; # Your computer/ Oculus Go IP address

4. Compile the code
5. Upload the code on the stick by pressing the boot button continuously until the upload is complete.

II. Unity Side
1. Guide to set up Unity to receive data using OSC protocol:
https://thomasfredericks.github.io/UnityOSC/
2. OSC receiver code
https://github.com/thomasfredericks/UnityOSC
https://github.com/keijiro/OscJack
3. Change the IP address in the OSC.cs file to the IP address used in the M5 code
Next week's roadmap will be to cover the below aspects:
1. Visualize the spirometer device readings on Unity application for animation.
Please post any questions, comments, suggestions or feedback. We will be happy to address! Thank you for reading!
Comments