|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Deventeh Digatal - CMPS03 - Robot Compass Module
I am in desperate need of help, I have been trying to integrate this compass for a while now with out any luck. At first we used interrupt code to read it, but the RC loop was too slow and did not give a accurate reading.
The compass has two interfaces, I2C, PWM. The PWM method is the one that did not work. Now since the RC is not compatible with I2C we bought a converter, it converts I2C to RS232. That means we have to connect it though the TLL port. But I have not experience with programming that port. Can anyone help me out. Anyone? Thank You! |
|
#2
|
||||
|
||||
|
Re: Deventeh Digatal - CMPS03 - Robot Compass Module
Quote:
You may want to consider converting the PWM signal to an analog 0-5 Volt signal using something like this and then putting it into the analog in ports on the RC. |
|
#3
|
|||||
|
|||||
|
Re: Deventeh Digatal - CMPS03 - Robot Compass Module
Quote:
Quote:
|
|
#4
|
|||
|
|||
|
Re: Deventeh Digatal - CMPS03 - Robot Compass Module
Hello,
first, start by using Kevin's implementation of the serial drivers. you can download that at http://www.kevin.org/frc/frc_serial_ports.zip You can then use the Read_Serial_Port and Write_Serial_Port functions to asynchronously send and receive bytes to either serial port. Check in the documentation for the converter and the documentation for the compass to find out what bytes to send. If you are still using the emicros device, the documentation is at http://www.emicros.com/useri2c.zip and explains what you need to send to the converter to send a message over the I2C bus. It has complete examples that show exactly what you need to do. Good luck, ~Phil |
|
#5
|
||||
|
||||
|
Re: Deventeh Digatal - CMPS03 - Robot Compass Module
Quote:
I am not sure if you are using it for FIRST but be warned computers and other large metal objects will severely effect the heading of the compass. I am using one for a project for one of my classes, in the room where we have class the magnetic field varies so much that when the car with the compass is told to drive in a straight line you end up driving in a wave like shape. However in better settings (in this case a huge gymnasium) we use the compass with the same control algorithms on a blimp and get much better results. |
|
#6
|
||||
|
||||
|
Re: Deventeh Digatal - CMPS03 - Robot Compass Module
Hi John,
I already posted some code and instructions to help you out in another thread: http://www.chiefdelphi.com/forums/sh...9&postcount=15 It'd be nice to hear one way or another if this worked out for you. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming a Devantech Magnetic Compass - CMPS03 | kE7JLM | Programming | 7 | 28-09-2007 08:23 |
| Interfacing a digital compass with the RC | Kelly | Electrical | 14 | 27-09-2007 19:01 |
| I2C Digital Compass Programming | CyberWolf_22 | Programming | 7 | 03-01-2005 00:20 |
| Political Compass | Joshua May | Chit-Chat | 11 | 01-10-2004 22:32 |
| Compass/direction sensor | Frank(Aflak) | Technical Discussion | 10 | 06-04-2003 09:18 |