Loading...
Pages: [1]   Go Down
Author Topic: I2C hanging or something, please help!  (Read 237 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to connect a wii remote ir sensor to an arduino uno.  I'm certain I have the connections correct (SCL to A5, SDA to A5) and when the circuit was built on a breadboard everything worked properly.  However, now when I run the same sketch the program does not make it past either Wire.begin() or a call to Wire.write().  I assume it's Wire.begin().  I know this because I have a Serial.println before and after a call to PVision.init() which in turn calls Wire.begin() and then write().  PVision is the library I am using to communicate with the IR sensor.

Any ideas as to what would cause the call to Wire.begin() to stop the program?

Thanks!

Edit: I have also noticed that the L LED, which I believe is connected to pin 13, stays on or blinks very rapidly the entire time the program is running.  Interestingly, while I "wait" for the Serial.println message after PVision.init() the L LED remains on.
« Last Edit: February 14, 2012, 10:50:19 pm by majellin » Logged

Portugal
Offline Offline
God Member
*****
Karma: 5
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have propper 4.7Kohm pull-up resistors in each SDA and SCL line?
Wrong slave address?
Logged

Seattle
Offline Offline
Newbie
*
Karma: 0
Posts: 14
huh?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Find out exactly which call's stalling it- if it's begin, I'd check the library.  If it's write, I'd look at the hardware.

This has been a slow learning process for me, too...  the i2c buss is pretty low- level, and thus, fault- intolerant.

And as always, if it worked once, go back to the hardware and software that worked, then
try going 'forward' one step at a time.  I spent a long time wrestling with what turned out to
be a bad USB cable...

t
Logged

Pages: [1]   Go Up
Print
 
Jump to: