Go to Post I thanked the tradesmen on our team the same way i do ever year with a handshake and a "thanks for helping us guys", - Mike Schroeder [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-06-2005, 13:33
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
Vex Programming

well, I got my programming kit and i had a little fun turning on leds. i've been working on controlling them with a joystick on the remote using the hardware pwm available on the first four motor connectors. and i've just ordered a couple of sharp gp2d12 ir distance sensors so maybe i can get it to stop before it runs into the cat.

i was wondering if anyone else has been doing any coding for the vex. anyone have any observations, questions, secrets to share?

the sample code at vexlabs seems to be pretty clear. i've managed to dope out where most everything connects from the header files and have made a little table which can be seen at theEntropyWorks.com. motors 1-4 as i mentioned are connected to 4 of the 5 hardware pwm modules on the 18f8520 in case anyone wants to try to control a real dc motor through an h-bridge.

the vex motors run at a very low frequency with a period of 18ms and a duty cycle of 1-2ms, like hobby servos. this is too slow for the hardware pwm.

better hit send, here, before my session times out and i have to type everything over, again.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-06-2005, 22:12
John Wanninger's Avatar
John Wanninger John Wanninger is offline
Registered User
FRC #1732 (Hilltoppers)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2001
Location: Milwaukee, WI
Posts: 142
John Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond reputeJohn Wanninger has a reputation beyond repute
Re: Vex Programming

I finally got a little time to play a bit. I added some code in the default routine to limit the ramping of a motor command in response to the joystick, sort of a soft start. I'm really new at this, just dabbling to get used to the language and the environment.

I'm guessing the PWM frequency, being so low, probably helps cut stiction in startup, possibly helpful for smooth starts.
__________________

"A hundred times every day I remind myself that my inner and outer life are based on the labors of other men, living and dead, and that I must exert myself in order to give in the same measure as I have received and am still receiving..."
--Albert Einstein

2001: FLL852 |2002: FLL20/FLL21 |2003: FLL23/FLL25 |2004: FLL14/FLL16 |2005: FVC22/FLL124 |2006: FLL3/FLL2986/FVC22/FRC1732 |2007:FLL3/FLL34/FLL56/FRC1732
2008: FLL3/FLL18/FRC1732 |2009: FLL101/FLL8963/FRC1732 ...(etc.!)
Reply With Quote
  #3   Spotlight this post!  
Unread 21-06-2005, 22:34
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,356
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Vex Programming

I have written a position control PID function using a pot for feedback. It models almost exactly what we will be using in FRC. Currently I am modifying the function to work with as many axis's as needed without having to duplicate the section of code for each axis. Just pass the arguments to it for each PWM you want to control. I've included a flag to indicate when the damping feature kicks in, more to prove it works than anything else.
Reply With Quote
  #4   Spotlight this post!  
Unread 24-06-2005, 01:09
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 Programming

here's the code for my Mobile Remote Controlled Light Dimmer, project MoReCoLD. does nothing useful, but got me up to speed on hardware pwm on the pic. when my gp2d12's come in i figure i can use this for a visual indicator of what the sensors are seeing.
Attached Files
File Type: c user_routines.c (9.3 KB, 111 views)
Reply With Quote
Reply


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
how to build a VEX programming module bblack7489 FIRST Tech Challenge 78 09-06-2011 16:03
VEX programming Gene F Programming 14 08-08-2006 22:21
Programming for Vex robots Jeff K. Programming 4 13-11-2005 16:40
Vex bot programming Q's BaldwinNYRookie Programming 6 09-10-2005 17:45
White Paper Discuss: VEX / intelitek easyC programming document dez250 Extra Discussion 3 15-09-2005 15:20


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

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