Closed nathalok closed 11 years ago
Any progress here? I'm trying to do something similar with the serial lines not the GPIO.
I have dropped the idea of using node-serialport. Instead I am using pySerial just to read the serial data and pass it to the node application. It works for me.
are you using straight raspbian?
yes. The image is 2013-02-09-wheezy-raspbian.
Yup, on a clean install via NOObs and with Johnny Five.
Thanks will try that.
What device are you connecting to.
Happy to get you to complete even if with pyserial (which is great and more established). Just want to try to get all data to recreate if I can.
On Wednesday, June 26, 2013, Jonathan Beri wrote:
Yup, on a clean install via NOObs and with Johnny Five.
— Reply to this email directly or view it on GitHubhttps://github.com/voodootikigod/node-serialport/issues/166#issuecomment-20089567 .
Chris Williams @voodootikigod http://twitter.com/voodootikigod | GitHubhttp://github.com/voodootikigod
You will most likely find me working on: SaferAginghttp://www.saferaging.com/ | JSConf http://jsconf.com/ | NodeBotshttp://www.voodootikigod.com/nodebots-the-rise-of-js-robotics
The Raspberry PI is connected to Xbee Explorer board (https://www.sparkfun.com/products/8687) which talks to Arduino wirelessly.
Here is how it looks like -
Sweet nice fritzing use!
Lets try to recreate and fix thanks for the details
On Wednesday, June 26, 2013, nathalok wrote:
The Raspberry PI is connected to Xbee Explorer board ( https://www.sparkfun.com/products/8687) which talks to Arduino wirelessly.
Here is how it looks like -
[image: homeautomation_3]https://f.cloud.github.com/assets/4198123/713273/05d5ad6a-dec2-11e2-8aed-933c0c356aa9.png
— Reply to this email directly or view it on GitHubhttps://github.com/voodootikigod/node-serialport/issues/166#issuecomment-20090402 .
Chris Williams @voodootikigod http://twitter.com/voodootikigod | GitHubhttp://github.com/voodootikigod
You will most likely find me working on: SaferAginghttp://www.saferaging.com/ | JSConf http://jsconf.com/ | NodeBotshttp://www.voodootikigod.com/nodebots-the-rise-of-js-robotics
Can you try with the latest version of node (0.10.12) 0.9.x was a dev branch and not supported. I have tested this locally and it seems to work perfectly. I have posted how I got everything working here: https://github.com/voodootikigod/node-serialport/wiki#raspberry-pi-linux-raspbian
nudge.
bump @nathalok
Sorry guys. Will try tonight and will post it soon. Some of the steps especially node.js installation in raspberry PI takes couple of hours. Normally I leave it to run overnight.
On Tue, Jul 30, 2013 at 10:45 AM, Tim Oxley notifications@github.comwrote:
bump
— Reply to this email directly or view it on GitHubhttps://github.com/voodootikigod/node-serialport/issues/166#issuecomment-21762592 .
There's official pre-built binaries: http://nodejs.org/dist/v0.10.13/node-v0.10.13-linux-arm-pi.tar.gz
Just add it to your PATH:
sudo mkdir /opt/node
Thank everyone. Its working. 3 Cheers!
I am trying to read the serialport data but it doesn't display anything. I have verified that the data is arriving in the serialport. The same script works fine in windows 7. Also I have tried two different approaches of reading the serial data but none of them work. The node.js version I am using is v0.9.9.
Any help will be greatly appreciated.
var sys = require('sys'); var portName = '/dev/ttyACM0' ;
///////////////////////////////////////////////// //Approach 1 ///////////////////////////////////////////////// var SerialPort = require("serialport").SerialPort var serialPort = new SerialPort(portName, { baudrate: 9600 });
serialPort.on("open", function () { console.log('open'); serialPort.on('data', function(data) { //console.log('data received: ' + data); sys.puts("here: "+data); });
serialPort.on('error', function(message) { console.log('error: ' + message); }); });
///////////////////////////////////////////////// //Approach 2 ///////////////////////////////////////////////// var serialport = require("serialport"); var SerialPort = serialport.SerialPort; // localize object constructor
var sp = new SerialPort(portName, { parser: serialport.parsers.raw });
sp.on("data", function (data) { sys.puts("here: "+data); });