AndreWicked

Members
  • Content Count

    16
  • Joined

  • Last visited

  1. AndreWicked

    Autostart python scripts

    It turned out to be added to the autorun, thanks, but the problem now is different, if you run the script from the root's folder, Autorun does not work, and if from the user's folder, the information from the reader is not written to the file. How I may to fix this?
  2. AndreWicked

    Autostart python scripts

    Explain it on your fingers, or I do not understand. How can I make my python script run when I turn on my NanoPI, without logging in, without entering a login, password?
  3. AndreWicked

    SPI activation on nanopi Neo

    Pay attention to the theme I created, I got it and there I brought libraries that used. https://forum.armbian.com/topic/7635-rfid-mfrc522-on-nanopi-neo/
  4. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Everything turned out with RPi.GPIO_NP library https://github.com/chainsx/RPi.GPIO.NP SPI-Py Library https://github.com/lthiery/SPI-Py.git And https://github.com/BiTinerary/OrangePiZeroMFRC522 On NanoPi Neo, the libraries from OrangePi Zero are completely suitable, even the pinouts are the same. root@NanoPi-NEO:~/OrangePiZeroMFRC522/MFRC522-python# sudo python Read.py Welcome to the MFRC522 data read example Press Ctrl-C to stop. Card detected Card read UID: 194,86,17,48 Size: 8 Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] You can fix it somewhere, if anyone else needs to implement an RFID reader with NanoPi Neo, since it takes very little space Thank you for your help!
  5. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    You had an error in this line. from pyA20 import spi I changed to from pyA20.spi import spi And got this error root@NanoPi-NEO:/# sudo python test_spi.py ['__doc__', '__file__', '__name__', '__package__', 'close', 'open', 'read', 'write', 'xfer'] Segmentation fault
  6. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    I copied your code: #!/usr/bin/python from pyA20 import spi data = [0x00,0x01,0x02,0x03,0x04,0x05] print dir(spi) spi.open("/dev/spidev0.0") spi.write(data) data = spi.xfer(data, len(data)) spi.close() print data and run it root@NanoPi-NEO:/# sudo python test_spi.py ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__'] Traceback (most recent call last): File "test_spi.py", line 8, in <module> spi.open("/dev/spidev0.0") AttributeError: 'module' object has no attribute 'open'
  7. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Traceback (most recent call last): File "test_spi.py", line 5, in <module> spi.open("/dev/spidev0.0") AttributeError: 'module' object has no attribute 'open'
  8. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Thank you, it worked. Last question, you write that RFID Reader needs to be connected by I2C, and on many forums write about SPI, I'm a little confused. Will you prompt?
  9. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    It's working, but how I may to check my gpio?
  10. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Sorry, apt-get install python-dev solved the problem.
  11. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    root@nanopineo:/# sudo git clone https://github.com/duxingkei33/orangepi_PC_gpio_pyH3 Cloning into 'orangepi_PC_gpio_pyH3'... remote: Counting objects: 61, done. remote: Total 61 (delta 0), reused 0 (delta 0), pack-reused 61 Unpacking objects: 100% (61/61), done. Checking connectivity... done. root@nanopineo:/# cd orangepi_PC_gpio_pyH3/ root@nanopineo:/orangepi_PC_gpio_pyH3# python setup.py install running install running build running build_py creating build creating build/lib.linux-armv7l-2.7 creating build/lib.linux-armv7l-2.7/pyA20 copying pyA20/__init__.py -> build/lib.linux-armv7l-2.7/pyA20 creating build/lib.linux-armv7l-2.7/pyA20/gpio copying pyA20/gpio/__init__.py -> build/lib.linux-armv7l-2.7/pyA20/gpio running build_ext Detected processor: Allwinner sun8i Family (Probably Allwinner H3) building 'pyA20.gpio.gpio' extension creating build/temp.linux-armv7l-2.7 creating build/temp.linux-armv7l-2.7/pyA20 creating build/temp.linux-armv7l-2.7/pyA20/gpio arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio_lib.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio_lib.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio.o pyA20/gpio/gpio.c:25:20: fatal error: Python.h: No such file or directory compilation terminated. Tell me please what is the problem?
  12. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Thanks, I will try.
  13. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Now I understand. Thank you very much, I will understand further.
  14. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Thanks for the quick response. But can you explain it to me then? http://wiki.friendlyarm.com/wiki/index.php/RPi.GPIO_:_NanoPi_NEO/NEO2/Air_GPIO_Programming_with_Python As I understand in the official ROMs there is support RPi.GPIO.
  15. AndreWicked

    RFID-MFRC522 on NanoPi Neo

    Hello everybody! Can I read data from the RFID-MFRC522 module with my NanoPi, if so, tell me what python libraries are in Armbian or will it be necessary to install an official ROM and work through RPi.GPIO?