With the 8x8 bicolor backpack, is there a simple way using the python library to specify a color when lighting up an entire row (writeRowRaw)?
There is a class that lets you set the color on an individual pixel but I can't figure out an easy way to do an entire row without iterating over each pixel. Any help is appreciated.
8x8 Bicolor backpack Python question
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: 8x8 Bicolor backpack Python question
ColorEightByEight:setPixel calls setBufferRow, and computes the bit offset of a single pixel to set that color.
To do the entire row in one shot, you would call setBufferRow with the row number and a 16-bit value specifying the colors of all 8 pixels.
color 0 (off) is 0
color 1 is 0x00FF
color 2 is 0xFF00
color 3 is 0xFFFF
To do the entire row in one shot, you would call setBufferRow with the row number and a 16-bit value specifying the colors of all 8 pixels.
color 0 (off) is 0
color 1 is 0x00FF
color 2 is 0xFF00
color 3 is 0xFFFF
-
- Posts: 2
- Joined: Sun Oct 06, 2013 2:19 pm
Re: 8x8 Bicolor backpack Python question
Thank you. That's helpful. It might be a useful bit of info to include in the GitHub readme for the library or in the online tutorials.
Please be positive and constructive with your questions and comments.