If somebody wants to use compas together with OV7725,
I can recommend to use following device. It works with SRV1.
http://www.sparkfun.com/commerce/product_info.php?products_id=8656 I remember, admin told, there is some address collision between compas HMC6352 and camera OV7725 .
I have no HMC6352, but for HMC6343 you can make following:
wire pins from S32 to compas (4 wires)
1 3.3V 3.3V voltage regulator
2 GND ground
14 I2C SCL i2c scl
15 I2C SDA i2c sda
And also change srv.c:
void read_compass() {
unsigned char i2c_data[10];
short ix, i, head, pitch, roll;
unsigned char addr;
// HMC6343
addr = 25;
i2c_data[0] = 0x50; i2cwrite(addr, (unsigned char *)i2c_data, 1, SCCB_ON); delayUS(10000);
for(i = 0; i <= 5; i++) i2c_data[i] = 0x00;
i2cread(addr, (unsigned char *)i2c_data, 6, SCCB_ON);
head = ((short) (i2c_data[0] * 256 + i2c_data[1])) / 10;
pitch = ((short) (i2c_data[2] * 256 + i2c_data[3])) / 10;
roll = ((short) (i2c_data[4] * 256 + i2c_data[5])) / 10;
printf("##C head=%d pitch=%d roll=%d\n\r", head, pitch, roll);
}
Console command for compas data is: $C
That's all.