Jump to content

GLinBoy

Members
  • Posts

    3
  • Joined

  • Last visited

  1. For connect to SPI in python, which library should I use? Currently I used spidev. Is it correct? (Armbian_5.65_Orangepizero_Ubuntu_bionic)
  2. That was. Thanks. Now everything build successfully but LCD doesn't show anything! It's works perfect, But I can't handle LCD.
  3. Hi I try use Nokia 5110 with Orange pi zero. I found this library: https://github.com/rm-hull/luma.lcd and try to run it on my orange pi with this tutorial: http://codelectron.com/interface-nokia-5110-lcd-and-raspberry-pi-python/ so in python shell I add these: >>> from luma.core.interface.serial import spi >>> from luma.core.render import canvas >>> from luma.lcd.device import pcd8544, st7735, uc1701x >>> import OPi.GPIO as GPIO >>> from luma.lcd.aux import backlight but after add this line, I got many error that told me that library is used for Raspberry pi only: >>> serial = spi(port=1, device=0, gpio_DC=18, gpio_RST=16) Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/luma/core/lib.py", line 23, in __rpi_gpio__ import RPi.GPIO as GPIO File "/usr/local/lib/python3.6/dist-packages/RPi/GPIO/__init__.py", line 23, in <module> from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi! During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/dist-packages/luma/core/interface/serial.py", line 255, in __init__ bitbang.__init__(self, gpio, transfer_size, DC=gpio_DC, RST=gpio_RST) File "/usr/local/lib/python3.6/dist-packages/luma/core/interface/serial.py", line 148, in __init__ self._gpio = gpio or self.__rpi_gpio__() File "/usr/local/lib/python3.6/dist-packages/luma/core/lib.py", line 30, in __rpi_gpio__ 'GPIO access not available') luma.core.error.UnsupportedPlatform: GPIO access not available Now I confused because in the document they said that we can use it on orange pi zero by armbian! could you guide me to run Nokia 5110 LCD with orange pi zero (I prefer use python).
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines