element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RFID or NFC
  • Challenges & Projects
  • Project14
  • RFID or NFC
  • More
  • Cancel
RFID or NFC
Project14: RFID or NFC Competition PiBook Tracker : Blog #03-- Python PN7120 API for Google Sheet
  • Blog
  • Forum
  • Documents
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RFID or NFC to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: flyingbean
  • Date Created: 19 Dec 2022 8:00 PM Date Created
  • Views 836 views
  • Likes 8 likes
  • Comments 1 comment
  • rfidornfcch
  • rfid
  • nfc
Related
Recommended

PiBook Tracker : Blog #03-- Python PN7120 API for Google Sheet

flyingbean
flyingbean
19 Dec 2022

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[5]. 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:

image

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:

  1. Following my PiBook Tracker : Blog #02-- Hardware setup and initial PN7120 driver testing
  2. Either check out Doron Horwitz source code for PN7150 Python code(Ref[5]) or modified PN7120 Python code from my Github.
  3. PiBook_tracker.py to communicate Google sheet, call PN7120_nfcDemoApp wrapper
  4.  Github repo: https://github.com/flyingbean/PiBook_tracker

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

If you are interested in integrating PN7120 driver into Linux, you can find a good source on Ref[6] at Element14 community.

I think this NFC contest is the beginning for my journey of NFC applications and Python programming.

 

Ref[1]: https://www.nxp.com/products/rfid-nfc/nfc-hf/nfc-readers/nfc-controller-with-integrated-firmware-and-nci-interface-for-home-appliances:PN7120

Ref[2]: https://www.nxp.com/products/rfid-nfc/nfc-hf/ntag-for-tags-labels/ntag-213-215-216-nfc-forum-type-2-tag-compliant-ic-with-144-504-888-bytes-user-memory:NTAG213_215_216

Ref[3]:https://www.nxp.com/design/training/nfc-use-cases:TIP-NFC-USE-CASES

Ref[4]:https://community.nxp.com/t5/NXP-Designs-Knowledge-Base/Easy-set-up-of-NFC-on-Raspberry-Pi/ta-p/1099034

Ref[5]:https://gist.github.com/doronhorwitz/fc5c4234a9db9ed87c53213d79e63b6c

Ref[6]: /products/manufacturers/nxp/b/blog/posts/nfc-software-integration-ii-how-to-integrate-nfc-controllers-in-linux

  • Sign in to reply
  • flyingbean
    flyingbean over 2 years ago

    I cannot upload video record for the blog now. Will try it later.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube