Hello,
I'm having some troubles with programming a distance sensor and a servo.
The servo needs to turn 90 degrees when there's an object within 10 cm in front of the sensor.
Can anyone help me?
Problems with HC SR04 and servo
Moderator: Benj
-
- Posts: 1
- Joined: Mon Jan 07, 2019 3:43 pm
- Contact:
-
- Posts: 342
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 43 times
- Been thanked: 60 times
- Contact:
Re: Problems with HC SR04 and servo
Hello
To pass the 1st loop (in the Main loop) you need to create a simulating the HC-SR04 B6 input - in your situation it will be switch component.
To pass the 1st loop (in the Main loop) you need to create a simulating the HC-SR04 B6 input - in your situation it will be switch component.
- Attachments
-
- echo_loop-1.jpg (48.53 KiB) Viewed 2122 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Problems with HC SR04 and servo
Hi B electron,
The forum rules here state:
It looks like you are basing your flowchart on mine, but the delays are the wrong values.
Here are the flowcharts side by side:
The forum rules here state:
I will move the topic to V8 section as that is what I'm assuming you are using?5. The “Tips and Tricks” sub forum is for sharing your knowledge and NOT for starting off with asking questions.
It looks like you are basing your flowchart on mine, but the delays are the wrong values.
Here are the flowcharts side by side:
Martin