Go to Post Having someone with as much mainstream appeal as will.i.am is a great strategy to draw large amounts of attention to a program that has been relatively hidden to the masses. - Karthik [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
  #4   Spotlight this post!  
Unread 06-12-2007, 12:54
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: EasyC Vex Programming help in RC Mode

If your mechanism does not need a lot of power (see Mike's post), then you can limit the speed in software. First you would map the Rx Input to a variable. Since the values coming back from the transmitter range from 0 to 255, with 127 neutral, we subtract 127 so our values are now centered around 0. (Don't declare your variable as an unsigned char, use int here!)

The next step is to multiply our new value times a coefficient between 0 and 1. But since the controller only likes to play well with integers, if we want the motor to only go 60% of max speed, we can multiply ourVariable = ourVariable * 6 / 10; with replacing ourVariable with whatever you declared your variable as.

Then we add 127 back into this, and set this value to the motors. By adjusting the coefficient, you can narrow down or widen how much available speed you want to send to a motor.
__________________
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

世上无难事,只怕有心人.
 


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
Programming help. EasyC Vex Robot. OneCoolDude Programming 2 02-12-2007 17:54
Need help with ramping in VEX EasyC T. Maty Programming 4 03-11-2006 12:17
Arrays in Vex Programming Kit EasyC? gblake FIRST Tech Challenge 9 12-09-2006 17:05
EasyC-Vex Rx/motor frustrations- please help! Steve0100 Programming 10 08-07-2006 02:18
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 00:24.

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