top of page
Search
Writer's pictureCHLA

Week 4 - Spirometer Integration

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.



3. Change the following as per your network:

  1. const char * networkName = "SSID";

  2. const char * networkPswd = "password";

  3. 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!


26 views0 comments

Recent Posts

See All

Comentarios


bottom of page