|
37 | 37 | # SOFTWARE. |
38 | 38 | #================================================================================== |
39 | 39 |
|
40 | | -# Define a function to Init a screen buffer that is setup for the sparkfun OLED. |
41 | | -# This is copied from the Arduino lib. |
42 | | -# Use http://en.radzio.dxp.pl/bitmap_converter/ to generate output |
43 | | -# Make sure the bitmap is n*8 pixels tall (pad white pixels to lower area as needed) |
44 | | -# Otherwise the bitmap bitmap_converter will compress some of the bytes together |
45 | | - |
46 | | -# # LCD Memory organised in 64 horizontal pixel and 6 (8 on large display) rows of byte |
47 | | -# B B .............B ----- |
48 | | -# y y .............y \ |
49 | | -# t t .............t \ |
50 | | -# e e .............e \ |
51 | | -# 0 1 .............63 \ |
52 | | -# \ |
53 | | -# D0 D0.............D0 \ |
54 | | -# D1 D1.............D1 / ROW 0 |
55 | | -# D2 D2.............D2 / |
56 | | -# D3 D3.............D3 / |
57 | | -# D4 D4.............D4 / |
58 | | -# D5 D5.............D5 / |
59 | | -# D6 D6.............D6 / |
60 | | -# D7 D7.............D7 ---- |
61 | | -# */ |
62 | | - |
63 | 40 |
|
64 | 41 | def add_logo(screenbuffer=None): |
| 42 | + """! |
| 43 | + Define a function to Init a screen buffer that is setup for the sparkfun OLED. |
| 44 | + This is copied from the Arduino lib. |
| 45 | + Use http://en.radzio.dxp.pl/bitmap_converter/ to generate output |
| 46 | + Make sure the bitmap is n*8 pixels tall (pad white pixels to lower area as needed) |
| 47 | + Otherwise the bitmap bitmap_converter will compress some of the bytes together |
65 | 48 |
|
| 49 | + # LCD Memory organised in 64 horizontal pixel and 6 (8 on large display) rows of byte |
| 50 | + """ |
| 51 | + |
| 52 | + # B B .............B ----- |
| 53 | + # y y .............y \ |
| 54 | + # t t .............t \ |
| 55 | + # e e .............e \ |
| 56 | + # 0 1 .............63 \ |
| 57 | + # \ |
| 58 | + # D0 D0.............D0 \ |
| 59 | + # D1 D1.............D1 / ROW 0 |
| 60 | + # D2 D2.............D2 / |
| 61 | + # D3 D3.............D3 / |
| 62 | + # D4 D4.............D4 / |
| 63 | + # D5 D5.............D5 / |
| 64 | + # D6 D6.............D6 / |
| 65 | + # D7 D7.............D7 ---- |
66 | 66 | if screenbuffer is None: |
67 | 67 | #return blank_screenbuffer = [0x00]*int(LCDWIDTH*LCDHEIGHT/8 + 1) #Blank Screen Area in bytes (Total Pixels/8 + 1) |
68 | 68 | print("Error: No input for screen buffer") |
|
0 commit comments