Richard-Gemmell / teensy4_i2c

An I2C library for the Teensy 4. Provides slave and master mode.
MIT License
92 stars 19 forks source link

Hi Richard, #29

Open Richard-Gemmell opened 1 year ago

Richard-Gemmell commented 1 year ago

Hi Richard, I think I have a similar problem.

I try the same code but it's not working. My slave doesnt receive anything And I try a scan code for my Master and I didn't find any slave

18 is connect to 18, same for 19 I try to add externel pull up resistors but it don't change anything The gnd of both cart are connect The built in led is changing when I push the button so the code seem to be working Both cart are connect with my computer with usb

Do you have any advice for me please ?

_Originally posted by @efshel in https://github.com/Richard-Gemmell/teensy4_i2c/issues/23#issuecomment-1162213952_

Richard-Gemmell commented 1 year ago

Hi @efshel, I've created a new issue to track this discussion.

One possibility is a "stuck bus". You can fix it by resetting the master and slave in the right order. See this comment

Another possibility is an electrical problem of some kind. If you haven't done so already, test the I2C connection between your 2 Teensys with all other wiring removed. On my test setup, the I2c bus wires are about 10 cm long and I don't need any pullup resistors.

If it doesn't work like that then you might have a broken Teensy. It's possible to fry some GPIO pins without breaking the whole thing.

cheers, Richard