Integrating physical devices with IOTA — The IOTA debit card, Part 3

The 8th part in a series of beginner tutorials on integrating physical devices with the IOTA protocol.

Hugo Gregersen
Oct 3, 2018 · 4 min read

Introduction

This is the 8th part in a series of beginner tutorials where we explore integrating physical devices with the IOTA protocol. This tutorial is the third part in a sequence of tutorials where we will try to replicate a traditional fiat based debit card payment solution with an IOTA based solution. In this third tutorial we will be implementing i PIN code protection mechanism for our IOTA debit card.


The Use Case

If you followed the previous tutorial in this series you probably noticed that you are not asked for any authorization or credentials when paying with your IOTA debit card. While this might be fine in some use cases, there may be other use cases where this is not acceptable. Imagine if you lost your IOTA debit card and it was picked up by a bad actor. Without any protection mechanism there would be nothing preventing him from using your card. In this tutorial we will be addressing this issue by implementing a PIN code protection mechanism for our IOTA debit card.


The Python code — Part 1

The python code used in this tutorial will be split into two parts where the first part is the code used when assigning a new PIN code to your IOTA debit card. The second part is a modified version of the iota_debit_card_pay.py script from the previous tutorial. Only difference is that the new version will ask you for a PIN code before scanning your IOTA debit card.


Running the project

To run the the project, you first need to save the code in the previous section as a text file in the same folder as where you installed the MFRC522-python library.


The Python code — Part 2

The second part is a modified version of the iota_debit_card_pay.py script from the previous tutorial. Only difference is that the new version will ask you for a PIN code before scanning your IOTA debit card.

Running the project

To run the the project, you first need to save the code in the previous section as a text file in the same folder as where you installed the MFRC522-python library.


Whats next?

I was thinking it would be fun to build a Visa style IOTA based payment terminal using some off-the-shelf components such as a keypad, 2x16 digit display and an RFID reader. I just hope i have enough GIO pins on my Raspberry PI. Will see how it goes.., stay tuned.


Contributions

If you would like to make any contributions to this tutorial you will find a Github repository here


Donations

If you like this tutorial and want me to continue making others, feel free to make a small donation to the IOTA address shown below.

Coinmonks

Coinmonks is a non-profit Crypto educational publication.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store