![]() |
not quite sure...speed controller...spike.
ok, we just got back a couple days ago from Detroit Regional and now I have couple questions.
1. is it necassary to use a speed controller on ALL motors, or can i (legally) use a spike for the window motor? 2. if i have to use a speed controller, then what (for example) would i do to make a motor used to power a wench as far as coding goes? (ie, if i wanted to use the p2_sw_aux1 to retract the wench, would i say: Code:
if(p2_sw_aux1 == 1)3. can anyone help out. sorry if this post sounds jumbled, im kind of in a hurry. any help would be thanked greatly. |
Re: not quite sure...speed controller...spike.
This may or may not be related, but i have found that lots of joystick buttons seem to flicker IE not giving a constant stream of 1's when they are being pressed. Our code now checks the button over the period of 3 or 4 frames to make sure its really pressed. This is probably a good idea for a winch button anyway, you wouldnt want it accidentally pressed.
|
Re: not quite sure...speed controller...spike.
Quote:
Quote:
Quote:
|
Re: not quite sure...speed controller...spike.
255 is not a valid output for pwms (victors) - it can make the communcation between your code and the layer above it lose synch
254 is the max you should ever output that might be why your victor wacked out or it could be it wasnt calibrated correctly - if you are certain you are sending it 127 and the motor is still trying to move, then it either needs to be recalibrated, or its not working correctly. to answer your original question, it says in the robot section of the manual which motors you can use with spikes - Im almost certain a window motor would be ok. |
Re: not quite sure...speed controller...spike.
Quote:
Its called 'switch bounce' - when you close a switch or pushbutton it takes about a 1/10th of a second for it to make solid contact - the surfaces actually do bounce a tiny bit - so if a fast microprocessor is polling the switch it will see it go 00001101010011110111111011111111111 and your timing is right - 3 frames is about a 100 mS nice catch! |
Re: not quite sure...speed controller...spike.
I will add that, in our code we had values of 255 being output and weird things were happening. I chnaged it after I saw something on here and the problem went away. At the same time I also changed something else, so it may be a coincidence though. :)
|
Re: not quite sure...speed controller...spike.
We had our winch motor controled by a spike. At the AZ regional inspection they told us all moters MUST be controlled by a controler, not a spike. We swapped them out and we use code like yours, except our max was 254.
|
Re: not quite sure...speed controller...spike.
Quote:
--EDIT-- Maybe they mean't all the motors on you robot. :) |
Re: not quite sure...speed controller...spike.
ok, i guess then we'll stick with a controller. sorry about the code i posted above. i ALWAYS forget to place those semi-colons there, then when i try to build the code, it fails and i instantaniously know what happened. i should really get some help for that problem (anyone want to start a support group...lol). ok, i'll try to make those changes when we get to canada. man i wish i was a real programmer...lol. thanks people! :)
|
| All times are GMT -5. The time now is 11:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi