The main idea behind this project is to create a virtual field to play a well known card game. The basic functionality is that each turn the player can scan his cards to be placed in the virtual Field and all stats and info from the card can be projected on that field.
The virtual Field is gema field grid projected on the ground that can hold cards. When a card is placed in the virtual field all info form the card arises and an image on the card in the correct orientation is place in the grid. Upon hover with a mouse more info can be reveled if necessary such as special abilities.
The cards are scanned by means of an NFC Scanner and each card contains an NFC Sticker between the card an the Sleeve. The NFC Sticker Contains the Card ID that can be compared against the YGOProDeck API for retreiving all info from that particular card to be place on the Virtual Field.
I wanted to show you some basic field Monster position detection, for it I built a simple prototype using IR sensors. The code for detection can be found named "MonsterZoneDetection_IR". As you can see a transparent sheet serves as a place for the card to lay down and since IR light passes through this sheet it does not get detected as a card. When a card is placed on top of a sensor it gets triggered and outputs a digital high signal.
I use the Adafruit Library to connect both devices. It is pretty clear and has really clear examples on how to do this. In some cases an extra wire for IRQs is needed. See diagram below
Use of Photodiodes
The zones of the field are detected by means of Photo-diodes present in certain spots on the Duel Disk. This Photo-diodes are activated by light outputing a certain voltage. This voltage can be read by an ADC on the Arduino and processed via a threshold or by a digital pia as either a HIGH or a LOW.
There are 17 Photo-diodes to detect in the 12 zones in the field.
Additional coding has been made to accommodate the timing of how the player places the card, since one player can take more time to place the card.