|
|
Serial port access...
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2001
Status:
Offline
|
|
Salut everyone,
I really, really want to play with motor control and other such hardware using my Powerbook; however, I'm finding it nigh on impossible to figure out how to go about doing it. I'll obviously need a keyspan serial adapter, but from the software/programming end of things I have no idea where to get started. I've looked through the IOKit documentation, and from what little of it I can understand, I've gathered that the simple act of turning on an LED through the serial port is not so simple. While having a protected kernel space is wonderful, I do envy the VB guys who can just open a serial port. Anybody have any ideas on what direction I should be going in to try to gain serial port control? It's my understanding that realbasic will do serial stuff. I know it doesn't enforce good coding habits, but the IOkit seems like overkill for what I want to do.
Cheers,
Kevin
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by tennesseekevin:
Anybody have any ideas on what direction I should be going in to try to gain serial port control?
Look at a program called MacWise ( www.carnation-software.com). I'm not saying this is the best solution since I'm not very experienced with controlling serial ports, but running a program like this is the only way I know of to get easy serial port communications.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Aug 2000
Location: Montreal, QC, Canada
Status:
Offline
|
|
Checkout http://www.harmless.de/cocoa.html
He has some serial port classes which are quite easy to use and they are freely available. I've added them to my application without having to spend anytime in the IOKit.
Can I ask how you are driving the motors from the serial port? Direct or do you have a controller of some sort?
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status:
Offline
|
|
Er. I had to do this a while back. Gotta dive into the IOKit and termios stuff. Ick. Termios was the painful part. The IOKit wasn't so bad, actually.
I was getting *paid* to do it, of course, so that was a good motivator. If you can find a library or framework that does what you need, go for it.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2001
Status:
Offline
|
|
With a Google search for Keyspan (the serial adapter I'm using) and termios I came across a posting to pyserial. It's a python extension that provides access to posix commands. If anyone is interested in relatively easy, free port control, check out pyserial.
In regards to Octo's question about control of the motors, I'll probably use an integrated H-bridge to actually power the motors and send the H-bridge the signals from the port.
Cheers,
Kevin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|