Sunday, June 25, 2006
Got direction and speed going for the little yellow G4 motor...
I'm beginning to get the knack of writing hex code in Oshonsoft Basic. My code is still probably a LOT more awkward than it could be, but I'm getting the job done. :-D
Taking a cue from Simon's bipolar stepper programme I put a slider bar in my VB.NET serial comms programme to control speed and radio buttons to control direction.
The API for doing the job is extremely simpleminded and intended only for this bit of testing. What gets squirted out on the serial loop looks like...
{(direction, +/-)(speed, 0-255}
A typical command to tell the control board to rotate the G4 counterclockwise at a PWM setting of 200 would look like...
{-200}
The BASIC code to set direction and speed can be got from my personal server for anybody who's interested in looking at my retarded firmware programming style. :-)
If you want the VB.NET code let me know in the comments on this blog entry and I'll zip up a copy, put it on my server and post a link. I personally think that it's way too early for anybody to try emulating what I'm doing. It might not even be a good idea. :-s
Taking a cue from Simon's bipolar stepper programme I put a slider bar in my VB.NET serial comms programme to control speed and radio buttons to control direction.
The API for doing the job is extremely simpleminded and intended only for this bit of testing. What gets squirted out on the serial loop looks like...
{(direction, +/-)(speed, 0-255}
A typical command to tell the control board to rotate the G4 counterclockwise at a PWM setting of 200 would look like...
{-200}
The BASIC code to set direction and speed can be got from my personal server for anybody who's interested in looking at my retarded firmware programming style. :-)
If you want the VB.NET code let me know in the comments on this blog entry and I'll zip up a copy, put it on my server and post a link. I personally think that it's way too early for anybody to try emulating what I'm doing. It might not even be a good idea. :-s