teensy 4.0 and pn532.

Status
Not open for further replies.

JustTrying7

New member
Hi Guys,

So I'm looking to use the T4 in a project requiring multiple communication protocols. Using 2 UARTS and SPI + I2C. This is more than likely an under utilization of a T4 however, as I have one and my only other option is a NANO which ran out of capacity halfway into the project,so I have little choice.

On the I2C bus (SDA0 and SCL0) I have an GPIO expander PN532 RFID reader. So far I've had no problem communicating with the GPIO (PCF8574). I intend adding an OLED later.

I can scan using the usual I2C scanners tools. I can see the GPIO(0x26) and the PN532. (address is 0x24 - which differs from library- but as the Nano successfully uses the same library I'm guessing that isn't a factor.
I've wired the IRQ pin connected to PIN 3.
I've attached the code I'm using to test. This basically stalls at "Didn't find PN53x Board" and the Leds do not operate, with the exception of the Led on pin 5 which switches to whatever state I request prior to the start of the scanner code.

I also tried using the I2C_T3 library. It simply will not compile.
I've attached the error messages.
I've realised that the T4 is not included in the library
I'm not experienced enough to add the T4 to the .h and .cpp files..
Maybe someone can help me with that??

The I2C_T3 basic scanner example was the code I could not compile, hence the error code attached.
 

Attachments

  • itc_t3 error.txt
    1.8 KB · Views: 75
  • readMifareClassicandGPIO.ino
    6.4 KB · Views: 59
Having a similar problem here migrating working code from T3.2 to T4, except that I get compiler errors like: error: 'Wire' was not declared in this scope
Wire.begin(I2C_MASTER, 0x00, I2C_PINS_18_19, I2C_PULLUP_INT, I2C_RATE_400, I2C_OP_MODE_DMA );


So I'm wondering if the i2c_t3 library should be compatible with T4.0 or not?

I'm also getting other errors like error: 'delay' was not declared in this scope
delay(25);

but delay() compiles and runs just fine in the "blink" sketch.
 
Had a chat with the guy that wrote the I2C_T3 library. Says it wont work for T4. Needs to be ported. Apparently not a simple matter.

Suggested I look for answers here :) . Would seem we are stuck with wire for the foreseable future. I haven't succeeded to communicate with the PN532 as yet.
 
Status
Not open for further replies.
Back
Top