Go to Post Life is not about avoiding risk, but managing it. - dtengineering [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 10-12-2014, 17:58
Axaileyer Axaileyer is offline
Registered User
FRC #4110
 
Join Date: Dec 2014
Location: Brookings, OR
Posts: 1
Axaileyer is an unknown quantity at this point
Question How to program Sonar

Hey there ChiefDelphi, first post. Our team is trying to make a simple code that will turn our robot when it has a value of less than 10 inches. Anybody know how to (or a link to) coding sonar? first year team btw
Reply With Quote
  #2   Spotlight this post!  
Unread 11-12-2014, 08:16
TylerStaudigel's Avatar
TylerStaudigel TylerStaudigel is offline
Registered User
FRC #0144 (R.O.C.K)
Team Role: Programmer
 
Join Date: Dec 2013
Rookie Year: 2014
Location: United States
Posts: 39
TylerStaudigel is an unknown quantity at this point
Re: How to program Sonar

What program are you using to code your robot?
Reply With Quote
  #3   Spotlight this post!  
Unread 11-12-2014, 10:14
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: How to program Sonar

This is the LabVIEW subforum.

It depends on what sensor you are using and which input-analog, I2C, SPI, etc.

In general, you will measure the value returned by the sensor for 10 inches, then use a case statement that:
  1. Drives the motors forward while the value is greater than 10 inches
  2. Reverses the motor on one side when the value is 10 inches or less
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 07-01-2015, 10:05
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 221
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: How to program Sonar

http://imgur.com/A14Tgq0
This is always the code my team has used in order to get inches out of sonar, this is just off of memory.
If I remember correctly the sonar is wired for 12C
Reply With Quote
  #5   Spotlight this post!  
Unread 07-01-2015, 10:12
TylerStaudigel's Avatar
TylerStaudigel TylerStaudigel is offline
Registered User
FRC #0144 (R.O.C.K)
Team Role: Programmer
 
Join Date: Dec 2013
Rookie Year: 2014
Location: United States
Posts: 39
TylerStaudigel is an unknown quantity at this point
Re: How to program Sonar

Check out the examples under the help tab. They show you how to execute almost every function you could need on your robot ranging from drives to vision and sonar. All you need to do to use them is to drag and drop the vi after you open the example.
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:58.

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