View Single Post
  #3   Spotlight this post!  
Unread 16-02-2007, 13:22
Francis-134's Avatar
Francis-134 Francis-134 is offline
Lifer
FRC #0190 (Gompei and the Herd)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Worcester, MA
Posts: 598
Francis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond repute
Re: how to limit pwm on easyc

The easiest way would be to set up an if statement where if the motor value > 200, set the motor to 200. You would take the value from the joystick (use an OI to PWM block) and instead of setting it to a PWM port, set it to a variable. Then, with an if statement, limit the values to whatever range you want. Finally, send that variable to a setpwm block with that variable set as the speed.
__________________

Email | Twitter | Facebook | YouTube | Twitch
iTunes Podcast | Snapchat

A proud alumnus of teams 134 and 40 || Mentor of Team 190 || Director of Fun for BattleCry@WPI