compass HMC6352 trouble

26 Dec 2011

Just received the compass module. Can't get it to work. Below is a snippet of code.

#include "HMC6352.h"
#include "mbed.h"

//HMC6352 compass(p9, p10);
Serial pc(USBTX, USBRX);

int main() {

wait(10);
pc.printf("Starting HMC6352 test...\r\n");

}

This will print on serial terminal, but if I uncomment HMC6352, it will not. If I unplug the module, it will not print either. Maybe the module is defective?

17 Apr 2014

Just tried mine, it read 5268.40000 and never changed.

17 Apr 2014

My bad had pins wrong, works fine now

06 May 2014

What is your conection diagram? did you use PTE0 and PTE1 ports?

06 May 2014

Because im getting the same 5268.40000 value

Please log in to post a reply.