ultrasonic and servomotor

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

kalmar79
Posts: 45
Joined: Sun Aug 20, 2017 8:18 pm
Been thanked: 4 times
Contact:

ultrasonic and servomotor

Postby kalmar79 » Wed Jun 06, 2018 12:29 am

Hello friends, I trying to do a flowchart with ultrasonic sensor and servomotor. But I don't know if is good my flowchart. I am working with arduino uno.
Attachments
ultra-servo_1.fcfx
(8.27 KiB) Downloaded 102 times
20180604_224100.jpg
20180604_224100.jpg (128.19 KiB) Viewed 1891 times
20180604_224054.jpg
20180604_224054.jpg (137.9 KiB) Viewed 1891 times
These users thanked the author kalmar79 for the post:
celebriums (Mon Jun 11, 2018 7:44 pm)
Rating: 5%
 

kalmar79
Posts: 45
Joined: Sun Aug 20, 2017 8:18 pm
Been thanked: 4 times
Contact:

Re: ultrasonic and servomotor

Postby kalmar79 » Wed Jun 06, 2018 12:40 am

I am using a hc-sr04 and a SG90 servomotor.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8604
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2476 times
Been thanked: 3558 times
Contact:

Re: ultrasonic and servomotor

Postby medelec35 » Wed Jun 06, 2018 7:53 am

Hi kalmar79,
No you have not set servo up correctly.
Servo_Controller channel is relating to how many servos you have in total.
E.g if you only have 1 servo then since channel starts at 0 you must use 0 for channel value.
If you are controlling 2 servos in total then use channel 0 for servo 1 and channel 1 for servo 2 etc.

Martin
These users thanked the author medelec35 for the post:
Benj (Wed Jun 06, 2018 3:22 pm)
Rating: 5%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

kalmar79
Posts: 45
Joined: Sun Aug 20, 2017 8:18 pm
Been thanked: 4 times
Contact:

Re: ultrasonic and servomotor

Postby kalmar79 » Sat Jun 09, 2018 6:09 am

Thanks Martin, maybe tomorrow I check the flowchart again.