|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
I2C Digital Compass Programming
I was looking around Newark InOne and found a digital compass.
I read the data sheet and it looks like it will interface nicely with are Robot Controller. My only problem is going to be figuring out how to program the I2C interface. I have read the PIC datasheet on using the I2C interface but I have not been able to get a good grasp on how I would go about programming it. Does anyone have any examples of programming this sensor or setting up an I2C interface in general? |
|
#2
|
||||
|
||||
|
Re: I2C Digital Compass Programming
Well you are in luck. There is a prewritten library of I2C functions that comes with the compiler. They are documented in the following link:
http://ww1.microchip.com/downloads/e...ies_51297d.pdf Also, source code for all of these functions can be found in the C18 install directory assuming you selected it when you installed C18. |
|
#3
|
|||||
|
|||||
|
Re: I2C Digital Compass Programming
Compass you say?
http://www.chiefdelphi.com/forums/sh...94&postcount=5 We tried that a few years back. Look for mention of the I.D.A.N. system. |
|
#4
|
|||
|
|||
|
Re: I2C Digital Compass Programming
Note the accuracy in the data sheet. Don't confuse resolution and accuracy. I've been playing with a PNI compass board. I I've got it working to with in 1deg accuracy. However to get this accuracy the are only 2 readings per second. They're slow devices. Enable the set reset register. The board has to be at least 1.5 away from any motors or solenoids. The more the better.
1 degree of error over the length of a playing field is allot. It may have it's uses. |
|
#5
|
|||||
|
|||||
|
Re: I2C Digital Compass Programming
Quote:
|
|
#6
|
|||
|
|||
|
Re: I2C Digital Compass Programming
Feet. More if the motors are under high load. The drill motors really put out magnetic distortions. Cims aren't nearly as bad. Fortunately the magnetic field from the motors is not uniform.
|
|
#7
|
||||
|
||||
|
Re: I2C Digital Compass Programming
Quote:
-Kevin |
|
#8
|
||||
|
||||
|
Re: I2C Digital Compass Programming
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming - Getting Started | Mark McLeod | Programming | 80 | 16-04-2008 23:37 |
| Digital Caliper as a Digital Readout on Small Mill | sanddrag | Technical Discussion | 9 | 13-10-2005 22:51 |
| Dynamic Input/Output Changing | Paolo | Control System | 6 | 23-09-2004 19:09 |
| Robot Programming Education | phrontist | Programming | 11 | 03-05-2004 07:32 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |