Pages: [1]   Go Down
Author Topic: Wire.endTransmission-probl when talking to HMC6352  (Read 709 times)
0 Members and 1 Guest are viewing this topic.
Zürich, Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Shall a gadget be useful?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi! When trying to communicate between an arduino Duemilanove (328p) and the compass module HMC6352 from sparkfun using the code provided under http://www.arduino.cc/playground/Learning/Hmc6352 , the program gets stuck at the line

.
.
Wire.endTransmission();
.
.

after having sent the «command» 'A' and no matter how long I wait, I don't get a response from the compass.

I connected the module as indicated in the above example (GND,3.3V,SDA-->A4,SCL-->A5) and tried with and without pullup resistors on the SDA and SCL-lines.

Do you have an idea, where the problem might be?

Thank you very much. Dani
« Last Edit: January 29, 2010, 04:47:22 pm by local_dani_21 » Logged

Zürich, Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Shall a gadget be useful?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, my Code using Wire.h only freezes when I use Arduino 17! When I use the old Arduino 15, the very same code works perfectly. Is Wire.h implemented differently in Arduino 17? I use OSX 10.5.8 on an Macbook Pro 13.3" with Intel Core Duo 2. Thanks!
Logged

Berlin
Offline Offline
Full Member
***
Karma: 0
Posts: 181
Arduino rocks your socks off
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, don't know if it's still useful, but in Arduino 17 it seems obligatory to put a "Wire.begin();" into the setup()-function.
Logged

Zürich, Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Shall a gadget be useful?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I actually had the Wire.begin() in my setup(){} and still had the problem. Well, I moved over to Arduino 0018 and everything works fine there. Thanks for the input, Dani
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I´m trying to read the HMC6352 compass with that code
and using the vesion 0018 of arduino but it doesn´t work! when connecting (SCL-Analog Pin5 and SDA- Analog Pin 4) it always appears : Current heading: 0.0 degrees, also when moving the sensor...

I don´t know what´s happenning. I need some help please. Thanks!
« Last Edit: March 08, 2010, 12:57:56 pm by Kaituka88 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the code that I´m using is:

http://www.arduino.cc/playground/Learning/Hmc6352

Thanks!
Logged

Pages: [1]   Go Up
Jump to: