I demonstrated that PN7120 controller driver working with NTAG215 tags in my last blog. It is time to do real work on PiBook Tracker project. It took longer time than I planned, since I started to learn Python programming, Google Cloud API and NFC driver officially at the same time. My goal is to use Python to develop this project. After some researching online, I found that Doron Horwitz from Israel had finished this part initially. Doron Horwitz shared his source code at Ref. https://gist.github.com/doronhorwitz/fc5c4234a9db9ed87c53213d79e63b6c where Doron’s Python project provided a subprocess module allowing the codes to spawn new processes, connect to it input/output/error pipes and obtain the return codes. The integration was very straightforward for PN7120 driver side. I also created a Google sheet online for the book list:
The video demonstrated the proof of concept of my PiBook_tracker got all pieces working together. It was not perfect. The main reason was from Python wrapper on nfcDmoApp. If nfcDemoApp hangs in an infinite loop or something similar to that, it does not produce a return code, the API would not know it. Otherwise, Doron’s Python code work very well. Here is the summary of the building blocks for this project:
- Following my PiBook Tracker : Blog #02-- Hardware setup and initial PN7120 driver testing
- Either check out Doron Horwitz source code for PN7150 Python code(Ref) or modified PN7120 Python code from my Github.
- PiBook_tracker.py to communicate Google sheet, call PN7120_nfcDemoApp wrapper
- Github repo: https://github.com/flyingbean/PiBook_tracker
If you are interested in integrating PN7120 driver into Linux, you can find a good source on Ref at Element14 community.
I think this NFC contest is the beginning for my journey of NFC applications and Python programming.