The past few weeks at the MATRIX Labs office have been anticipatory indeed.
Our team member, Boris, made a beautiful C++ abstraction of the NXP NFC library for the PN512 chip on the MATRIX Creator and every time we saw the MATRIX Creator's LEDs light up because of a tap from a plastic NFC tag, our hearts jumped a little. You might think it's not that exciting, but the sight of LEDs still mesmerize me, especially when I'm unaware of the magic driving them.
Learning the magic is super easy though, you would just have to follow the directions on our documentation and it will lead you right to it. Learning about all those different types of tags and how they interact with the NFC chip, I felt like a niche hardware enthusiast.
The excitement continued on through our team member, Carlos (hermitter), who then took the reigns and began to work on his JavaScript abstraction. Very soon, it became possible to create NFC mojo with fewer spells. See for yourself here.
The video below shows how simple the code can look for reading an NFC tag. Here's a more updated version of that code so you can see how easy the syntax really is.
const nfc = require("@matrix-io/matrix-lite-nfc"); nfc.read.start({rate:100, info:true}, (code, tag)=>{ if (code === 256){ console.log("Tag Was Scanned"); console.log(tag); } else if (code === 1024) console.log("Nothing Was Scanned"); });
With JavaScript in the game, we all began to dream up how we would incorporate NFC into our own projects. We thought of having NFC business cards, NFC automated processes, NFC triggered curtain blinds.
We first got to put our NFC imagination to test when we attended a local Miami hackathon, ShellHacks 2019. Carlos got NFC stickers and we adorned our badges with them linking to our website, projects, and documentation. It was so much fun to just tap my badge and show relevant information on my phone when someone asked if we had documentation or guides.
- MATRIX Lite NFC JS Reference
- Get started with our C++ NFC library layer
- MATRIX Lite NFC Python coming soon