Show RGB data on LEDs. Expected data = [(R, G, B), ...] where R, G and B are intensities of colors in range from 0 to 255. One RGB tuple for each LED. Count of tuples may be less than count of connected LEDs.
(self, data)
| 69 | self.show(self._rgblist) |
| 70 | |
| 71 | def show(self, data): |
| 72 | """ |
| 73 | Show RGB data on LEDs. Expected data = [(R, G, B), ...] where R, G and B |
| 74 | are intensities of colors in range from 0 to 255. One RGB tuple for each |
| 75 | LED. Count of tuples may be less than count of connected LEDs. |
| 76 | """ |
| 77 | for i in range(min(len(data),self.led_count)): |
| 78 | self.__setitem__(i,data[i]) |
| 79 | |
| 80 | self.fill_buf(data) |
| 81 | self.send_buf() |
| 82 | |
| 83 | def send_buf(self): |
| 84 | """ |
no test coverage detected