![]() we are emulating SPI via the GPIO lines on the RPi. You could set up an extra GPIO line I guess, maybe if you wanted two or three of these running (dunno how many lines we have left!)īTW. Get the wiringPi and wiringPi-Python from Gadgetoid's git has I think Gordon as tweaked the wiringPi on his site enough to break wiringPi-Python The associated instructions are simple enough although I needed to move the compiled wiringPi into the wiringPi-Python directory.Īlthough no one mentioned it the device select / device address / SCE / whatever it is on your board needs to be jumpered to ground. and make sure you have python-dev and git. ![]() these things tripped me up! Noob answers probably but you all seem friendlyįirst, do the usual apt-get update etc. I just got one of these LCDs today so I have a few tips, i.e. # try to guarantee that we don't leave the file open by mistake ![]() Self.f = open('/sys/class/gpio/gpio%s/value'%self.id, 'w') If self.id not in _ExportedIds or _ExportedIds != OUT: Instead of opening/closing it each time you write to it. ![]() """To attain higher write performance on the RPi GPIO (up to about 5x), keep the device open as a file # using the additional RPi.GPIO class developed by Kevin Casabonįrom RPi.GPIO import * # ideally this should just be tacked at the bottom of the GPIO module itselfįrom RPi.GPIO import _GetValidId, _ExportedIds Begin(0xbc) # contrast - may need tweaking for each display
0 Comments
Leave a Reply. |