nfc hangs when querying the object

Posted on
  • Whenever I try and query the nfc object it just hangs.

    I'm using Espruino Wifi and have my setup code like this:

     I2C2.setup({scl:B10, sda:B3});
     var nfc = require("PN532").connect(I2C2);

    That doesn't make anything hang.

    But if I then try this


    It just hangs. Doesn't matter what method I call on the nfc class, it just hangs straight away.

    I've tried i2c1 as well and I seem the same behaviour.

    Any ideas?

  • OK.

    I hadn't switched over the tiny SMD switch across on the board to switch it to i2c mode.

    Works now!

    I'll get my coat.

  • Great! glad you got it sorted! I'm surprised about the hang though - I2C should usually time out and throw an exception.

    It it happens again, it'd be interesting to see if Ctrl-C will break out of it...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

nfc hangs when querying the object

Posted by Avatar for BrendanDawes @BrendanDawes