News for hackers. Stuff that matters.
Re:The software fixed the hardware by djcapelis on Monday January 04, 2010 @08:53PM (#1031653)
Well, the values actually sent out to the PWM were backwards. Thankfully I could just invert it at the last step in the code where it got sent and so while writing the actual code I could pretend everything was correct. It's hard to think of -127 going forward and 127 going backwards as anything but a dirty hack.

While the underlying electronics thankfully didn't care, the digitized values set up certain expectations.

Re:The software fixed the hardware by HeyLaughingBoy on Tuesday January 05, 2010 @05:13PM (#1033537)
Typically I get around this by having each motor's direction defined separately. Since you very often need to define the logic of a sensor ('1' can mean either ON or OFF depending on the sensor type) on a sensor-by-sensor basis, it makes sense to do this for motors as well.