View Single Post
  #4   Spotlight this post!  
Unread 26-02-2007, 18:33
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Lowering the voltage on a spike

Quote:
Originally Posted by Mr. E View Post
how about something like this...

if button is pushed( relay 1 fwd)
( pwm01 = 155 //turn slow)


What would this code actually look like?

The problem is that using a spike makes writing my code alot easier. Wiring the motor through a victor, (which we have already done) is possible but not now
As was mentioned above, the Spikes are relays and only exhibit forward/off/reverse functionality. There is no slow speed. It's all or nothing. If you want a slower speed, you either need to change your gearing (probably not an option) or use a Victor to variably control your speed.

I don't understand your comment about the code being harder. It is essentially the same code, just on a different port (pwm vs relay).

For a relay, you probably have
Code:
relay1_fwd = 1;
whereas for a speed controller you would have what meatmanek suggested.
Code:
pwm01 = DRIVE_SLOW_FWD;
If you could clarify what you think would be harder, we may be able to offer up some better suggestions.