View Single Post
  #25   Spotlight this post!  
Unread 02-05-2008, 19:27
Generalx5's Avatar
Generalx5 Generalx5 is offline
Hard Core Inventor
AKA: Jun(John) Zheng
FRC #1346 (Trobotics)
Team Role: Student
 
Join Date: Nov 2005
Rookie Year: 2004
Location: CANADA
Posts: 94
Generalx5 will become famous soon enough
Re: Need help with PWM 1-2ms pulse control

Oh wow!

Sorry guys, I've somewhat impatient, I've took the time to test this code with a #define.

#define Let_go P1 = ((long) Get_Analog_Value(rc_ana_in01) * ( 127 / 1023) + 127)

in this case, I defined Let_go to represent the P1 which is the pwm01. And everytime Let_go is called upon, the pwm output would correspond to the potentiometer that i am adjusting. Hahah this is so cool to see programming language turning into physical movement. Wonderful...