title: Orange Pi Zero & MFRC522 Application
body: <p>I want to build a project to read Mifare cards via orange pi zero. I have <code>MFRC522</code> module and the connections are like </p>
  
  <pre><code>SDA ------&gt; PIN 24
  SCK ------&gt; PIN 22
  MOSI -----&gt; PIN 19
  MISO -----&gt; PIN 21
  IRQ ------&gt; **NONE**
  GND ------&gt; PIN 6
  RST ------&gt; PIN 22
  3.3V -----&gt; PIN 1
  </code></pre>
  
  <p>Until now, not a single problem I have. I googled a little bit, and find out some advices. Afterwards I did these steps on my orangepi zero.</p>
  
  <p>By the way I'm using <strong>ARMBIAN 5.31</strong> stable Ubuntu 16.04.3 LTS 3.4.113-sun8i</p>
  
  <pre><code>sudo apt-get update
  sudo apt-get install python-dev
  sudo git clone https:/github.com/duxingkei33/orangepi_PC_gpio_pyH3.git
  cd orangepi_PC_gpio_pyH3
  sudo python setup.py install
  cd ..
  sudo git clone https://github.com/lthiery/SPI-Py.git
  cd SPI-Py
  sudo python setup.py install
  cd ..
  sudo git clone https://github.com/mxgxw/MFRC522-python.git
  cd MFRC522-python
  </code></pre>
  
  <p>Until here, there is still not a single problem. Now, here we go.</p>
  
  <ol>
  <li>One of these advices say </li>
  </ol>
  
  <p>Now its time to edit MFRC522.py. I am providing the diff with the original.</p>
  
  <p>
  
  <pre><code> import RPi.GPIO as GPIO
   110c110
   &lt; def init(self, dev='/dev/spidev1.0', spd=1000000):
  
   def init(self, dev='/dev/spidev0.0', spd=1000000):
   112,114c112,114
   &lt;# GPIO.setmode(GPIO.BOARD)
   &lt; # GPIO.setup(22, GPIO.OUT)
   &lt; # GPIO.output(self.NRSTPD, 1)
  
   GPIO.setmode(GPIO.BOARD)
   GPIO.setup(22, GPIO.OUT)
   GPIO.output(self.NRSTPD, 1)
  </code></pre>
  
  <ol start="2">
  <li>And the other says</li>
  </ol>
  
  <p>7)To read id data:</p>
  
  <pre><code>cd MFRC522-python
  edit  MFRC522.py and comment out line 108.109.110  and 356( as shown below)
        # GPIO.setmode(GPIO.BOARD)
        #GPIO.setup(22, GPIO.OUT)
        #GPIO.output(self.NRSTPD, 1)
  
         #GPIO.output(self.NRSTPD, 1)
  
      python read.py
  
   root@orangepione:~/MFRC522-python# python read.py
  </code></pre>
  
  <p>Whatever I do, still I have errors. Second one says "not such a file", first one I dont even understand what to do. Can anyone help me?</p>