Visualizing a heart beat in the browser.
You will need the following:
- An Arduino (code only works with Arduino and tested with an Uno)
- A Pulse Sensor
- A USB cable to connect the Arduino to your computer (or some other way to get the serial output to your computer).
Connect the Pulse Sensor to the Arduino with the following configuration.
- Connect the Ground (black) wire to the GND pin on the Arduino.
- Connect the Power (red) wire to the 5V pin on the Arduino.
- Connect the Data (purple) wire to the A0 analog pin on the Arduino.
Get this code:
- Use the Download ZIP button or use Git to checkout the code.
- Plug-in the Arduino to the computer with the USB cable.
- Download and open the Arduino IDE.
- Go to File -> Open and open the
heart-of-the-browser.ino
file from this repository. - Upload the sketch to your Arduino. (You can open up the serial monitor in the Ardunio application to double check that data is being output)
The main visualization is for a web browser. The following commands are for the Command Line (Terminal) and are expected to be run from the root of this project (except for the first one).
- Change to the projects directory:
cd heart-of-the-browser
- Install NodeJS.
- Install SerialBot:
npm install serialbot -g
- Install Bower:
npm install bower -g
- Install Bower dependencies:
bower install
- Run SerialBot with a similar command; you will need to change the serial port path:
serialbot start /dev/cu.usbmodemXXX -b 115200
- Use the following command to get a list of serial ports to find the one that the Arduino is connect to:
serialbot list
- Use the following command to get a list of serial ports to find the one that the Arduino is connect to:
- Open
index.html
in a web browser.- It is suggest to use a simple web server. For instance the following will install a simple web server and make one at port
8080
:npm install http-server -g && http-server
- It is suggest to use a simple web server. For instance the following will install a simple web server and make one at port