gailu

Members
  • Content Count

    43
  • Joined

  • Last visited


Reputation Activity

  1. Like
    gailu got a reaction from chwe in How to know what causing shutdown and way to stop it   
    This is to update that problem was not with the Armbian image. There was a third party app (that we outsourced to a freelancer). He made a check when networks goes down and does not recover automatically within two minutes it restarted programmatically.  Extremely sorry to trouble you.
  2. Like
    gailu got a reaction from StuxNet in MFRC-522 not working with Orange Pi Zero   
    @msev
     
    Sure, because of forum help I got it working so its my turn to help others. Yes, I use RC-522 in python.
     
    Here are steps. 
    1. Install Armbian image for orange pi zero. Please use Ubuntu Xenial (not the debian jessie). Reason for Ubuntu Xenial instead of debian jessie is that in debian jessie image by default only spi0 is enabled so you will only see /dev/spidev0.0 while in ubuntu xenial image you will see two entries /dev/spidev0.0 and /dev/spidev1.0 we need /dev/spidev1.0 as explained by zador.blood.stained. If you know how to enable spi1 in debian jessie, you may go for that too (its not available out of the box currently)
     
    2. Make Connection as follows
    MOSI ——————————> pin 19
    MISO ——————————-> pin 21
    SCLK ——————————-> pin 23
    SDA ——————————–> pin 24
    RST ———————————> pin 22
    IRQ ———————————-> NONE
     
    3. Install all the required stuff as follows
     
    a) apt-get update b )apt-get install python-dev c) git clone https://github.com/duxingkei33/orangepi_PC_gpio_pyH3.git d) cd orangepi_PC_gpio_pyH3 e) python setup.py install f) cd .. g) git clone https://github.com/lthiery/SPI-Py.git h) cd SPI-Py i) python setup.py install j) cd .. k) git clone https://github.com/mxgxw/MFRC522-python.git l) cd MFRC522-python   4. Now its time to edit MFRC522.py. I am providing the diff with the original. < import pyA20.gpio as GPIO --- > import RPi.GPIO as GPIO 110c110 < def __init__(self, dev='/dev/spidev1.0', spd=1000000): --- > def __init__(self, dev='/dev/spidev0.0', spd=1000000): 112,114c112,114 < # GPIO.setmode(GPIO.BOARD) < # GPIO.setup(22, GPIO.OUT) < # GPIO.output(self.NRSTPD, 1) --- > GPIO.setmode(GPIO.BOARD) > GPIO.setup(22, GPIO.OUT) > GPIO.output(self.NRSTPD, 1) 384c384 < # GPIO.output(self.NRSTPD, 1) --- > GPIO.output(self.NRSTPD, 1) 5. Now Run Read.py
    root@orangepizero:~/MFRC522-python# python Read.py Welcome to the MFRC522 data read example Press Ctrl-C to stop. Card read UID: 186,123,162,171 Size: 8 Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  3. Like
    gailu got a reaction from msev in MFRC-522 not working with Orange Pi Zero   
    @msev
     
    Sure, because of forum help I got it working so its my turn to help others. Yes, I use RC-522 in python.
     
    Here are steps. 
    1. Install Armbian image for orange pi zero. Please use Ubuntu Xenial (not the debian jessie). Reason for Ubuntu Xenial instead of debian jessie is that in debian jessie image by default only spi0 is enabled so you will only see /dev/spidev0.0 while in ubuntu xenial image you will see two entries /dev/spidev0.0 and /dev/spidev1.0 we need /dev/spidev1.0 as explained by zador.blood.stained. If you know how to enable spi1 in debian jessie, you may go for that too (its not available out of the box currently)
     
    2. Make Connection as follows
    MOSI ——————————> pin 19
    MISO ——————————-> pin 21
    SCLK ——————————-> pin 23
    SDA ——————————–> pin 24
    RST ———————————> pin 22
    IRQ ———————————-> NONE
     
    3. Install all the required stuff as follows
     
    a) apt-get update b )apt-get install python-dev c) git clone https://github.com/duxingkei33/orangepi_PC_gpio_pyH3.git d) cd orangepi_PC_gpio_pyH3 e) python setup.py install f) cd .. g) git clone https://github.com/lthiery/SPI-Py.git h) cd SPI-Py i) python setup.py install j) cd .. k) git clone https://github.com/mxgxw/MFRC522-python.git l) cd MFRC522-python   4. Now its time to edit MFRC522.py. I am providing the diff with the original. < import pyA20.gpio as GPIO --- > import RPi.GPIO as GPIO 110c110 < def __init__(self, dev='/dev/spidev1.0', spd=1000000): --- > def __init__(self, dev='/dev/spidev0.0', spd=1000000): 112,114c112,114 < # GPIO.setmode(GPIO.BOARD) < # GPIO.setup(22, GPIO.OUT) < # GPIO.output(self.NRSTPD, 1) --- > GPIO.setmode(GPIO.BOARD) > GPIO.setup(22, GPIO.OUT) > GPIO.output(self.NRSTPD, 1) 384c384 < # GPIO.output(self.NRSTPD, 1) --- > GPIO.output(self.NRSTPD, 1) 5. Now Run Read.py
    root@orangepizero:~/MFRC522-python# python Read.py Welcome to the MFRC522 data read example Press Ctrl-C to stop. Card read UID: 186,123,162,171 Size: 8 Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]