The two motor driver modules are connected to the reaper’s Socket 4 and Socket 12
I can indeed turn all 4 motors on with this function - however, two of the motors (R1 and R2, on socket 12) need to go in the reverse direction.
I can’t find any way to drive the motors in reverse. I’ve tried changing the “polarity” but it seems to have no effect. Duty cycle goes from 0 to 1, but it is always in one direction.
With gadgeteer, I was able to get the wheels going in either direction, but not with Tinyclr, so I’m not sure what the issue is.
Hmm. I have played with various frequencies, but I can try some different ones.
The duty cycle’s range is from 0.0 to 1.0 - I can successfully change the overall speed of each motor, from stopped to full speed. Setting it negative throws an exception. The only way I can see that you are supposed to use to get it to go the other direction (based on method and property names) is maybe setting the polarity to ActiveLow, as in
Does anyone know if that is the correct, intended approach?
This doesn’t really make sense to me - to me that would mean 0 was full speed and 1.0 was stopped - not reverse. In any case it isnt causing reverse motion.
Could it just be a TinyCLR bug that the Polarity value is not properly used? Or is there something obvious I am missing about how to specify speed in the opposite direction that I am not seeing?
These exact same motors have been used with these exact same motor control modules previously. In fact the only differences are a] Using a Fez Reaper now instead of a Raptor, and b] using TinyClr instead of Gadgeteer.
So it isnt the motors or the driver modules - it is either a] Im just doing something wrong (most likely) b] a bug in TinyCLR, I think.
It isn’t hardware unless there is an incompatibility between the reaper and the motor driver modules
Edit: The Polarity attribute is for what I thought it was - if you set the polarity to ActiveLow, then 0.0 is full speed and 1.0 is stopped. So that isnt what I needed.
There does not seem to be any way to specify reverse speed, like there was in .netmf/gadgeteer