Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   How to program Sonar (http://www.chiefdelphi.com/forums/showthread.php?t=131454)

Axaileyer 10-12-2014 17:58

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

TylerStaudigel 11-12-2014 08:16

Re: How to program Sonar
 
What program are you using to code your robot?

Mark McLeod 11-12-2014 10:14

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

Skyehawk 07-01-2015 10:05

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

TylerStaudigel 07-01-2015 10:12

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.


All times are GMT -5. The time now is 06:34.

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