-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Scroll pHAT HD #100
Comments
I'll be able to get my hands on one later this week and test it. |
Looks like it is an i2c device, so should be easy to drive |
Finally got one on my desk, will test this now. @rm-hull where do I start, how do I test this? |
ping @rm-hull |
First things first, connect it up, and do Looking at the datasheet and adafruit arduino code, I'd be inclined to hack a little script first to understand it a bit more before diving into writing the display driver. The hack script should:
for x in range(17):
for y in range(7):
bus.write_byte(y, x, 0xFF)
time.sleep(1) and see what happens - if that worked (in some sense), you should see the LEDs progressively lighting up one by one - and that should give us a clue how to map the display (it will either be a raster scan or snake scan - similar to the WS2812 neopixel mapping on the unicorn HAT - https://github.com/rm-hull/luma.led_matrix/blob/master/luma/led_matrix/device.py#L281-L292) Once we understand how to address it, writing a luma.led_matrix driver will be pretty simple, and we should be able to convert RGB colored images into greyscale so that the pixels have different brightness levels. Quite happy to try organising a remote coding session (hangouts / slack / remote desktop |
Is there some status update on this? |
I most emphatically promote borrowing and re-purposing our code! If you need any help getting Scroll pHAT HD up and running, I'd be happy to test/review your code and answer any questions you might have. I'd also love to see support for the Unicorn HAT HD, which uses SPI. The Scroll pHAT HD pixels aren't addressed in any way that would make sense to standardise, but you can convert X/Y coordinates into an X index into the pixel memory using the class ScrollPhatHD(Matrix):
width = 17
height = 7
def _pixel_addr(self, x, y):
if x > 8:
x = x - 8
y = 6 - (y + 8)
else:
x = 8 - x
return x * 16 + y |
@Gadgetoid - see #188 - wip, but is working |
See https://shop.pimoroni.com/collections/raspberry-pi/products/scroll-phat-hd
The text was updated successfully, but these errors were encountered: