Go to Post There are NO old, bold electrical engineers! - Al Skierkiewicz [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-01-2006, 06:34
winners winners is offline
Registered User
no team
 
Join Date: Jan 2006
Location: Nazareth
Posts: 22
winners is an unknown quantity at this point
Ultrasonic Sensor

Dear sir/madam,

Where can I find, please, some open sample codes for programming the vex ultrasonic sensor as for easyC?

I'd appreciate any help given.

Thanks in advance!
  #2   Spotlight this post!  
Unread 02-01-2006, 11:20
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Ultrasonic Sensor

Quote:
Originally Posted by winners
Dear sir/madam,

Where can I find, please, some open sample codes for programming the vex ultrasonic sensor as for easyC?

I'd appreciate any help given.

Thanks in advance!
Welcome to Chief Delphi Forums!

The test code for all of the Vex sensors (including the ultrasonic sensor) for EasyC is located by default in the following directory when EasyC is installed.

C:\Program Files\Intelitek\easyC\Projects\Test Code

Inside this folder should be a file named ULTRASONICTEST.ECP. This file contains the sample code used to run the Ultrasonic sensor. Here is basically what is contained in that file:
Code:
#include "UserAPI.h"

int ultrasonic; 

void main ( void )
{
      //Connect Input Wire to Digital Output 11
      //Connect Output wire to Interrupt 1
      //Near = 2, Far = 100
      StartUltrasonic ( 1 , 11 ) ; // interrupt 1= output label on sensor, DO11=input label on sensor
      while ( 1 )
      {
            ultrasonic = GetUltrasonic ( 1 , 11 ) ;
            PrintToScreen ( "ultrasonic =%d\n" , (int)ultrasonic ) ;
      }
}
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
  #3   Spotlight this post!  
Unread 02-01-2006, 15:31
winners winners is offline
Registered User
no team
 
Join Date: Jan 2006
Location: Nazareth
Posts: 22
winners is an unknown quantity at this point
Re: Ultrasonic Sensor

Even though I already found the sample, Thanks for your support!
  #4   Spotlight this post!  
Unread 02-01-2006, 20:55
KINGOFCLUBS454's Avatar
KINGOFCLUBS454 KINGOFCLUBS454 is offline
Creamer Connoisseur
AKA: Andrew
FRC #0357 (Royal Assault) VRC #KTOR (Knights of the Olde Robotics)
Team Role: College Student
 
Join Date: May 2004
Rookie Year: 2004
Location: Upper Darby
Posts: 34
KINGOFCLUBS454 has a spectacular aura aboutKINGOFCLUBS454 has a spectacular aura aboutKINGOFCLUBS454 has a spectacular aura about
Send a message via AIM to KINGOFCLUBS454
Re: Ultrasonic Sensor

Hmmm...If you gave an idea of what you are looking fro it to do I could whip you up a quick sample of it...If none of the other guys on here beat me to it
__________________
PATENTed
VRCC KTOR - Captain
FRC357 - Alumni
FRC2023, FTC508 - Mentor
FLL5297 -Mentor
Closed Thread


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
Using and Coding an ultrasonic sensor Jaine Perotti General Forum 14 06-08-2004 14:13
Making a Sensor Board SpaceOsc Technical Discussion 11 15-05-2004 12:46
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Banner Sensor Programming Problem 2Crisis Programming 4 24-02-2004 13:40
Quick Optical Sensor Question zorro Technical Discussion 10 21-01-2003 06:39


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

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