Go to advanced search

by James12345
Sat Dec 29, 2018 4:49 pm
Forum: HATs and other add-ons
Topic: Sonic Sensors
Replies: 4
Views: 632

Sonic Sensors

Would anyone happen to know how to connect a HC-SR04 using just 3 wires (meaning; using echo and trigger through 1 gpio)? I've googled this and searched all over and there are solutions for Arduinos (assume they allow 5v back to pin, where as a raspberry ...
by tjrob
Sun Dec 23, 2018 1:02 am
Forum: Advanced users
Topic: Solution: Dedicating one core to a real-time process
Replies: 12
Views: 5993

Re: Solution: Dedicating one core to a real-time process

... program implements a 200 MHz frequency counter in a CPLD, sampled at 1 kHz; I will be doing an ADS1256 4-channel ADC sampled at 1 kHz, and also an SR04 ultrasonic ranger at 20 Hz (with accuracy of 2 mm RMS -- much better than most because it times the echo using the SPI clock).
by pcmanbob
Sat Dec 15, 2018 2:42 pm
Forum: Beginners
Topic: Raspberry Pi Rangefinder Setup
Replies: 3
Views: 549

Re: Raspberry Pi Rangefinder Setup

Hi. The HC-SR04 is an ultrasonic range finder and is a normally a 5v device but just check yours is 5v. So you need to connect it like this https://i.imgur.com/4mDmSQ0.jpg you need the potential divider on the echo circuit to reduce ...
by totoharibo
Tue Dec 04, 2018 8:14 am
Forum: Français
Topic: capteurs ultrasons hc-sr04
Replies: 1
Views: 836

Re: capteurs ultrasons hc-sr04

soudure ou wrapping.
by andalus
Mon Dec 03, 2018 1:02 am
Forum: Beginners
Topic: Ultrasonic Sensor (DistanceSensor) not working
Replies: 8
Views: 2767

Ultrasonic Sensor (DistanceSensor) not working

Hello guys, My first time trying HC-SR04. I used the tutorial here for gpiozero: https://projects.raspberrypi.org/en/projects/physical-computing/14 I ended up with the following message: /usr/lib/python3/dist-packages/gpiozero/input_devices.py:779: ...
by pcmanbob
Sun Dec 02, 2018 9:27 pm
Forum: Beginners
Topic: Ultrasonic sensor HC-SR04
Replies: 4
Views: 358

Re: Ultrasonic sensor HC-SR04

Yes you can. If you do use a battery make sure you also connect the battery ground (-ve) to a Pi ground. However, why not just connect more wires to one or more of the Pi's 5V pins? my 2 pins are already taken for a L298N, so i'm afraid that it's too much for my rpi, do you think that it will be ok...
by joan
Sun Dec 02, 2018 7:44 pm
Forum: Beginners
Topic: Ultrasonic sensor HC-SR04
Replies: 4
Views: 358

Re: Ultrasonic sensor HC-SR04

Yes, using an external power supply to power sensors is fine (again with the proviso you need to connect the external power supply and Pi grounds).
by teazy
Sun Dec 02, 2018 6:02 pm
Forum: Beginners
Topic: Ultrasonic sensor HC-SR04
Replies: 4
Views: 358

Re: Ultrasonic sensor HC-SR04

Yes you can. If you do use a battery make sure you also connect the battery ground (-ve) to a Pi ground. However, why not just connect more wires to one or more of the Pi's 5V pins? my 2 pins are already taken for a L298N, so i'm afraid that it's too much for my rpi, do you think that it will be ok...
by joan
Sun Dec 02, 2018 4:40 pm
Forum: Beginners
Topic: Ultrasonic sensor HC-SR04
Replies: 4
Views: 358

Re: Ultrasonic sensor HC-SR04

Yes you can. If you do use a battery make sure you also connect the battery ground (-ve) to a Pi ground.

However, why not just connect more wires to one or more of the Pi's 5V pins?
by teazy
Sun Dec 02, 2018 4:18 pm
Forum: Français
Topic: capteurs ultrasons hc-sr04
Replies: 1
Views: 836

capteurs ultrasons hc-sr04

Salut tout le monde, j'ai besoin d'utiliser 4 capteurs ultrasons pour mon projet mais j'ai plus de place sur les 2 pins 5V de mon rpi, comment je peux faire pour les alimenter ? Il est possible d'utiliser une batterie externe de 5V ?

Merci à vous
by teazy
Sun Dec 02, 2018 4:14 pm
Forum: Beginners
Topic: Ultrasonic sensor HC-SR04
Replies: 4
Views: 358

Ultrasonic sensor HC-SR04

Hi guys, i need to use many ultrasonic sensors (4) and my 2 5V pins on my rpi are already taken
can i use an external battery (5V) to power the sensors ?
Ty for ur help
Best regards
by PhatFil
Sat Dec 01, 2018 11:55 pm
Forum: Other projects
Topic: How to connect many cables in a nice looking way?
Replies: 3
Views: 1029

