Controlling Mini Maestro 12-Channel from C

Hello,

I want to control some servos using Mini Maestro 12-Channel from a C-program.
I also want to read from an analogue sensor.

Does there exist any sample code to start with ?

Best

Haavard Holm

I’ve just started into the maestro serial communication myself, so I can give you my point of view. There are a few different ways to communicate by serial, so if you want an example you’ll need to give your OS and some other info. In windows you can communicate by using a comm handle with WriteFile/ReadFile, which became very messy very quickly when I tried it. I ended up moving to the SerialPort class that’s a part of visual studio c++ 2010 express, and would definitely suggest it over the older way of using WriteFile and ReadFile.

Hello,

If you know how to write to a serial port in C, then all you should need to know is the protocol information given in the User’s Guide. If not, you should start by learning how to use your serial port independent of the Maestro. For example, you could disconnect the Maestro, connect your RX to TX, and see whether you can read the bytes that you write out.

Google can probably help you find a good tutorial. For example, searching for “linux serial port C” returns a bunch of useful example programs that you could learn from, if you happen to be using linux.

-Paul

What type of device will be running your C program?

–David