This Project shows you how to create a smart spirometer and how you can connect it to an Android Phone. We used materials from https://www.adafruit.com. The project consists of two main parts the spirometer and the preparation of the smart phone.
Connect the Feather over a Micro-USB cable to your computer. Now open the our Arduino code and upload it to the Feather.
Prepare the breadboard by sticking the Feather and the proximity sensor on it. Next connect the following pins: SDA, SCL, GND, and SCL.
After you wired everything glue or tape a frame on the breadboard, which will be the stand for the spirometer.
Open the base of the spirometer and pull the white cylinder out. Now glue aluminum foil on the bottom of cylinder.
Place the battery inside of the free space of the breadboard. You can charge the battery by plugging the powersupply into the Feather on the open side.
Place the spirometer including the cylinder on top of the breadboard. Fix the spirometer either with glue or tape. Now the spirometer is complete.
To prepare your Android phone download the MIT AI2 Companion from the Google Playstore.
Build the App by clicking on the Build tab in the header and then choose the "Provide QR code" option.
Open the AI2 Companion App on your phone and scan the on your screen QR code. This will open an installation window. You might need to allow external source to be able to install the app.
Now open the installed app on your phone and power the spirometer. To connect the app with the spirometer you need to follow three steps. First click on the scan button. Second click "Select Device" and choose the Adafruit Device. Third click on "Start Tracking". Now you have linked your phone to the spirometer. The app will show you the movement of the spirometer as a moving ball on the screen.
If you have any questions feel free to contact me via firstname.lastname@example.org