Re: How to connect many cables in a nice looking way?

... sensor and h/w shields makes it more like leggo a distance sensor for example: https://github.com/arendst/Sonoff-Tasmota/wiki/Wemos-D1-Mini-and-HC-SR04-Ultrasonic-Sensor I think you can find the ldr hook up yourself ;) You will need to learn how to do basic soldering, to solder headers to boards ...
by lakerz690
Fri Nov 30, 2018 6:37 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

You are my frickn' hero! This code works perfectly, did not even have to make one single change. Thank you so much my friend, you don't understand how grateful I am right now!! You're the best!
by lakerz690
Thu Nov 29, 2018 8:48 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

That would be great, I'm going to continue to see if I can get Adafruit_CharLCD for python 3. Also, mess around with trying to get this code to run properly. Thank you.
by pcmanbob
Thu Nov 29, 2018 7:41 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

So here is some code for you to test , note it is untested so there may be errors. #!/usr/bin/python #Libraries import RPi.GPIO as GPIO import time import Adafruit_CharLCD as LCD GPIO.setwarnings (False) GPIO.cleanup() GPIO.setmode(GPIO.BCM) #LCD Pin Select lcd_rs = 25 lcd_en = 24 lcd_d4 = 23 lcd_d5...
by pcmanbob
Thu Nov 29, 2018 7:11 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

Ok so I guess my assumption that Thonny now defaults to python 3 was correct then. If you want to use python 3 then you need to install Adafruit_CharLCD for python 3 but as I don't know how you installed it for python 2 I cant tell you how to install it for python 3. I don't see any reason that your...
by lakerz690
Thu Nov 29, 2018 4:34 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

You are a life saver my friend. I believe the example is running on Python 2, like I stated in my first post I am still very new to coding. But when I try to run it with my Thonny IDE it throws an error, when I run it with terminal, all is well. #!/usr/bin/python # Example using a character LCD conn...
by pcmanbob
Thu Nov 29, 2018 9:30 am
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

So your LCD works if you run one of the examples provided, that's a start. So did you have to run the example using python 2 or python 3 ? Now all you need to do is add the code to take the distance reading and write it on to the LCD, the example code should have the correct commands within it that ...
by lakerz690
Thu Nov 29, 2018 7:30 am
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

So at this point I'm completely lost and frustrated as to why nothing I have been trying is even working. I researched all that I could and tried several different scripts to get this thing to even run. At this point I have just tried to just get it to pull up the distances with only the ultrasonic ...
by pcmanbob
Tue Nov 27, 2018 6:39 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

Well your code works for the distance measurement and led driving because you said it works, what you don't have is any code to print the result to the LCD. I don't use that particular LCD driver but there should be a command something like lcd.write or lcd.print to write text to the LCD. You should...
by lakerz690
Tue Nov 27, 2018 2:12 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

I'm using Thonny, it was already preinstalled on the Raspian OS. I will try running it through CMD and see what happens, I wasn't exactly sure if my code checks out, that was my main concern.
by pcmanbob
Tue Nov 27, 2018 11:32 am
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

Re: HC-SR04, 16x2 LCD, and three LED lights

Hi. My first question is which IDE are you using because I believe the ones on the pi default to python 3 now and your code appears to be written for python 2 which means you may also have only installed Adafruit_CharLCD for python 2 also. you could test this by simply running your program from the ...
by lakerz690
Tue Nov 27, 2018 1:36 am
Forum: Automation, sensing and robotics
Topic: HC-SR04, 16x2 LCD, and three LED lights
Replies: 10
Views: 1961

HC-SR04, 16x2 LCD, and three LED lights

Hello, I am brand new to this forum and still relatively new to working with the Pi. I am working on a project that consists of the HC-SR04 Ultrasonic sensor, a 16x2 LCD display, and three LED lights. So far the code works with the sensor and LED lights, but I just started messing around ...
by RolandDeschain
Tue Nov 20, 2018 8:13 am
Forum: Beginners
Topic: Is it possible to send a number from RPi 3 B to Windows?
Replies: 4
Views: 468

Is it possible to send a number from RPi 3 B to Windows?

... figure out how to send data from my RPi to my computer. The data would be a data channel for a level-sensing project I am doing. I have the HC-SR04 ultrasonic sensor rigged in and it is allowing me to calculate liquid level. I have Python code that outputs the distance in centimeters. What ...
by Random41
Sun Oct 28, 2018 2:42 pm
Forum: General discussion
Topic: Park-Assist
Replies: 2
Views: 530

Park-Assist

... The cameras are PAL 720x582 140 degree or around that(haven't chosen exactly, but almost all are around that spec), the sensors - either OEM or HC-SR04. Question is: Will Raspberry be enough for this and if yes, then which one, if not - what should I get? Thank you in advance, also - I don't know ...

Go to advanced search