Go to Post The 2008 team is not the 2007 team and won't be the 2009 team. Every year is a new year and a new opportunity for growth and development as a FIRST team. It's very cool. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 28-01-2008, 22:43
nekng's Avatar
nekng nekng is offline
Former 1836 Captain
AKA: Nate
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Aug 2006
Rookie Year: 2007
Location: Los Angeles
Posts: 43
nekng is on a distinguished road
Ultrasonic Range Finder

My team recently bought these ultrasonic range finders. We are having a few problems wiring and programming them.

Attched is a diagram that shows how we wired them.
To program them we used:
Code:
	if (run_count<2){
		rc_dig_out13 = 1;
	} else if(run_count >= 40){
 		rc_dig_out13 = 0;
		run_count =0;
		Get_Encoder_1_persec = Get_Encoder_1_Count() - last_count;
		last_count = Get_Encoder_1_Count();
		//printf("Sensor: %d \r", (int)Get_Encoder_1_persec);
	
	}
	printf("Sensor: %d \r", Get_Analog_Value(rc_ana_in01));
	run_count++;
However when it outputs all we get is the number 11. Does anyone know what is wrong?
Attached Thumbnails
Click image for larger version

Name:	Sensor.jpg
Views:	108
Size:	60.8 KB
ID:	6166  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ultrasonic range sensors for Vex Robot OneCoolDude Programming 1 01-12-2007 09:22
Ultrasonic will not work with another Ultrasonic plz help Jackel148 Programming 10 10-05-2006 15:31
Using VEX range finder on the full-size FRC CronosPrime1 Programming 3 08-02-2006 23:29
Ultrasonic Range Finder polyBot Control System 15 29-01-2006 12:46
Wanted! Dew Reward for Finder! JVN General Forum 11 16-04-2003 13:41


All times are GMT -5. The time now is 10:04.

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