Go to advanced search

by ColMustard
Wed Feb 06, 2019 9:43 pm
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

Re: HC-SR04 with Remote GPIO

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.
by ColMustard
Wed Feb 06, 2019 9:34 pm
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

Re: HC-SR04 with Remote GPIO

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.
by B.Goode
Wed Feb 06, 2019 6:59 pm
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

Re: HC-SR04 with Remote GPIO

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...
by pcmanbob
Wed Feb 06, 2019 6:56 pm
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

Re: HC-SR04 with Remote GPIO

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 ...
by ColMustard
Wed Feb 06, 2019 6:18 pm
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

Re: HC-SR04 with Remote GPIO

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...
by pcmanbob
Wed Feb 06, 2019 12:50 pm
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

Re: HC-SR04 with Remote GPIO

Hi.

Is this any help if you specifically want to use gpiozero

https://projects.raspberrypi.org/en/pro ... mputing/14
by ColMustard
Wed Feb 06, 2019 2:29 am
Forum: Beginners
Topic: HC-SR04 with Remote GPIO
Replies: 11
Views: 541

HC-SR04 with Remote GPIO

... 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" ...
by danjperron
Mon Feb 04, 2019 2:27 am
Forum: Troubleshooting
Topic: Radar Project Using Ultra Sonic Sensor
Replies: 22
Views: 5426

Re: Radar Project Using Ultra Sonic Sensor

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...
by Idahowalker
Sun Feb 03, 2019 3:58 am
Forum: Troubleshooting
Topic: Radar Project Using Ultra Sonic Sensor
Replies: 22
Views: 5426

Re: Radar Project Using Ultra Sonic Sensor

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 ...
by Random41
Thu Jan 31, 2019 2:01 pm
Forum: Beginners
Topic: Uploading program output to server. How?
Replies: 5
Views: 513

Uploading program output to server. How?

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?
by lakerz690
Wed Jan 30, 2019 5:17 pm
Forum: Troubleshooting
Topic: Radar Project Using Ultra Sonic Sensor
Replies: 22
Views: 5426

Re: Radar Project Using Ultra Sonic Sensor

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 ...
by lakerz690
Wed Jan 30, 2019 5:09 pm
Forum: Troubleshooting
Topic: Radar Project Using Ultra Sonic Sensor
Replies: 22
Views: 5426

Re: Radar Project Using Ultra Sonic Sensor

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. ...
by scotty101
Wed Jan 30, 2019 9:24 am
Forum: Troubleshooting
Topic: Radar Project Using Ultra Sonic Sensor
Replies: 22
Views: 5426

Re: Radar Project Using Ultra Sonic Sensor

The HR-04 sensor is supported by the gpiozero libary

https://gpiozero.readthedocs.io/en/stab ... or-hc-sr04
by lakerz690
Wed Jan 30, 2019 3:54 am
Forum: Troubleshooting
Topic: Radar Project Using Ultra Sonic Sensor
Replies: 22
Views: 5426

Radar Project Using Ultra Sonic Sensor

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 ...
by pcmanbob
Tue Jan 29, 2019 12:58 pm
Forum: General discussion
Topic: what is the best choice for obstacle avoidance
Replies: 2
Views: 399

Re: what is the best choice for obstacle avoidance

... 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 ...
by smartifahrer
Sat Jan 26, 2019 9:07 am
Forum: Deutsch
Topic: Schulaufgabe
Replies: 1
Views: 768

Re: Schulaufgabe

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/ ...
by shanef25
Fri Jan 25, 2019 2:20 am
Forum: Beginners
Topic: Ultrasonic Distance Sensor not Working
Replies: 3
Views: 690

Ultrasonic Distance Sensor not Working

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 ...
by rasperryfanboy13
Thu Jan 24, 2019 6:49 pm
Forum: Deutsch
Topic: Schulaufgabe
Replies: 1
Views: 768

Schulaufgabe

... 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 ...
by eddyeddy
Sun Jan 06, 2019 9:03 pm
Forum: Beginners
Topic: IoT-Enabled Smart Parking with PI
Replies: 5
Views: 922

Re: IoT-Enabled Smart Parking with PI

neilgl wrote:
Fri Jan 04, 2019 12:37 am
Yes the HC-SR04 ultrasonic sensor is what you should be looking for. No need for any IBM stuff. There are lots of examples of using it on a pi.
Will do more research, thank you!
by neilgl
Fri Jan 04, 2019 12:37 am
Forum: Beginners
Topic: IoT-Enabled Smart Parking with PI
Replies: 5
Views: 922

Re: IoT-Enabled Smart Parking with PI

Yes the HC-SR04 ultrasonic sensor is what you should be looking for. No need for any IBM stuff. There are lots of examples of using it on a pi.
by neilgl
Tue Jan 01, 2019 3:13 pm
Forum: Troubleshooting
Topic: Distance sensor issue US-015
Replies: 13
Views: 1130

Re: Distance sensor issue US-015

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 ...
by prahas.programming
Mon Dec 31, 2018 10:58 pm
Forum: Automation, sensing and robotics
Topic: Problems with the HC-SR04 Ultrasonic Sensor
Replies: 15
Views: 21822

Re: Problems with the HC-SR04 Ultrasonic Sensor

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 ...
by pcmanbob
Sat Dec 29, 2018 10:57 pm
Forum: HATs and other add-ons
Topic: Sonic Sensors
Replies: 4
Views: 632

Re: Sonic Sensors

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 ...
by James12345
Sat Dec 29, 2018 8:52 pm
Forum: HATs and other add-ons
Topic: Sonic Sensors
Replies: 4
Views: 632

Re: Sonic Sensors

... 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 ...
by pcmanbob
Sat Dec 29, 2018 7:14 pm
Forum: HATs and other add-ons
Topic: Sonic Sensors
Replies: 4
Views: 632

Re: Sonic Sensors

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 ...

Go to advanced search