... the one. If you are using PWM then RPIO is likely to be better (especially for servos). There is no evidence of the trigger being sent to the HC-SR04. I'm surprised you get any readings at all. Could you check that you have posted the complete code. Are you attempting to send the trigger pulse ...
Thanks joan.. I already read your link. But my hc-sr04 was tested in fixed condition actually. If i'm wrong please correct me :(. From the graph, i tested within 7 cm range, but the results is terrible :( . Is it because my time.sleep (10ms) ? Btw ...
hi im a beginner in programming and currently working with hc-sr04 and raspberry pi.
I just wanna your opinion on how to filter the hc-sr04 result.
i wanna take its previous data if the present data is too impossible. What is the best algorithm? or do u hav any opinion?
... animate_begin_text to animate_end_text I'll update github tomorrow Ken Hi, I'm trying to achieve this: 1 Video start triggered by gpio in (hc-sr04 sensor) 2 When video starts a gpio out is sent to turn on lights 3 When video ends a gpio out is sent to turn off lights 1 and 2 work fine, 3 does ...
Hi, I'm trying to achieve this: 1 Video start triggered by gpio in (hc-sr04 sensor) 2 When video starts a gpio out is sent to turn on lights 3 When video ends a gpio out is sent to turn off lights 1 and 2 work fine, 3 does not work. I'm pretty sure pins configuration ...
That is an infinite loop although it will try printing the distance about 200 times a second which isn't going to happen so you may want to add a sleep after the print. Dave. thanks dave. I already put time.sleep(0.05) after print..but still it stop and give unstable reading. Thanks again for reply...
That is an infinite loop although it will try printing the distance about 200 times a second which isn't going to happen so you may want to add a sleep after the print.
hi, im just a noob in robotics. im doing a research on robotic and ultrasonic sensor. When using a hc-sr04 and connected to raspberry pi with 50ms and lower time.sleep, my data seems not very stable. I want to use an infinite loop for my sensor..but i dun know how to use it ...
hi, im a beginner i robotic and sensor. im doing a research on robotic and ultrasonic sensor. When using a hc-sr04 and connect to raspberry pi with 25ms time.sleep, my data seems not very stable. Is it ordinary case or it just an usual one? It's probably best to start a new thread ...
hi,
im a beginner i robotic and sensor.
im doing a research on robotic and ultrasonic sensor. When using a hc-sr04 and connect to raspberry pi with 25ms time.sleep, my data seems not very stable. Is it ordinary case or it just an usual one?
Hi Ame,
I thank you for this, i will dig this part, it can be interesting,
Anyway i thank you both of you, it's my first time in this forum and I feel really welcome .
Thank you so much
http://stackoverflow.com/questions/20107700/serial-receiving-from-arduino-to-raspberry-pi-with-pyserial-stops-after-a-while Ok, i thank you so much for your help, i wanted to use python and not the arduino language, and can i take a little bit of your time :mrgreen: ? How you send the result to the ...
Hi Joan,
I'm not very good in electronic and i don't want to burn my gpio. But i know that i have to jump more in electro if i want to go further in it, i will try this after buying some components.
... to the pi with serial ? Do you have a link on a tuto ? Thank you so much again. Alternatively you could ignore the Arduino and connect the HC-SR04 directly to the Pi. You'd need to voltage divide the 5V echo line to 3V3 to act as a Pi safe input. For that you'd need a couple of resistors. ...
Ok, i thank you so much for your help, i wanted to use python and not the arduino language, and can i take a little bit of your time ?
How you send the result to the pi with serial ? Do you have a link on a tuto ? Thank you so much again.
So I'm at home and tried some things ! put in a tight loop which prints the value of the echo pin I did this and my echo sending me 0 on a loop of 30. I tried to change the baudrate but it raise a "Serial Timeout!" So I think it's what you both said "latency" or "Turnaround" is not good for ultrason...
Do you know the turnaround time is between sending a message to the Arduino and receiving a response? I wonder if the echo is complete by the time it's being sampled.
OK, well it sounds like the hardware works. Perhaps there is too much latency between the pi and the arduino? After generating the trigger pulse I suggest you put in a tight loop which prints the value of the echo pin. If you never see a transition then it's possible that nanpy makes things too slow...
Morning Ame, Thanks for your answer, Yes I am using the Arduino for this. I tried directly with Arduino and it worked well. I tried with other Python modules, don't remember the name (something like Python-Arduino, or pyserial, don't remember, and i'm not at home to verify). And it worked but the mo...
Morning everyone, First of all sorry for my bad english . So I tried for hours the way to use my HC-SR04 with nanpy, but my script block when I want to read the echo return, and I really don't know why ! Here my code: ############################################################# ...