A demonstration of how to use johnny-five and chartist.js to visualize sonar readings
To use the code you will need an arduino with PingFirmata flashed on it as well as a HC-SR04 sonar sensor connected to A0 (see below)
- install dependencies
- attach arduino via USB port
- run
node index
- open website
- move object within 1m range of sonar sensor