Introduction: Fun Counter With Bluetooth and Ultrasonic Sensor
Hey, I want to show an easy way to count anything and display it on your system. Here we are using Bluetooth so you can display the results on a bigger screen(instead of LCD) wirelessly in real time. For those unfamiliar with node.js, don't worry we have included everything here and you will learn something really interesting today.
We did this as part of our kickstarter called Jetpack a wireless programing Bluetooth shield+motor driver shield for Arduino. You can easily use any sensor to this shield for real time data monitoring. You can use your own substitutes and create interesting 5 min projects using counters.
Got 750% funded on Kickstarter! We are amazed by this response and so jet pack is now available for pre-order on http://www.jetpackshield.com/
- Jetpack (Bluetooth shield)
- PC or laptop with Bluetooth(as a large display)
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Make the Connections As Shown
Connect the Ultrasonic sensor to Jetpack and mount it on an arduino as shown in the picture. Connect the power supply.
Step 2: Upload Your Program Wirelessly With Jetpack
You can easily upload your program wirelessy with Jetpack. Refer this instructable(data monitoring) for wireless programing . You will be using the outgoing Com Port when you upload the code.
Alternatively you can upload your program directly to Arduino. The code is given below. Before going to the next step please ensure that all the connections are complete and sensor is sending the data.
Step 3: Install Node.js and Run the Given Script for Your Big Display
We are using node.js to a create local server. With this we can display data received from the Arduino via Bluetooth on your browser. You can use this in many other applications.
- Download and extract the file given below
- Open the folder, and double click on run-server.bat
- Now you need to enter the incoming serial Port ID(Here its COM6). You will find it in your Bluetooth setting(check the picture shown above)
- The count will be displayed in your browser, for full screen Press F11
If you want to learn more please have a look at this
- https://nodejs.org/api/ for node.js reference
- https://github.com/voodootikigod/node-serialport for node.js serialport module reference
- http://expressjs.com/en/guide/routing.html for node.js express module routing reference
http://brandonlwhite.github.io/sevenSeg.js for more info on jquery based seven segment display