CMP09 compass module via Software Serial ???

Hi all,

I am trying to talk to a CMP09 compass module via Software Serial. The technical guide suggests that I need 9600 bps (no parity, 2 stop bits)

http://www.robot-electronics.co.uk/htm/cmps09ser.htm

Not sure how to set this up. Could anybody give me a little example?

Thanks very much
Christian

first use NewSoftSerial instead of Software Serial, it is better. Both don't support the setting of the nr of stopbits.

HOwever, As you have the code you can tweak the libs to do so (not trivial)

Thanks robtillaart about the NewSoftSerial heads up
but could someone help me with the 9600 bps (no parity, 2 stop bits)??

Thanks Christian

As the instructions state you send single byte commands to the compass with a suggested delay of 100ms between command byte values, that would more then satisfy the two stop bit requirement, as the idle serial state is at the same voltage output level as a stop bit (HIGH), so I don't think there is any value or chance of improvement possible by trying to change the library to use 2 stop bits.

Lefty

Thanks for your help everybody!

I managed to get robot-electronics to put an example up on their site, which shows how to do it:

http://www.robot-electronics.co.uk/htm/arduino_examples.htm#CMPS10%20serial

thanks everyone!

best
Christian

And.... does it work?