Go to Post Let's not complain when we are getting magnificent items in the kit that teams just a few years ago could only wish for. - sanddrag [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 29-05-2006, 22:50
foobert foobert is offline
Registered User
no team
 
Join Date: May 2005
Location: oakland, ca
Posts: 87
foobert is a jewel in the roughfoobert is a jewel in the roughfoobert is a jewel in the rough
Re: Vex Library and Sample Code

Quote:
Originally Posted by tacman1123
I'm hoping I'm missing something really obvious. I've looked though the ifi_*.c files, and the .h files, and everything is very low-level. I was using get_input(1) as an example, but I don't believe there is a get_input function. Is there one? If so, where is it?

Is there sample code somewhere that turns two motors on and goes for 5 seconds, or reads a switch (or even better, the remote control unit)? Right now, it looks like if you want to simply go forward for 5 seconds, you have immerse yourself in hundreds of lines of code. Again, I keep hoping there's some high-level function calls documented somewhere that I just can't see (again, beside the ones in EasyC).


Tac
oops. sorry, thought you were maybe talking about some existing easyC code about which i know nothing.

to test for a limit switch closed on pin 1 in the analog/digital section of the rc and then send the damped signal from channel 1 of the radio to a motor connected to motor port 1 on the rc, use

if (rc_dig_in01 == 0)
pwm01 = pwm_in1 / 5 + 100;

the names used are all defined in ifi_aliases.h. the code would probably go into user_routines.c which runs every 18.5 ms.
Reply With Quote
 


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
Vex Sensor Sample Code nonother FIRST Tech Challenge 2 08-05-2006 16:49
Is there a sample code? The Stargazer Programming 3 17-02-2005 19:22
sample limit switch code??? tml240 Programming 5 17-02-2004 17:13
Sample Code (Line travel) cgav Programming 1 21-01-2004 09:37
ADC problems with C library and new code Larry Barello Programming 1 09-01-2004 22:31


All times are GMT -5. The time now is 12:40.

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