Go Down

Topic: Modifying Serial Port? (Read 256 times) previous topic - next topic

nikobeast

I am trying to follow this tutorial https://openhomeautomation.net/bluetooth-heart-rate-sensor-arduino
and I have uploaded the code to the arduino. However, I now have to " see how to use the application to display the data, based on Node.js. We won't see all the details of this app, but basically once you download the file from the GitHub repository you just need to modify the Serial port corresponding to your Bluetooth module. This value can be found in your Arduino IDE under Tools>Port. Then, open the file called app.js, and modify the following line:

rest.addDevice('serial','/dev/tty.usbmodem1a12121', 115200);

It's now time to test the application. Go in the folder where you put all the application files, and type:

sudo npm install arest express jade
Then, start the application with:

node app.js
Finally, go to your favorite web browser and type:

localhost:3000"
 I checked under port but all it has is the arduino port, how do I modify it? Also, if anyone could re-iterate these instructions in a much simpler form it would be greatly appreciated as I am a very inexperienced programmer.

gdsports

What is the name of the Arduino serial port? You must know what is it if you use the Arduino IDE to upload a sketch. Suppose it is COM9.

See if this works.

Code: [Select]
rest.addDevice('serial','COM9', 115200);

nikobeast

What is the name of the Arduino serial port? You must know what is it if you use the Arduino IDE to upload a sketch. Suppose it is COM9.

See if this works.

Code: [Select]
rest.addDevice('serial','COM9', 115200);

yes, the port is COM3, i just don't know where to type the code

gdsports

You missed several steps.

app.js is from here https://github.com/openhomeautomation/bluetooth-pulse-rate-sensor. You must download and install the files on your computer. The easiest way is to download the files in a ZIP file.

Another prerequsite is you must download and install node.js. If you need help with this, ask on a node.js forum.

Go Up