Go to Post My teams robots have been good, bad and ugly BUT they were all beautiful because they were there. - JohnBoucher [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-03-2014, 22:44
slhs slhs is offline
Registered User
FRC #4639
 
Join Date: Feb 2014
Location: Katy, Texas
Posts: 17
slhs is an unknown quantity at this point
Auto Ultrasonic Distance Sensor

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.
Attached Thumbnails
Click image for larger version

Name:	Auto.PNG
Views:	67
Size:	17.1 KB
ID:	16738  Click image for larger version

Name:	Begin.PNG
Views:	50
Size:	8.7 KB
ID:	16739  
Reply With Quote
  #2   Spotlight this post!  
Unread 31-03-2014, 22:52
Kevin Phan's Avatar
Kevin Phan Kevin Phan is offline
College Student
FRC #0357 (Royal Assault)
Team Role: Alumni
 
Join Date: Apr 2013
Rookie Year: 2010
Location: PA, United States
Posts: 95
Kevin Phan will become famous soon enoughKevin Phan will become famous soon enough
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.
__________________
VEX & FRC Student Team Member #357 Royal Assault 2010-2014 "Dare Mighty Things"
2014-2019 Attending Drexel University Major:Electrical Enginnering
Reply With Quote
  #3   Spotlight this post!  
Unread 31-03-2014, 22:57
slhs slhs is offline
Registered User
FRC #4639
 
Join Date: Feb 2014
Location: Katy, Texas
Posts: 17
slhs is an unknown quantity at this point
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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