Go Down

Topic: sensor issue (Read 806 times) previous topic - next topic

Pritom9900

Mar 25, 2020, 06:44 pm Last Edit: Mar 25, 2020, 06:51 pm by Pritom9900
                                            obstacle avoiding car
I am not understanding the calculation of time of HCR04 ultrasonic sensor in this code.Besides, when i am changing time of DC motors(mainly backward or forward function), the time is changing proportionally.But I need to get signals of ultrasonic sensor more frequently. And this code is very nice without servo motors but mostly useless with the servos.Please help me with this code.(The first one for l298n motor driver shield and the second for l293d motor driver shield).

ballscrewbob

TOPIC SPLIT
DO NOT HIJACK / NECRO POST !


Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

slipstick

The two codes are very different. Which do you want to use?

Why do you want to read the ultrasonic sensor more often? What are you going to do with the extra reads?

Anyway if that's what you really want you will need to get rid of all those delay()s. Have a look at millis() timing instead.

Steve

Go Up