Arduino Coding

Zachary Mills

The Arduino Coding for the project focused on communication via bluetooth and identifying heartbeats from the sensor data. Communicating with bluetooth especially took a toll on the project. MIT App Inventor could not keep up with the stream of data that the arduino wanted to send, so the arduino's BPM had to be lowered to 9600 BPM as opposed to the previous 115200 BPM. Even following this, there was a permanent delay between the data recieved and the sound played. Our team ran out of time to fix this problem. In addition, the pulse sensor had been very generous with what was a hearbeat and what wasn't. We narrowed down what would be registered as a heartbeat as best we could (beat times, timers, etc.) in the arduino coding, but it was never a perfect fix. The arduino coding itself transformed the heartbeat sensor data from analog into binary and sent it over bluetooth to the application. This made our team's job in MIT App Inventor much easier. The app only had to detect ones and zeros, and respond accordingly to each.