Go to Post I see you've one-upped me in the stripped gear game. I commend you. - frcguy [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
  #1   Spotlight this post!  
Unread 29-05-2006, 09:45
tacman1123 tacman1123 is offline
Registered User
AKA: Tac Tacelosky
FRC #1900
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Washington, DC
Posts: 17
tacman1123 is an unknown quantity at this point
Send a message via AIM to tacman1123
Vex Library and Sample Code

I'm not an experienced C programmer, but have enough programming experience to make significant changes to a working program or library. I've been using EasyC, and finally got MPLab working, with the EasyC library and also with the VexCode library.

Is there something in between -- a simplified but open source library? For example, I want to make a fairly small change -- the Arcade2() function in EasyC sets the RC to an arcade-style controller, and maps the controller to a motors in a particular direction. I need to dampen the output, and limit it, so that the extremes of the joystick are not 0 and 255 but rather 100 and 150. I can't see where to modify the code to do this (obviously, I can't modify the EasyC). I've poked around the VexCode c and can't find where the RC is read, but even if I could, it appears that so much of the code is very low-level.

What I'm really looking for is a library (like the EasyC library, but with source code) that I can modify. Also, a set of high-level calls (reading a switch value, or setting a motor) using the VexCode, rather than EasyC, library would be helpful.

Right now, it appears that my choices are very high-level, limited functionality with EasyC, or low level bit manipulation, PWM and lots of hex values. Is there a way to say
Code:
   if (get_input(1) == 0) { // limit switch pressed
      set_motor(1, motor_speed);
   }
without having to write get_input() and set_motor(), but with the ability to modify them?

Thanks!

Tac
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