Coding might appear to be some sort of daunting witchcraft, but MIT App Inventor makes it easy and accessible. App Inventor provides blocks, unlike arduino coding where it is liteterally just text. For MIT App Inventor, one merely goes to the side bar and clicks on the bubble/block that one needs. The apps that one creates on App Inventor, have individual scan codes, that an android device can capture, then miraculsoly transform into the app you created.
The app I created works so that when one hits "get" on the home screen of the app, one recieves one's pulse. This is done however through connecting the device, on which the app in running, to a bluetooth chip on the coded arduino. One has to connect the android device and the app to the chip; the app connects to the chip by merely pressing the button connect and then one has to select the propper blue tooth chip. One has to go into the settings of the device in order to connect it to the bluetooth chip, but that is fairly easy.
The whole enchilada is merely a series of transfers. The pulse sensor(attached to the arduino) sends signals to the arduino, based off of when the led is blocked by a pulse; a pulse is marked by a 1, based off of digital data transformations. The when the led senses no pulse the digital data is marked as 0. The arduino, is set at a reading frequency to where it recieves the data and gets the most "best fit" reading. The bluetooth, which is attached to the arduino, sends the information to the app, which is set at the highest reading frequency it can handle. The beats the app recieves are paired with the playing of a heart beat. So when the app recieves a 1, a heart beat sound is played.
The app we created has buttons for: connecting to bluetooth, get information(digital data), play(just to hear the heartbeat track that can be paired with one's own heartbeat), and stop(to stop the heartbeat track.) Each of these buttons is in a group on app inventor, because like I said, everything is a chain reaction. For example; if one hits stop, play turns off.
In addition to the buttons in the actual code, there is an aia file already created for connecting android devices to bluetooth chips which I was able to upload and tweek to fit our app's specific needs.
We tried having the app graph the heartbeat(sine waves), but app inventor isn't that advanced yet, for it only tracks 1/100th of a second before the graph cancels out. Not to mention the axises are all reversed, and the graph goes from right to left rather than left to right. So, in total this idea was futile.
But the app that we have created now works and can be useful in numerous different ways. As explained under process, listening to one's heartbeat is very beneficial and nurturing to one's meditative state. Thus, we figured that this device could potentially be useful for people with insomnia, so as to lower heart rate, and listen to the peaceful pulsations with just the press of a button.