Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Auto Ultrasonic Distance Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=128408)

slhs 31-03-2014 22:44

Auto Ultrasonic Distance Sensor
 
2 Attachment(s)
So we are trying to code the robot to do forward from its starting position till it reaches a specific distance from the wall. We are using a MB1040 as the distance sensor. The code, which is attached, for some reason just makes the robot keep going forever forward. The sensor has been tested and it works perfectly. I'm sure I'm probably just missing something really stupid :(. Any help would be much appreciated.

Kevin Phan 31-03-2014 22:52

Re: Auto Ultrasonic Distance Sensor
 
You need a stop for the drive. If you just write a -1 value to the drive it will continue to drive.

slhs 31-03-2014 22:57

Re: Auto Ultrasonic Distance Sensor
 
Oh wow. I did that for the launcher motors but didn't do it for the driving ones. Ok thanks! Easy fix :)


All times are GMT -5. The time now is 08:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi