Jump to content

AndreWicked

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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. 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. 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. 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. 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. 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. 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. 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. It's working, but how I may to check my gpio?
  10. Sorry, apt-get install python-dev solved the problem.
  11. 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. Now I understand. Thank you very much, I will understand further.
  13. 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.
  14. 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?
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines