Hello—using Scroll PHAT hooked up works great on compute module (like an rpi3) with Stretch. Used your software examples to scroll around some messages.
However my circuit board MUST wire it to SDA0 & SCL0 (i2c0) rather than i2c1. Note, unlike the rpi3, both i2c ports are usable (as I have done so with several chips)
Using the sudo i2cdetect -y 0 Phat shows up correctly with the module address on I2C0. However my sample programs now give an OSError: [Errno 121] Remote I/O error, since obviously the other port needs used (it is still trying to use I2C1).
What parameter do I need to change or supply (or edit a file) so the script will work on the other port SDA0 & SCL0? Again the way my board is made, it must connect to these pins.
import time
import scrollphathd as ledbar
ledbar.write_string(“hello there–it works!!”)
while True:
ledbar.show()
ledbar.scroll(1)
time.sleep(0.1)
Can you be more specific? I’ve never worked with a library…do I just save this file somewhere & type the above?
Also is this correct for the PIM276, which is 7x17?
Thanks, I got it working…should have mentioned I have HD scrolller (didn’t know there was a non-HD).
I modified the .show to accept an i2c port parameter (0 or 1) & send that to setup, where the smbus is selected,
changed these lines:
def setup(self,i2cport): …added i2cport
self.i2c = smbus.SMBus(i2cport) …changed from 1 to i2cport
def show(self, i2cport=1, before_display=None): …added i2cport with default of 1
self.setup(i2cport) …added i2cparameter
Then did this: If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository, cd to the library directory, and run: