Thread: Code error?
View Single Post
  #1   Spotlight this post!  
Unread 12-02-2008, 21:58
niagra127 niagra127 is offline
Registered User
FRC #1785
 
Join Date: Jan 2008
Location: Missouri
Posts: 6
niagra127 is an unknown quantity at this point
Code error?

Alright our team has been trying to run a motor through a pwm with the buttons on the joystick.

Code:
if (p1_sw_aux1 = 1 && p1_sw_aux2 = 0)
	{
		pwm10 = 255
	}
else if (p1_sw_aux1 = 0 && p1_sw_aux2 = 1)
	{
		pwm10 = 0
	}
else
	{
		pwm10 = 127
	}
This returned nothing on the motor and we are positive the motor runs.
We also tried just using pwm10 = 255 to see if anything would happen and we got absolutely nothing in return. The motor just constantly sits there, we think its an electrical problem but we are still getting told its a programming error. If this is true can anyone tell us what it is we are doing wrong?