Setting up a flow using ultrasonic sensors

691 views
Skip to first unread message

James

unread,
Feb 15, 2017, 12:55:43 AM2/15/17
to Node-RED
Hi I'm trying use a ultrasonic sensor for my Arduino project but the only option I've seem to see is using a particular node that only associates to raspberry pi. I was hoping to get any suggestion on how I could get my ultrasonic sensor output a measurement? 

This is what I was thinking but it doesn't seem to work, I'm using pin 13 for my echo and pin 10 for my trigger. I been trying use the Johnny5 code in relation to the HC-Sr04 ultrasonic sensor. 


Dave C-J

unread,
Feb 15, 2017, 1:38:15 PM2/15/17
to node...@googlegroups.com
​Hi,
the raw gpio nodes are unlikely to be accurate enough timing ​wise to work via Johnny five. You would be better off either programming the arduino "normally" and send the data back over serial port to the serial node - or using the SRF04 directly on the pi with the node-red-node-pisrf node - http://flows.nodered.org/node/node-red-node-pisrf

James

unread,
Feb 15, 2017, 10:34:11 PM2/15/17
to Node-RED
Thanks Dave, I went out got myself a raspberry pi and Ive set it up but being still new to this, I seem to be having the issue of not being able to see any of the package I've installed. I tried to replicate the modules I installed on my Mac to my pi but it hasn't appeared. Just wondering have missed a step ive been following the instruction from http://nodered.org/docs/hardware/raspberrypi

Dave C-J

unread,
Feb 15, 2017, 11:11:46 PM2/15/17
to node...@googlegroups.com
How did you install them? Did you cd ~/.node-red before you tried?
Did you upgrade the pi first ?

James

unread,
Feb 15, 2017, 11:18:36 PM2/15/17
to Node-RED
I installed all modules into cd node-red. But I didn't upgrade, so I will give that a shot and give you an update soon. thanks dave

James

unread,
Feb 15, 2017, 11:47:02 PM2/15/17
to Node-RED
Thanks Dave most of the modules are now showing expect for GPIO which is saying [gpio] Error : Module version mismatch expected 48, got 51. Is this just saying I've got multiple modules of GPIO?
Reply all
Reply to author
Forward
0 new messages