Hey pcmanbob.
I was thinking the same thing, that going over a network will mess up the speed of the pulses. PS. Not sure if my first response went through.
Yes. I have a remote SSH connection to the RPI with the sensor attached. When I run it locally it is fine. It's when I use the pin_factory to connect to the slave RPI is when it error's out. I have even pointed the IP address back to itself and it will work but the values aren't accurate.
If it is physically possible, have you considered troubleshooting this by making a remote ssh (or vnc) connection into the RPi to which the ultrasonic sensor is directly connected, to check whether gpiozero can access the sensor in that simple non-networked scenario? Maybe you actually have a wiring...
Trying to drive the gpio remotely over a network will probably not work for something like the HC-SR04 because the software relies on accurate gpio timing to trigger the sensor and then see the fast returning echo, trying to do this over a network will introduce timing errors ...
Thanks for your reply. Sorry I think I left some information out. I was trying to use gpiozero because I thought it would be the easiest way to use the remote GPIO pins on the second Pi ( basically a slave). They are both connected to a network switch through Ethernet cables and are about 75 - 100 f...
... with 2 Raspberry pi's ( Model 3B+ ) that are on my LAN with Ethernet connections. I have been trying to use Remote GPIO (GPIOzero) with an HC-SR04 from one pi to another. I can do it with a basic LED and a Button, but when I tried to use the ultrasonic sensor i kept getting "No Echo Received" ...
https://github.com/AmrMohamed-95/radar-simulation/tree/master/src[url] [/url] The code works fine. there is a small error and it is easy to fix. in the ultrasonicsensor.py module just create the variable start_time. This way if the condition doesn't create it python won't report an error. def ultra...
An item like the SR04 has a 15 degree cone of emission. A SR04 does not give accurate distance readings whiles the SR04 is moving. Thus, the SR04 will have to ping, move, stop, ping... The SR04 is a noisy device but with about 30.00USD ...
Hello,
I am making a parking assist with a Raspberry Pi3 B +. I need to send the readings of the program that calculates the HC-SR04 sensors' readings to a phone via Wi-Fi. How do I do that?
I have already set up a server for the cameras. Can't I just send the distance readings to different ports?
The HR-04 sensor is supported by the gpiozero libary https://gpiozero.readthedocs.io/en/stable/api_input.html?highlight=sr04#distance-sensor-hc-sr04 Thank you, I am aware of the code that is used to run the sensor for its intended purpose but the project I am referring to uses a radar ...
I have already created several projects using the HC-SR04 to measure distance, and to be used as a indicator. None of these responses answered my main question. I'm not going to go out and buy another sensor when I know I can utilize this as a radar. ...
Hello, so I have been trying to figure out the working code to create a radar using the Raspberry Pi 3+ and a HC-SR04 sensor. I have not found much luck, specifically for the coding that goes behind this. Most references are for the Arduino, so that doesn't help much. I have everything ...
... but actually just used the output to drive a digital input, this enabled the sensor range to be set at a fixed distance. ultrasonic sensor ( HC-SR04 ) would enable you to measurer the range to an obstacle over a greater distance, but does require more programming to achieve so can cause delays ...
die Senoren können auch nicht untereinander kommunizieren. Der HC-SR04 schaltet nur sein Echo PIN ein/aus. Per Programm wird die Zeit gemessen zwischen Trigger (Start der messung) und Echo (Empfang der Reflektion). Ist gut bei netzmafia erklärt. http://www.netzmafia.de/skripten/hardware/RasPi/Projekt-Ultraschall/ ...
Hi I am a beginner to physical computing and I am trying to use the HC-SR04 Ultrasonic Sensor. I keep running into the same error every time i run my code and try to find the distance of an object, my code is as follows: >>> from gpiozero import DistanceSensor ...
... geradeaus faehrt und der LKW nach rechts abbiegen will. Auf einer von mir gebauten Legokreuzung im Massstab 1:41 befinden sich je zwei Sensoren HC-SR04 seitlich des Radweges und zwei Sensoren HC-SR04 seitlich an der Fahrbahn des LKW. Die Wegstrecke des Fahrrades und des LKW bis zur Wartelinie auf ...
Hmm, that code works fine for me using an HC-SR04 ultrasonic sensor on a pi2. So probably it is your wiring What happens if you connect the trigger to physical pin 38 and echo (with ressitors) to physical pin 40 (the two on outside bottom right ...
Its designed for 5v not 3v3, if you have it connected to 3v3 then try upping that to 5v (but add a voltage divider to the echo pin to protect your GPIO). (See Joan's graph , 3rd post on the 2nd page of this thread). I wasn't happy with the results so plugged the unit into the 5V supply rather than ...
So looking at the sunfounder site they list 2 ultrasonic sensors. The standard HC-SR04 which has 4 active pins and 5v powered, suitable for use with the arduino , pi and others. http://wiki.sunfounder.cc/index.php?title=Ultrasonic_Module And The SF-SR02 which only ...
... 0,1 (HIGH/LOW) through the signal wire to check the distance. Meaning it is doable to send both signals to one pin. Guess I'll just get in the HC-sr04's I have on order and use 10 gpio pins for now (those look stupid simple to write scripts for as well). Can always figure this out later if I end ...
Hi The problem you will have is that your pi gpio is 3.3v only and not 5v tolerant and the HC-SR04 being 5v powered has an output of 5v so you will need to shift the 5v to 3.3v or risk damaging your pi. That's probably why you cant find any examples of using just 1 gpio ...