msev

Members
  • Content Count

    83
  • Joined

  • Last visited


Reputation Activity

  1. Like
    msev reacted to StuxNet in MFRC-522 not working with Orange Pi Zero   
    I got a MFRC522 module working on Orangepi Zero. I could get really long winded about how it took 3-4 tutorials, hopping around between GPIO libraries getting irritated with people for not posting kernel specifics and referring to Orangepi Zero/PC/One simply as 'OrangePi' but I'm not going to. Instead I took the information I gleaned, put it all together in one spot, all nice and tidy for the community.

    All in all the steps are pretty similar to what I found here, other forums and tutorials. Except uses a better GPIO library specifically for the Orangepi Zero. Not a clone of RPI.GPIO, ported to Orangepi PC, ported to the Zero. So give this guy some credit! https://github.com/rm-hull/OPi.GPIO

    You can download, install all dependencies and start reading tags with this one line. It goes without saying that it should be executed as root.
    git clone https://github.com/BiTinerary/OrangePiZeroMFRC522.git && bash ./OrangePiZeroMFRC522/getAllTheStuff.sh  
    All the source of that one liner as well as pinout etc... is available at this repo.
    https://github.com/BiTinerary/OrangePiZeroMFRC522
  2. Like
    msev reacted to gailu 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
    msev got a reaction from lanefu in [559] - GPIO Support for H2/H3 boards with a unified WiringPI library in a neat little package   
    I'd say go with WiringPi, so we could reuse existing projects for Rpi. If you'd go with pyA20, then fork it and make it compatible with Rpi.GPIO so we can reuse those projects for RPi .
  4. Like
    msev got a reaction from Tom_Neverwinter in Kerberos.io video surveillance installation on Armbian   
    This is awesome! So if I copy those files for rpi-cam first i could use the .deb from the website? Which one, for Rpi3 or Rpi2?  Could you perhaps host the needed rpi camera files somewhere?
     
    What do you think hardware-vise, would a 512mb Ram H3 orange take it? Or is 1gb required?
  5. Like
    msev got a reaction from zipzit in Orange Pi Zero, Python GPIO Library   
    Ok so if I see a project that uses WiringPi, how do I replace the wiringpi code in that project with the code from this library so that it does the same job?
     
    Also what about if I need a library in C? (which one works?)
  6. Like
    msev reacted to gnasch in "Header" temperature in red   
    Fear not!
    this temperature is actually quite moderate.
     
    best, gnasch
  7. Like
    msev got a reaction from chris021 in Orange Pi Zero went to the market   
    So can someone give me an overview on what:
     
    - works
    - doesn't work
    - isn't optimal
     
    on the current Armbian Orange Pi Zero build?
  8. Like
    msev got a reaction from Armen Hovhannisyan in Orange Pi Zero went to the market   
    Has anyone tested if Wiring-OPI works with this board? Thanks!