├── .gitattributes ├── .gitignore ├── README.md ├── examples ├── Example1_Text │ └── Example1_Text.ino ├── Example2_Graphics │ ├── Example2_Graphics.ino │ ├── che.h │ └── macaque.h ├── Example3_Lines │ └── Example3_Lines.ino ├── Example4_BMP_Eater │ ├── Che.bmp │ ├── Example4_BMP_Eater.ino │ ├── Monkey.bmp │ ├── gnome-tooTall.bmp │ ├── nyan-tooWide.bmp │ └── whiteBox.bmp ├── Example5_AllTheText │ └── Example5_AllTheText.ino ├── Example6_Pong │ └── Example6_Pong.ino ├── Example7_Logo │ └── Example7_Logo.ino └── Example9_NoiseDrawing │ └── Example9_NoiseDrawing.ino ├── keywords.txt ├── library.properties └── src ├── SSD1320_OLED.cpp ├── SSD1320_OLED.h └── util ├── 7segment.h ├── font5x7.h ├── font8x16.h └── fontlargenumber.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SparkFun Flexible OLED SSD1320 Arduino Library 2 | ======================================== 3 | 4 | ![SparkFun Micro OLED Breakout](https://cdn.sparkfun.com//assets/parts/1/2/6/6/6/Flexible-Grayscale-OLED-6.jpg) 5 | 6 | [*SparkFun Flexible Grayscale Display (SPX-14543)*](https://www.sparkfun.com/products/14543) 7 | 8 | An Arduino library that allows you to draw shapes and text on the SparkFun flexible grayscale OLED display. 9 | 10 | Repository Contents 11 | ------------------- 12 | 13 | * **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. 14 | * **/src** - Source files for the library (.cpp, .h). 15 | * **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE. 16 | * **library.properties** - General library properties for the Arduino package manager. 17 | 18 | Documentation 19 | -------------- 20 | 21 | * **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library. 22 | * **[Product Repository](https://github.com/sparkfunx/Flexible_Grayscale_OLED)** - Main repository (including hardware files) for the Flexible Grayscale OLED Breakout. 23 | 24 | Products That Use This Library 25 | --------------------------------- 26 | 27 | * [LCD-14606](https://www.sparkfun.com/products/14606) - SparkFun red version 28 | * [SPX-14543](https://www.sparkfun.com/products/14543) - SparkX version 29 | 30 | Version History 31 | --------------- 32 | * [V 1.0.0](https://github.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library/tree/V_1.0.0) - Initial release 33 | 34 | License Information 35 | ------------------- 36 | 37 | This product is _**open source**_! 38 | 39 | The **code** is released under the GPL v3 license. See the included LICENSE.md for more information. 40 | 41 | Distributed as-is; no warranty is given. 42 | 43 | - Your friends at SparkFun. 44 | -------------------------------------------------------------------------------- /examples/Example1_Text/Example1_Text.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | Basic 'hello world' example. 9 | 10 | To connect the display to an Arduino: 11 | (Arduino pin) = (Display pin) 12 | Pin 13 = SCLK on display carrier 13 | 11 = SDIN 14 | 10 = !CS 15 | 9 = !RES 16 | 17 | The display is 160 pixels long and 32 pixels wide 18 | Each 4-bit nibble is the 4-bit grayscale for that pixel 19 | Therefore each byte of data written to the display paints two sequential pixels 20 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 21 | */ 22 | 23 | #include 24 | 25 | //Initialize the display with the follow pin connections 26 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 27 | 28 | void setup() 29 | { 30 | Serial.begin(115200); 31 | 32 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 33 | 34 | flexibleOLED.clearDisplay(); //Clear display and buffer 35 | 36 | flexibleOLED.setFontType(1); //Large font 37 | flexibleOLED.setCursor(28, 12); 38 | flexibleOLED.print("Hello World!"); 39 | 40 | flexibleOLED.setFontType(0); //Small font 41 | flexibleOLED.setCursor(52, 0); 42 | flexibleOLED.print("8:45:03 AM"); 43 | 44 | flexibleOLED.display(); 45 | } 46 | 47 | void loop() 48 | { 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /examples/Example2_Graphics/Example2_Graphics.ino: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Control a SSD1320 based flexible OLED display 4 | By: Nathan Seidle 5 | SparkFun Electronics 6 | Date: November 21st, 2017 7 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 8 | 9 | The flexible OLED is grayscale meaning we can display some neat looking images. To do this 10 | we need grayscale information. This example takes the raw bytes from a header file and sends 11 | them to the display. Uncomment either macaque.h or che.h and upload the program to see 12 | the image on the OLED. 13 | 14 | The header files were generated using a python script. See for details: 15 | https://github.com/sparkfun/BMPtoArray 16 | 17 | To connect the display to an Arduino: 18 | (Arduino pin) = (Display pin) 19 | Pin 13 = SCLK on display carrier 20 | 11 = SDIN 21 | 10 = !CS 22 | 9 = !RES 23 | 24 | The display is 160 pixels long and 32 pixels wide 25 | Each 4-bit nibble is the 4-bit grayscale for that pixel 26 | Therefore each byte of data written to the display paints two sequential pixels 27 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 28 | */ 29 | 30 | #include 31 | #include "macaque.h" //Raw bytes of the Macaque monkey selfie 32 | //#include "che.h" //Raw bytes of the comic che 33 | 34 | //Initialize the display with the follow pin connections 35 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 36 | 37 | void setup() 38 | { 39 | Serial.begin(115200); 40 | 41 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 42 | 43 | flexibleOLED.clearDisplay(); //Clear display and buffer 44 | 45 | flexibleOLED.setRowAddress(0); 46 | flexibleOLED.setColumnAddress(0); 47 | 48 | //Send the bytes from program memory to OLED display 49 | for (int i = 0 ; i < sizeof(myGraphic) ; i++) 50 | { 51 | byte theByte = pgm_read_byte(myGraphic + i); 52 | flexibleOLED.data(theByte); //Write byte directly to display 53 | } 54 | } 55 | 56 | void loop() 57 | { 58 | 59 | } 60 | -------------------------------------------------------------------------------- /examples/Example2_Graphics/che.h: -------------------------------------------------------------------------------- 1 | /* This was generated using the SparkFun BMPtoArray python script 2 | See https://github.com/sparkfun/BMPtoArray for more info */ 3 | 4 | static const unsigned char myGraphic[2560] PROGMEM = { 5 | 0xf, 0xf0, 0x44, 0x44, 0x44, 0x44, 6 | 0x84, 0xa9, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 7 | 0xaa, 0x6a, 0x44, 0x44, 0x54, 0xa9, 0xaa, 0xaa, 8 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x6a, 0x25, 0x22, 9 | 0x22, 0x23, 0xb9, 0x4b, 0xa2, 0x7b, 0x11, 0x71, 10 | 0x28, 0xc8, 0x7c, 0x82, 0xcc, 0xcc, 0xcc, 0xcc, 11 | 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xdd, 0xdd, 0xdd, 12 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x6d, 13 | 0x33, 0x33, 0x93, 0xaa, 0xaa, 0xaa, 0x99, 0x99, 14 | 0x99, 0xa9, 0xbb, 0xbb, 0xbb, 0xbb, 0x49, 0x44, 15 | 0x44, 0x44, 0x32, 0x44, 0x44, 0x44, 0x44, 0x44, 16 | 0x84, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 17 | 0xaa, 0x6a, 0x44, 0x54, 0x54, 0xa9, 0xaa, 0xaa, 18 | 0xaa, 0xaa, 0xaa, 0xaa, 0xba, 0x6a, 0x25, 0x22, 19 | 0x22, 0x78, 0xbb, 0x9b, 0xb8, 0x7c, 0x12, 0x72, 20 | 0x49, 0xc9, 0xac, 0xa5, 0xcc, 0xcc, 0xcc, 0xcc, 21 | 0xcc, 0xcc, 0xcc, 0xdc, 0xdd, 0xdd, 0xdd, 0xdd, 22 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x6d, 23 | 0x33, 0x33, 0x94, 0xaa, 0xaa, 0xaa, 0xa9, 0xaa, 24 | 0x9a, 0xa9, 0xbb, 0xbb, 0xbb, 0xbb, 0x48, 0x44, 25 | 0x43, 0x44, 0x32, 0x44, 0x44, 0x44, 0x44, 0x44, 26 | 0x84, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x99, 27 | 0x99, 0x59, 0x44, 0x44, 0x54, 0x88, 0x88, 0x88, 28 | 0x88, 0x77, 0x77, 0x77, 0xb8, 0x5a, 0x25, 0x22, 29 | 0x22, 0xba, 0x3a, 0xc6, 0xcb, 0x7c, 0x22, 0x72, 30 | 0xcc, 0x7c, 0xc6, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 31 | 0xcc, 0xcc, 0xcc, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 32 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x6d, 33 | 0x33, 0x33, 0x94, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 34 | 0xaa, 0xb9, 0xbb, 0xbb, 0xbb, 0xbb, 0x46, 0x44, 35 | 0x44, 0x44, 0x32, 0x44, 0x44, 0x44, 0x44, 0x44, 36 | 0x74, 0x9a, 0x66, 0x56, 0x55, 0x55, 0x55, 0x45, 37 | 0x55, 0x55, 0x54, 0x44, 0x54, 0x55, 0x55, 0x55, 38 | 0x55, 0x55, 0x55, 0x55, 0xb8, 0x5a, 0x25, 0x22, 39 | 0x22, 0xba, 0x3a, 0xc7, 0xcc, 0x8c, 0x22, 0x72, 40 | 0xcc, 0x3b, 0xb3, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 41 | 0xcc, 0xcc, 0xdc, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 42 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0x5d, 43 | 0x33, 0x33, 0x94, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 44 | 0xaa, 0xaa, 0xbb, 0xbb, 0xbb, 0xab, 0x44, 0x44, 45 | 0x44, 0x44, 0x32, 0x44, 0x44, 0x44, 0x44, 0x44, 46 | 0x64, 0x9a, 0x45, 0x44, 0x44, 0x44, 0x44, 0x44, 47 | 0x44, 0x44, 0x44, 0x45, 0x55, 0x55, 0x55, 0x55, 48 | 0x55, 0x55, 0x55, 0x55, 0xba, 0x59, 0x25, 0x22, 49 | 0x22, 0x78, 0xbb, 0x9c, 0xb6, 0xac, 0x22, 0x72, 50 | 0xac, 0xac, 0xca, 0xc9, 0xcc, 0xcc, 0xcc, 0xcc, 51 | 0xcc, 0xdc, 0xdc, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 52 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x4d, 53 | 0x33, 0x33, 0x94, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 54 | 0xaa, 0xba, 0xbb, 0xbb, 0xbb, 0x8b, 0x44, 0x44, 55 | 0x44, 0x44, 0x32, 0x44, 0x44, 0x44, 0x44, 0x44, 56 | 0x54, 0xaa, 0x46, 0x44, 0x44, 0x44, 0x44, 0x44, 57 | 0x44, 0x44, 0x55, 0x55, 0x54, 0x55, 0x55, 0x55, 58 | 0x55, 0x55, 0x55, 0x65, 0xba, 0x57, 0x25, 0x22, 59 | 0x22, 0x23, 0xc9, 0x5c, 0xa2, 0xcc, 0x25, 0x72, 60 | 0x29, 0xc7, 0x8c, 0x72, 0xcc, 0xcc, 0xcc, 0xcc, 61 | 0xcc, 0xdc, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 62 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0x4c, 63 | 0x33, 0x33, 0xa4, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 64 | 0xaa, 0xba, 0xbb, 0xbb, 0xbb, 0x5a, 0x44, 0x44, 65 | 0x44, 0x44, 0x31, 0x44, 0x44, 0x44, 0x44, 0x44, 66 | 0x54, 0xa9, 0x47, 0x44, 0x44, 0x44, 0x44, 0x44, 67 | 0x44, 0x44, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 68 | 0x55, 0x55, 0x55, 0x85, 0xbb, 0x56, 0x25, 0x22, 69 | 0x22, 0x89, 0xbb, 0xab, 0xc9, 0xcc, 0x4b, 0x72, 70 | 0x4a, 0xc9, 0xbc, 0xa6, 0xcc, 0xcc, 0xcc, 0xcc, 71 | 0xdc, 0xcc, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 72 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0x4b, 73 | 0x33, 0x33, 0xa5, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 74 | 0xaa, 0xbb, 0xbb, 0xbb, 0xbb, 0x47, 0x44, 0x44, 75 | 0x43, 0x44, 0x22, 0x44, 0x44, 0x44, 0x44, 0x44, 76 | 0x44, 0xa8, 0x48, 0x44, 0x44, 0x44, 0x44, 0x44, 77 | 0x44, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 78 | 0x55, 0x55, 0x55, 0xa6, 0x9b, 0x55, 0x25, 0x22, 79 | 0x22, 0xca, 0x3a, 0xc6, 0xcc, 0xcc, 0xcc, 0xa9, 80 | 0xcc, 0x7c, 0xc6, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 81 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 82 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0x3a, 83 | 0x33, 0x33, 0xa5, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 84 | 0xaa, 0xbb, 0xbb, 0xbb, 0x9b, 0x44, 0x44, 0x44, 85 | 0x44, 0x44, 0x21, 0x44, 0x44, 0x44, 0x44, 0x44, 86 | 0x44, 0xa6, 0x5a, 0x44, 0x44, 0x44, 0x44, 0x54, 87 | 0x55, 0x55, 0x55, 0x55, 0x65, 0x66, 0x76, 0x77, 88 | 0x77, 0x87, 0x88, 0xb9, 0x7b, 0x55, 0x25, 0x22, 89 | 0x22, 0xca, 0x4b, 0xc7, 0xcc, 0xcc, 0xcc, 0xcc, 90 | 0xcc, 0x4c, 0xc3, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 91 | 0xcc, 0x7a, 0x45, 0x54, 0x96, 0xdc, 0xdd, 0xdd, 92 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xee, 0x39, 93 | 0x33, 0x33, 0xa6, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 94 | 0xba, 0xbb, 0xbb, 0xbb, 0x5a, 0x44, 0x44, 0x64, 95 | 0x44, 0x44, 0x22, 0x44, 0x44, 0x44, 0x44, 0x44, 96 | 0x44, 0x95, 0x9a, 0x88, 0x88, 0x99, 0x99, 0xa9, 97 | 0xaa, 0xaa, 0xaa, 0xaa, 0xab, 0xbb, 0xbb, 0xbb, 98 | 0xbb, 0xbb, 0xbb, 0xbb, 0x5a, 0x55, 0x25, 0x22, 99 | 0x22, 0x68, 0xcb, 0x9c, 0xb6, 0xcc, 0xcc, 0xcc, 100 | 0xac, 0xbc, 0xcb, 0xb9, 0xcc, 0xcc, 0xcc, 0xcc, 101 | 0x48, 0x22, 0x32, 0x23, 0x33, 0x73, 0xdc, 0xdd, 102 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xde, 0x37, 103 | 0x33, 0x33, 0xa7, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 104 | 0xaa, 0xbb, 0xbb, 0xab, 0x45, 0x44, 0x44, 0x66, 105 | 0x44, 0x44, 0x22, 0x44, 0x44, 0x44, 0x44, 0x44, 106 | 0x44, 0x64, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 107 | 0xaa, 0xaa, 0xaa, 0xba, 0xbb, 0xaa, 0xaa, 0xaa, 108 | 0xaa, 0xaa, 0xb9, 0xbb, 0x57, 0x55, 0x25, 0x22, 109 | 0x22, 0x23, 0xc9, 0x5c, 0xa2, 0xcc, 0xcc, 0xcc, 110 | 0x29, 0xc7, 0x9c, 0x72, 0xcc, 0xcc, 0xcc, 0x6c, 111 | 0x22, 0x22, 0x22, 0x22, 0x32, 0x33, 0xc5, 0xdd, 112 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xde, 0x35, 113 | 0x33, 0x33, 0xa7, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 114 | 0xaa, 0xbb, 0xbb, 0xab, 0x45, 0x44, 0x54, 0x68, 115 | 0x44, 0x44, 0x12, 0x43, 0x44, 0x44, 0x44, 0x44, 116 | 0x44, 0x54, 0xa9, 0x8a, 0x88, 0x78, 0x77, 0x67, 117 | 0x66, 0xa6, 0xba, 0xbb, 0x9b, 0x55, 0x55, 0x55, 118 | 0x55, 0x55, 0xb7, 0x9b, 0x55, 0x55, 0x25, 0x22, 119 | 0x22, 0x89, 0xbc, 0xbb, 0xca, 0xcc, 0xcc, 0xcc, 120 | 0x5b, 0xc9, 0xbc, 0xa6, 0xcc, 0xcc, 0xcc, 0x28, 121 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x33, 0x73, 0xdd, 122 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0xde, 0x34, 123 | 0x33, 0x33, 0xa8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 124 | 0xaa, 0xbb, 0xbb, 0xbb, 0x46, 0x44, 0x74, 0x68, 125 | 0x44, 0x44, 0x12, 0x43, 0x44, 0x44, 0x44, 0x44, 126 | 0x44, 0x44, 0xa6, 0x8a, 0x45, 0x55, 0x44, 0x54, 127 | 0x55, 0xa5, 0xaa, 0xbb, 0x9b, 0x55, 0x55, 0x55, 128 | 0x55, 0x65, 0xbb, 0x6a, 0x55, 0x55, 0x25, 0x22, 129 | 0x22, 0xb4, 0x3b, 0xc5, 0xcc, 0xcc, 0xcc, 0xcc, 130 | 0xcc, 0x8c, 0xc5, 0xcc, 0xcc, 0xdc, 0xdd, 0x25, 131 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x33, 0x43, 0xdd, 132 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xce, 0x33, 133 | 0x33, 0x43, 0xa9, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 134 | 0xaa, 0xbb, 0xbb, 0xbb, 0x47, 0x34, 0x74, 0x68, 135 | 0x44, 0x44, 0x11, 0x32, 0x44, 0x44, 0x44, 0x44, 136 | 0x44, 0x44, 0x74, 0xaa, 0x58, 0x54, 0x44, 0x55, 137 | 0x55, 0xa5, 0xbb, 0xbb, 0x9b, 0x55, 0x55, 0x55, 138 | 0x55, 0xa6, 0xbb, 0x57, 0x55, 0x55, 0x35, 0x22, 139 | 0x22, 0x32, 0x59, 0xc7, 0xcc, 0xcc, 0xcc, 0xcc, 140 | 0xcc, 0x5c, 0xb3, 0xcc, 0xdd, 0xdd, 0xdd, 0x25, 141 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x33, 0x53, 0xdd, 142 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xae, 0x33, 143 | 0x33, 0x43, 0xa9, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 144 | 0xba, 0xbb, 0xbb, 0xbb, 0x48, 0x33, 0x74, 0x68, 145 | 0x44, 0x44, 0x11, 0x11, 0x32, 0x44, 0x44, 0x44, 146 | 0x44, 0x44, 0x54, 0xa8, 0x9a, 0x55, 0x45, 0x45, 147 | 0x55, 0xa5, 0xaa, 0xaa, 0x8a, 0x55, 0x55, 0x55, 148 | 0x75, 0xba, 0x8b, 0x55, 0x55, 0x55, 0x45, 0x22, 149 | 0x22, 0x22, 0x93, 0x9c, 0xb5, 0xcc, 0xcc, 0xcc, 150 | 0xac, 0xcc, 0xdb, 0xdd, 0xdd, 0xdd, 0xdd, 0x29, 151 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x33, 0x93, 0xdd, 152 | 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0xee, 0x8e, 0x33, 153 | 0x33, 0x53, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 154 | 0xaa, 0xba, 0xbb, 0xbb, 0x48, 0x33, 0x74, 0x58, 155 | 0x44, 0x44, 0x11, 0x11, 0x11, 0x42, 0x44, 0x44, 156 | 0x44, 0x44, 0x44, 0x95, 0xaa, 0x69, 0x55, 0x55, 157 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 158 | 0xb8, 0xbb, 0x58, 0x55, 0x55, 0x55, 0x55, 0x24, 159 | 0x22, 0x22, 0x22, 0x69, 0xa2, 0xcc, 0xcc, 0xcc, 160 | 0x3a, 0xc6, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x7d, 161 | 0x23, 0x22, 0x22, 0x22, 0x33, 0x33, 0xd8, 0xdd, 162 | 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0xee, 0x7e, 0x33, 163 | 0x33, 0x53, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 164 | 0xba, 0xbb, 0xbb, 0xbb, 0x37, 0x33, 0x74, 0x58, 165 | 0x43, 0x44, 0x57, 0x12, 0x11, 0x21, 0x44, 0x44, 166 | 0x44, 0x44, 0x44, 0x54, 0xa9, 0xaa, 0x58, 0x55, 167 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x96, 168 | 0xbb, 0x7b, 0x55, 0x55, 0x55, 0x55, 0x55, 0x45, 169 | 0x22, 0x22, 0x22, 0x82, 0xca, 0xcc, 0xcc, 0xcc, 170 | 0x6c, 0xd9, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 171 | 0x5a, 0x33, 0x32, 0x33, 0x33, 0xb6, 0xdd, 0xdd, 172 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0x5d, 0x33, 173 | 0x33, 0x63, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 174 | 0xba, 0xbb, 0xbb, 0xab, 0x35, 0x33, 0x74, 0x58, 175 | 0x33, 0x44, 0x99, 0x58, 0x11, 0x11, 0x42, 0x44, 176 | 0x44, 0x44, 0x44, 0x44, 0x85, 0xaa, 0xaa, 0x57, 177 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x86, 0xbb, 178 | 0xab, 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 179 | 0x12, 0x22, 0x22, 0x22, 0xc8, 0xcc, 0xcc, 0xcd, 180 | 0xcd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 181 | 0xdd, 0x9c, 0x78, 0x87, 0xca, 0xdd, 0xdd, 0xdd, 182 | 0xdd, 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0x4d, 0x33, 183 | 0x33, 0x73, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 184 | 0xba, 0xbb, 0xbb, 0x9b, 0x34, 0x33, 0x85, 0x58, 185 | 0x33, 0x44, 0x99, 0x99, 0x16, 0x11, 0x21, 0x44, 186 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x96, 0xaa, 0xab, 187 | 0x79, 0x55, 0x55, 0x55, 0x65, 0x97, 0xbb, 0xbb, 188 | 0x58, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 189 | 0x22, 0x22, 0x12, 0x22, 0x72, 0xcc, 0xcc, 0xdc, 190 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 191 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 192 | 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0xee, 0x3b, 0x33, 193 | 0x33, 0x93, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 194 | 0xaa, 0xba, 0xbb, 0x5a, 0x33, 0x43, 0x86, 0x47, 195 | 0x33, 0x33, 0x68, 0x34, 0x12, 0x11, 0x11, 0x11, 196 | 0x11, 0x21, 0x22, 0x33, 0x44, 0x54, 0xa7, 0xbb, 197 | 0xbb, 0xab, 0x9a, 0xa9, 0xba, 0xbb, 0xbb, 0x69, 198 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 199 | 0x22, 0x22, 0x12, 0x22, 0x22, 0xc6, 0xcc, 0xdc, 200 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 201 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 202 | 0xdd, 0xdd, 0xdd, 0xdd, 0xee, 0xee, 0x3a, 0x33, 203 | 0x33, 0x94, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 204 | 0xaa, 0xaa, 0xab, 0x36, 0x33, 0x43, 0x77, 0x47, 205 | 0x33, 0x33, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 206 | 0x11, 0x11, 0x11, 0x11, 0x21, 0x32, 0x54, 0x86, 207 | 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0x9b, 0x68, 0x55, 208 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 209 | 0x22, 0x22, 0x21, 0x22, 0x22, 0x52, 0xdc, 0xdd, 210 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 211 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 212 | 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xee, 0x38, 0x33, 213 | 0x33, 0xa5, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 214 | 0xaa, 0xaa, 0x5a, 0x33, 0x33, 0x63, 0x78, 0x47, 215 | 0x33, 0x33, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 216 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x43, 217 | 0x65, 0x87, 0x88, 0x88, 0x67, 0x55, 0x55, 0x55, 218 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 219 | 0x12, 0x11, 0x22, 0x22, 0x22, 0x22, 0xc5, 0xdd, 220 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 221 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 222 | 0xdd, 0xdd, 0xdd, 0xee, 0xee, 0xee, 0x36, 0x33, 223 | 0x33, 0xa6, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 224 | 0xaa, 0x7a, 0x34, 0x33, 0x33, 0x74, 0x87, 0x47, 225 | 0x33, 0x33, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 226 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 227 | 0x32, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 228 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 229 | 0x22, 0x21, 0x22, 0x12, 0x22, 0x22, 0x42, 0xdb, 230 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 231 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 232 | 0xdd, 0xdd, 0xed, 0xee, 0xee, 0xde, 0x34, 0x33, 233 | 0x33, 0xa7, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 234 | 0xaa, 0x46, 0x33, 0x33, 0x43, 0x77, 0x77, 0x37, 235 | 0x33, 0x33, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 236 | 0x11, 0x55, 0x45, 0x23, 0x11, 0x11, 0x11, 0x11, 237 | 0x11, 0x32, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 238 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x45, 239 | 0x11, 0x11, 0x11, 0x12, 0x22, 0x22, 0x22, 0xb4, 240 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 241 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 242 | 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xce, 0x34, 0x33, 243 | 0x33, 0xa8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 244 | 0xaa, 0x34, 0x33, 0x33, 0x74, 0x77, 0x77, 0x37, 245 | 0x33, 0x33, 0x21, 0x43, 0x76, 0x88, 0x13, 0x11, 246 | 0x11, 0x73, 0x77, 0x77, 0x56, 0x23, 0x11, 0x11, 247 | 0x11, 0x11, 0x42, 0x55, 0x55, 0x55, 0x55, 0x55, 248 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x25, 249 | 0x11, 0x12, 0x11, 0x21, 0x11, 0x22, 0x22, 0x32, 250 | 0xdb, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 251 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 252 | 0xdd, 0xdd, 0xdd, 0xed, 0xee, 0xbe, 0x33, 0x33, 253 | 0x43, 0xa9, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 254 | 0x8a, 0x33, 0x33, 0x53, 0x77, 0x77, 0x77, 0x36, 255 | 0x33, 0x43, 0x87, 0x99, 0x99, 0x99, 0x28, 0x11, 256 | 0x11, 0x51, 0x77, 0x77, 0x77, 0x77, 0x46, 0x12, 257 | 0x11, 0x11, 0x21, 0x53, 0x55, 0x55, 0x55, 0x55, 258 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x24, 259 | 0x12, 0x11, 0x11, 0x21, 0x12, 0x22, 0x22, 0x22, 260 | 0xa3, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 261 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 262 | 0xdd, 0xdd, 0xdd, 0xee, 0xed, 0x9e, 0x33, 0x33, 263 | 0x53, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 264 | 0x5a, 0x33, 0x33, 0x76, 0x77, 0x77, 0x77, 0x36, 265 | 0x33, 0x43, 0x99, 0x99, 0x99, 0x99, 0x79, 0x11, 266 | 0x11, 0x21, 0x76, 0x77, 0x77, 0x77, 0x77, 0x57, 267 | 0x13, 0x11, 0x11, 0x21, 0x54, 0x55, 0x55, 0x55, 268 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x23, 269 | 0x11, 0x11, 0x11, 0x22, 0x11, 0x12, 0x22, 0x22, 270 | 0x32, 0xd9, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 271 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 272 | 0xdd, 0xdd, 0xdd, 0xed, 0xed, 0x7e, 0x33, 0x33, 273 | 0x63, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 274 | 0x49, 0x33, 0x43, 0x77, 0x77, 0x77, 0x77, 0x35, 275 | 0x33, 0x43, 0x99, 0x99, 0x99, 0x99, 0x99, 0x15, 276 | 0x11, 0x11, 0x73, 0x77, 0x77, 0x77, 0x77, 0x87, 277 | 0x57, 0x12, 0x11, 0x11, 0x42, 0x55, 0x55, 0x55, 278 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x45, 0x12, 279 | 0x11, 0x11, 0x11, 0x11, 0x21, 0x21, 0x22, 0x22, 280 | 0x22, 0x92, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 281 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 282 | 0xdd, 0xdd, 0xdd, 0xed, 0xed, 0x5d, 0x33, 0x33, 283 | 0x83, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 284 | 0x36, 0x33, 0x43, 0x77, 0x77, 0x77, 0x77, 0x35, 285 | 0x33, 0x43, 0x99, 0x99, 0x99, 0x99, 0x99, 0x38, 286 | 0x11, 0x11, 0x51, 0x77, 0x77, 0x77, 0x77, 0x77, 287 | 0x88, 0x47, 0x12, 0x11, 0x21, 0x54, 0x55, 0x55, 288 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x25, 0x11, 289 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x22, 290 | 0x22, 0x22, 0xd8, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 291 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 292 | 0xdd, 0xdd, 0xdd, 0xed, 0xdd, 0x4d, 0x33, 0x33, 293 | 0x94, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x9a, 294 | 0x34, 0x33, 0x63, 0x77, 0x77, 0x77, 0x77, 0x34, 295 | 0x33, 0x53, 0x99, 0x99, 0x99, 0x99, 0x99, 0x79, 296 | 0x11, 0x11, 0x21, 0x77, 0x77, 0x77, 0x77, 0x77, 297 | 0x88, 0x88, 0x26, 0x11, 0x11, 0x42, 0x55, 0x55, 298 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x24, 0x11, 299 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x11, 0x22, 300 | 0x22, 0x22, 0x72, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 301 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 302 | 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x3b, 0x33, 0x33, 303 | 0xa5, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x5a, 304 | 0x33, 0x33, 0x74, 0x77, 0x77, 0x77, 0x77, 0x34, 305 | 0x33, 0x63, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 306 | 0x14, 0x11, 0x11, 0x74, 0x77, 0x77, 0x77, 0x77, 307 | 0x88, 0x88, 0x78, 0x13, 0x11, 0x22, 0x55, 0x55, 308 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x22, 0x11, 309 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x12, 0x22, 310 | 0x22, 0x22, 0x22, 0x65, 0x56, 0x55, 0x55, 0x55, 311 | 0x55, 0x55, 0x45, 0x44, 0x44, 0x44, 0x44, 0x44, 312 | 0x44, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 313 | 0xa6, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x37, 314 | 0x33, 0x33, 0x76, 0x77, 0x77, 0x77, 0x77, 0x33, 315 | 0x33, 0x63, 0x99, 0x99, 0x99, 0x99, 0x89, 0x46, 316 | 0x12, 0x11, 0x11, 0x31, 0x75, 0x77, 0x77, 0x87, 317 | 0x88, 0x88, 0x88, 0x37, 0x11, 0x21, 0x53, 0x55, 318 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x35, 0x22, 0x11, 319 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x22, 320 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 321 | 0x22, 0x22, 0x22, 0x32, 0x32, 0x33, 0x33, 0x33, 322 | 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 323 | 0xa8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x9a, 0x34, 324 | 0x33, 0x43, 0x77, 0x77, 0x87, 0x99, 0x89, 0x34, 325 | 0x33, 0x84}; 326 | -------------------------------------------------------------------------------- /examples/Example2_Graphics/macaque.h: -------------------------------------------------------------------------------- 1 | /* 2 | This is grayscale information to show a static image on the display. 3 | 4 | We have 160 pixels. Each pixel is 4-bit so we have 80 bytes wide. 5 | Display is 32 rows tall so 32 * 80 = 2,560 bytes to write. 6 | 7 | Grayscale image of a macaque monkey taken by David Slater. 8 | 9 | More information here: https://www.sparkfun.com/sparkx/blog/2543 10 | 11 | This was generated using the SparkFun BMPtoArray python script 12 | See https://github.com/sparkfun/BMPtoArray for more info 13 | */ 14 | #include 15 | 16 | static const unsigned char myGraphic[2560] PROGMEM = { 17 | 0x97, 0xcb, 0xdd, 0xbc, 0xab, 0x99, 18 | 0x78, 0x78, 0x66, 0x55, 0x76, 0xa7, 0xab, 0x78, 19 | 0x55, 0x76, 0x13, 0x11, 0x12, 0x22, 0x34, 0x44, 20 | 0x67, 0x75, 0x78, 0x99, 0x9a, 0xa8, 0x9b, 0x8a, 21 | 0x99, 0xba, 0xbb, 0xcc, 0xcc, 0xbb, 0xab, 0xa9, 22 | 0xba, 0xaa, 0xbb, 0xab, 0xbb, 0x9a, 0xbb, 0x79, 23 | 0xb5, 0x8c, 0x66, 0x44, 0x34, 0x42, 0x75, 0x45, 24 | 0x44, 0x32, 0x43, 0x55, 0x66, 0x56, 0x12, 0x21, 25 | 0x75, 0x74, 0x37, 0x12, 0x11, 0x11, 0x11, 0x12, 26 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1, 27 | 0x0, 0x0, 0x86, 0xcb, 0xcc, 0xac, 0xaa, 0xaa, 28 | 0x89, 0x99, 0x89, 0x77, 0x67, 0xa6, 0xbc, 0x57, 29 | 0x43, 0x56, 0x24, 0x11, 0x12, 0x21, 0x23, 0x33, 30 | 0x55, 0x44, 0x56, 0x65, 0x77, 0x88, 0x98, 0x8a, 31 | 0x78, 0x9a, 0xa9, 0xaa, 0xbb, 0xba, 0xab, 0xba, 32 | 0xbb, 0xbb, 0xbb, 0xab, 0xcb, 0x9b, 0x9a, 0x46, 33 | 0xb4, 0x9c, 0x67, 0x36, 0x33, 0x56, 0x45, 0x54, 34 | 0x23, 0x32, 0x44, 0x55, 0x76, 0x67, 0x13, 0x64, 35 | 0x87, 0x84, 0x37, 0x12, 0x11, 0x11, 0x21, 0x11, 36 | 0x22, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x12, 37 | 0x0, 0x0, 0x76, 0xba, 0xbb, 0x9b, 0x99, 0xa9, 38 | 0x99, 0x99, 0x99, 0x99, 0x78, 0xc8, 0xad, 0x48, 39 | 0x23, 0x45, 0x23, 0x22, 0x22, 0x21, 0x23, 0x23, 40 | 0x44, 0x44, 0x56, 0x56, 0x56, 0x66, 0x75, 0x86, 41 | 0x77, 0x88, 0x78, 0xca, 0x9b, 0xaa, 0xa9, 0xaa, 42 | 0xaa, 0xbb, 0xcb, 0xbb, 0xcb, 0xab, 0x79, 0x13, 43 | 0xa2, 0x9b, 0x77, 0x45, 0x44, 0x36, 0x33, 0x23, 44 | 0x33, 0x34, 0x54, 0x65, 0x77, 0x67, 0x13, 0x97, 45 | 0x89, 0x95, 0x36, 0x12, 0x11, 0x11, 0x11, 0x21, 46 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x11, 47 | 0x1, 0x0, 0x76, 0x98, 0xaa, 0x89, 0x88, 0xa9, 48 | 0x9a, 0xaa, 0x99, 0x78, 0x76, 0xa7, 0x9c, 0x59, 49 | 0x24, 0x43, 0x24, 0x22, 0x22, 0x21, 0x22, 0x22, 50 | 0x22, 0x33, 0x55, 0x56, 0x66, 0x55, 0x55, 0x55, 51 | 0x55, 0x66, 0x77, 0xc9, 0x9a, 0x9b, 0xaa, 0xba, 52 | 0xab, 0xaa, 0xcb, 0xbc, 0xcc, 0xab, 0x59, 0x2, 53 | 0x80, 0x8a, 0x98, 0x66, 0x46, 0x44, 0x23, 0x43, 54 | 0x24, 0x43, 0x54, 0x76, 0x88, 0x77, 0x14, 0x98, 55 | 0x78, 0xa5, 0x47, 0x12, 0x11, 0x11, 0x11, 0x11, 56 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x11, 57 | 0x0, 0x0, 0x67, 0x76, 0x88, 0x88, 0x99, 0x99, 58 | 0xa9, 0x99, 0x88, 0x78, 0x66, 0xa7, 0xac, 0x69, 59 | 0x16, 0x51, 0x33, 0x21, 0x22, 0x21, 0x11, 0x11, 60 | 0x11, 0x22, 0x33, 0x43, 0x96, 0x99, 0x99, 0x77, 61 | 0x76, 0x77, 0x88, 0x68, 0x96, 0x87, 0xa9, 0xbb, 62 | 0x9a, 0x98, 0xba, 0xcc, 0xbc, 0x9a, 0x47, 0x1, 63 | 0x81, 0x9a, 0xa9, 0x68, 0x46, 0x56, 0x55, 0x34, 64 | 0x44, 0x55, 0x65, 0x87, 0x88, 0x78, 0x24, 0x98, 65 | 0x79, 0xa5, 0x37, 0x12, 0x11, 0x11, 0x21, 0x11, 66 | 0x21, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1, 67 | 0x0, 0x0, 0x77, 0x66, 0x76, 0x98, 0xa9, 0x9a, 68 | 0x89, 0x88, 0x87, 0x88, 0x88, 0xb9, 0xbd, 0x6a, 69 | 0x26, 0x41, 0x23, 0x21, 0x12, 0x21, 0x11, 0x11, 70 | 0x21, 0x22, 0x43, 0x44, 0x85, 0xab, 0x99, 0x98, 71 | 0xaa, 0x89, 0x89, 0x8a, 0x77, 0x96, 0xaa, 0x9b, 72 | 0x89, 0x98, 0xb9, 0xbb, 0xbb, 0x8a, 0x36, 0x1, 73 | 0x92, 0xaa, 0x99, 0x57, 0x46, 0x65, 0x66, 0x34, 74 | 0x32, 0x54, 0x76, 0x88, 0x88, 0x78, 0x25, 0xa7, 75 | 0x89, 0xa5, 0x36, 0x11, 0x11, 0x11, 0x12, 0x11, 76 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1, 77 | 0x0, 0x0, 0x77, 0x77, 0x77, 0x98, 0xbb, 0xaa, 78 | 0x88, 0x88, 0x88, 0x89, 0x98, 0xb9, 0xcc, 0x69, 79 | 0x25, 0x22, 0x22, 0x21, 0x11, 0x11, 0x11, 0x11, 80 | 0x22, 0x22, 0x33, 0x64, 0x53, 0xa9, 0x9b, 0x76, 81 | 0xb9, 0xab, 0xa9, 0x88, 0x99, 0x77, 0x99, 0x87, 82 | 0x88, 0x99, 0xa9, 0x99, 0xaa, 0x89, 0x36, 0x20, 83 | 0xa5, 0xab, 0x98, 0x56, 0x67, 0x33, 0x45, 0x12, 84 | 0x21, 0x54, 0x76, 0x88, 0x99, 0x88, 0x35, 0xa8, 85 | 0x8a, 0xa5, 0x35, 0x12, 0x11, 0x11, 0x11, 0x11, 86 | 0x11, 0x11, 0x11, 0x21, 0x11, 0x11, 0x11, 0x11, 87 | 0x0, 0x0, 0x77, 0x77, 0x76, 0xa8, 0xcb, 0xac, 88 | 0x78, 0x89, 0x77, 0x98, 0x79, 0xa8, 0xbc, 0x57, 89 | 0x23, 0x12, 0x22, 0x11, 0x11, 0x11, 0x11, 0x21, 90 | 0x22, 0x22, 0x32, 0x22, 0x31, 0x86, 0xab, 0x89, 91 | 0x78, 0xaa, 0xbb, 0xa9, 0xa9, 0x89, 0x88, 0x99, 92 | 0x88, 0x87, 0x89, 0x98, 0x87, 0x77, 0x24, 0x52, 93 | 0xa9, 0xab, 0x99, 0x67, 0x88, 0x67, 0x43, 0x55, 94 | 0x34, 0x66, 0x87, 0x98, 0x99, 0x89, 0x34, 0xa9, 95 | 0x6a, 0x95, 0x35, 0x11, 0x11, 0x12, 0x21, 0x12, 96 | 0x12, 0x11, 0x12, 0x11, 0x11, 0x21, 0x12, 0x11, 97 | 0x0, 0x0, 0x77, 0x66, 0x66, 0xa8, 0xcc, 0xbc, 98 | 0x89, 0x88, 0x88, 0x88, 0x88, 0xa8, 0xbb, 0x47, 99 | 0x24, 0x11, 0x12, 0x11, 0x1, 0x1, 0x11, 0x22, 100 | 0x22, 0x32, 0x22, 0x12, 0x11, 0x53, 0xba, 0x9a, 101 | 0x68, 0x95, 0xa8, 0xbb, 0x99, 0xaa, 0x9a, 0x89, 102 | 0x88, 0x66, 0x97, 0x88, 0x78, 0x45, 0x13, 0x96, 103 | 0xba, 0xab, 0x99, 0x67, 0x66, 0x34, 0x44, 0x23, 104 | 0x42, 0x65, 0x87, 0x99, 0x99, 0x68, 0x44, 0xa8, 105 | 0x49, 0xa5, 0x24, 0x12, 0x11, 0x21, 0x11, 0x11, 106 | 0x22, 0x12, 0x11, 0x11, 0x11, 0x11, 0x12, 0x11, 107 | 0x0, 0x0, 0x78, 0x66, 0x77, 0xa8, 0xcb, 0xcc, 108 | 0x9b, 0x99, 0x99, 0x89, 0x98, 0xb9, 0xad, 0x48, 109 | 0x12, 0x11, 0x11, 0x11, 0x11, 0x10, 0x11, 0x32, 110 | 0x22, 0x34, 0x12, 0x1, 0x11, 0x42, 0x96, 0xaa, 111 | 0x8a, 0x76, 0x77, 0x9a, 0xa9, 0x9a, 0xb9, 0xaa, 112 | 0x7a, 0x96, 0xac, 0x77, 0x9a, 0x13, 0x31, 0xa9, 113 | 0xab, 0x9a, 0x89, 0x65, 0x47, 0x54, 0x34, 0x34, 114 | 0x31, 0x55, 0x87, 0x98, 0x89, 0x47, 0x54, 0x65, 115 | 0x46, 0x95, 0x24, 0x11, 0x11, 0x21, 0x22, 0x21, 116 | 0x22, 0x12, 0x12, 0x21, 0x11, 0x21, 0x12, 0x1, 117 | 0x0, 0x1, 0x77, 0x77, 0x88, 0xa8, 0xcb, 0xab, 118 | 0x89, 0x88, 0x88, 0x99, 0x89, 0x98, 0x7b, 0x36, 119 | 0x12, 0x11, 0x11, 0x11, 0x1, 0x11, 0x22, 0x32, 120 | 0x22, 0x44, 0x11, 0x10, 0x11, 0x32, 0x74, 0xb9, 121 | 0x8b, 0x67, 0x55, 0x67, 0x98, 0x8a, 0x98, 0xaa, 122 | 0xba, 0xba, 0x7b, 0xb7, 0x8c, 0x12, 0x72, 0xba, 123 | 0xaa, 0x9a, 0x98, 0x66, 0x55, 0x35, 0x24, 0x32, 124 | 0x43, 0x65, 0x77, 0x88, 0x57, 0x33, 0x64, 0x77, 125 | 0x46, 0x75, 0x24, 0x12, 0x11, 0x21, 0x12, 0x11, 126 | 0x21, 0x12, 0x21, 0x22, 0x22, 0x22, 0x12, 0x11, 127 | 0x1, 0x10, 0x78, 0x77, 0x88, 0x88, 0xba, 0xbb, 128 | 0x9a, 0x99, 0x9a, 0x99, 0x78, 0xa8, 0x8c, 0x36, 129 | 0x11, 0x11, 0x11, 0x11, 0x1, 0x11, 0x21, 0x32, 130 | 0x32, 0x44, 0x1, 0x11, 0x11, 0x11, 0x62, 0x98, 131 | 0x9a, 0x69, 0x65, 0x76, 0x67, 0x76, 0x88, 0x99, 132 | 0x88, 0xab, 0x78, 0xbb, 0x68, 0x43, 0xa6, 0xaa, 133 | 0xab, 0x9a, 0x88, 0x86, 0x45, 0x55, 0x34, 0x22, 134 | 0x31, 0x44, 0x45, 0x23, 0x21, 0x33, 0x87, 0x78, 135 | 0x46, 0x66, 0x24, 0x11, 0x21, 0x22, 0x23, 0x21, 136 | 0x22, 0x21, 0x12, 0x11, 0x12, 0x22, 0x12, 0x1, 137 | 0x0, 0x0, 0x88, 0x98, 0x99, 0x99, 0xba, 0xab, 138 | 0x9a, 0x99, 0x78, 0x66, 0x88, 0xb8, 0xad, 0x26, 139 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x22, 0x23, 140 | 0x53, 0x34, 0x1, 0x11, 0x22, 0x33, 0x42, 0x96, 141 | 0x9a, 0x8a, 0x67, 0x77, 0x67, 0x97, 0x99, 0x98, 142 | 0xcb, 0x9b, 0xb8, 0x9b, 0x58, 0x64, 0xa9, 0xba, 143 | 0xaa, 0x87, 0x88, 0x75, 0x56, 0x45, 0x55, 0x34, 144 | 0x33, 0x33, 0x23, 0x11, 0x22, 0x43, 0x9a, 0x99, 145 | 0x46, 0x56, 0x23, 0x22, 0x32, 0x22, 0x23, 0x22, 146 | 0x22, 0x22, 0x22, 0x12, 0x21, 0x22, 0x11, 0x11, 147 | 0x0, 0x0, 0x99, 0x99, 0x99, 0x88, 0xa9, 0x9a, 148 | 0x89, 0x88, 0x99, 0x99, 0x99, 0xa8, 0x9d, 0x35, 149 | 0x11, 0x11, 0x12, 0x11, 0x11, 0x11, 0x32, 0x23, 150 | 0x54, 0x35, 0x11, 0x33, 0x32, 0x43, 0x34, 0x86, 151 | 0xaa, 0x8a, 0x67, 0x77, 0x77, 0x78, 0x77, 0x66, 152 | 0x86, 0x89, 0xa9, 0xba, 0x34, 0x75, 0xaa, 0xba, 153 | 0xab, 0x78, 0x88, 0x65, 0x66, 0x56, 0x34, 0x34, 154 | 0x32, 0x23, 0x33, 0x11, 0x22, 0x43, 0x98, 0x89, 155 | 0x44, 0x56, 0x24, 0x12, 0x22, 0x21, 0x22, 0x12, 156 | 0x12, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, 157 | 0x1, 0x0, 0x88, 0x99, 0x99, 0x99, 0xba, 0xaa, 158 | 0x9a, 0x99, 0xa9, 0x9a, 0x88, 0x88, 0x9c, 0x25, 159 | 0x11, 0x11, 0x11, 0x11, 0x1, 0x11, 0x32, 0x32, 160 | 0x64, 0x27, 0x21, 0x34, 0x32, 0x43, 0x45, 0x85, 161 | 0xaa, 0xaa, 0x98, 0x88, 0x76, 0x86, 0x88, 0x67, 162 | 0x66, 0x77, 0x98, 0x69, 0x44, 0x96, 0xba, 0xab, 163 | 0xaa, 0x79, 0x67, 0x77, 0x46, 0x65, 0x35, 0x33, 164 | 0x43, 0x34, 0x43, 0x13, 0x21, 0x22, 0x83, 0x89, 165 | 0x44, 0x45, 0x33, 0x21, 0x22, 0x22, 0x22, 0x22, 166 | 0x22, 0x22, 0x22, 0x22, 0x32, 0x23, 0x11, 0x12, 167 | 0x0, 0x0, 0x99, 0xaa, 0x9a, 0x88, 0xaa, 0xbb, 168 | 0x9b, 0xa9, 0xbb, 0x9a, 0x68, 0xa7, 0xbc, 0x26, 169 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x32, 0x42, 170 | 0x75, 0x28, 0x21, 0x23, 0x11, 0x31, 0x55, 0x64, 171 | 0xa9, 0xaa, 0x99, 0x87, 0x87, 0x97, 0x78, 0x65, 172 | 0x56, 0x55, 0x88, 0x66, 0x65, 0xa9, 0xab, 0xaa, 173 | 0x99, 0x58, 0x66, 0x68, 0x65, 0x35, 0x44, 0x23, 174 | 0x32, 0x43, 0x54, 0x45, 0x11, 0x53, 0x55, 0x86, 175 | 0x44, 0x55, 0x23, 0x12, 0x21, 0x22, 0x12, 0x21, 176 | 0x22, 0x22, 0x22, 0x22, 0x33, 0x22, 0x11, 0x11, 177 | 0x0, 0x0, 0x98, 0x99, 0x89, 0x87, 0xba, 0xcc, 178 | 0xab, 0xba, 0xcb, 0x9a, 0x99, 0x98, 0xcc, 0x35, 179 | 0x12, 0x11, 0x11, 0x11, 0x0, 0x11, 0x33, 0x42, 180 | 0x76, 0x19, 0x21, 0x22, 0x1, 0x10, 0x54, 0x54, 181 | 0xa8, 0xbb, 0xa9, 0x98, 0x79, 0x79, 0x48, 0x87, 182 | 0x56, 0x85, 0x57, 0x68, 0x87, 0xb9, 0xab, 0x9a, 183 | 0x89, 0x77, 0x55, 0x66, 0x65, 0x46, 0x34, 0x25, 184 | 0x32, 0x44, 0x55, 0x25, 0x31, 0x77, 0x88, 0x67, 185 | 0x45, 0x46, 0x23, 0x22, 0x22, 0x32, 0x33, 0x22, 186 | 0x22, 0x22, 0x22, 0x22, 0x23, 0x12, 0x11, 0x1, 187 | 0x0, 0x0, 0x88, 0x99, 0x78, 0xa8, 0xcb, 0xcc, 188 | 0xbb, 0xbb, 0xba, 0xaa, 0x8a, 0x98, 0xab, 0x45, 189 | 0x13, 0x11, 0x11, 0x11, 0x1, 0x11, 0x32, 0x64, 190 | 0x87, 0x19, 0x21, 0x12, 0x2, 0x10, 0x53, 0x64, 191 | 0xb7, 0xba, 0xaa, 0xaa, 0x78, 0x99, 0x65, 0x8a, 192 | 0x47, 0x78, 0x75, 0x88, 0x98, 0xba, 0x9a, 0x9a, 193 | 0x79, 0x67, 0x67, 0x56, 0x66, 0x75, 0x68, 0x43, 194 | 0x33, 0x43, 0x55, 0x13, 0x82, 0x98, 0x99, 0x69, 195 | 0x45, 0x46, 0x24, 0x22, 0x23, 0x23, 0x23, 0x22, 196 | 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, 0x1, 197 | 0x10, 0x0, 0x87, 0x89, 0x88, 0xca, 0xed, 0xdd, 198 | 0xbc, 0xaa, 0xcc, 0xbb, 0x8a, 0x88, 0xcb, 0x59, 199 | 0x13, 0x11, 0x12, 0x11, 0x0, 0x11, 0x33, 0x74, 200 | 0x98, 0x2a, 0x21, 0x23, 0x2, 0x10, 0x53, 0x64, 201 | 0xa7, 0x9a, 0x8a, 0xa9, 0x86, 0x98, 0x93, 0x89, 202 | 0x77, 0x68, 0x86, 0x98, 0x99, 0xaa, 0x99, 0x79, 203 | 0x67, 0x77, 0x68, 0x56, 0x55, 0x36, 0x56, 0x13, 204 | 0x53, 0x45, 0x33, 0x22, 0x83, 0x99, 0xaa, 0x69, 205 | 0x44, 0x45, 0x23, 0x32, 0x22, 0x24, 0x31, 0x23, 206 | 0x24, 0x22, 0x22, 0x33, 0x22, 0x21, 0x12, 0x1, 207 | 0x0, 0x1, 0x87, 0x88, 0xa8, 0xdc, 0xee, 0xde, 208 | 0xaa, 0xcc, 0xcc, 0xab, 0xa9, 0x8a, 0xdb, 0x6b, 209 | 0x13, 0x11, 0x12, 0x11, 0x0, 0x10, 0x33, 0x73, 210 | 0x99, 0x2b, 0x51, 0x35, 0x12, 0x21, 0x54, 0x75, 211 | 0xa7, 0xaa, 0x9b, 0xba, 0x98, 0x79, 0xa6, 0xa9, 212 | 0xa6, 0x78, 0x99, 0x99, 0x99, 0x9a, 0xa8, 0x99, 213 | 0x77, 0x66, 0x57, 0x65, 0x45, 0x56, 0x34, 0x55, 214 | 0x43, 0x44, 0x33, 0x33, 0x64, 0x77, 0x45, 0x23, 215 | 0x53, 0x46, 0x23, 0x32, 0x22, 0x42, 0x22, 0x32, 216 | 0x22, 0x22, 0x22, 0x33, 0x32, 0x12, 0x11, 0x0, 217 | 0x10, 0x0, 0x87, 0x88, 0xb9, 0xdd, 0xee, 0xbc, 218 | 0xbc, 0xcb, 0xbc, 0xaa, 0x9a, 0x98, 0xda, 0x8c, 219 | 0x24, 0x11, 0x12, 0x11, 0x1, 0x10, 0x52, 0x73, 220 | 0x98, 0x5a, 0x21, 0x26, 0x23, 0x32, 0x44, 0x75, 221 | 0xa8, 0xaa, 0xaa, 0xca, 0xa8, 0x7a, 0xa9, 0xab, 222 | 0x97, 0x88, 0x98, 0xa9, 0x89, 0xaa, 0x97, 0x98, 223 | 0x66, 0x66, 0x56, 0x65, 0x46, 0x45, 0x35, 0x32, 224 | 0x45, 0x44, 0x33, 0x53, 0x66, 0x66, 0x14, 0x23, 225 | 0x53, 0x45, 0x33, 0x22, 0x32, 0x33, 0x32, 0x23, 226 | 0x22, 0x22, 0x33, 0x33, 0x33, 0x23, 0x11, 0x0, 227 | 0x10, 0x10, 0x77, 0x88, 0xb9, 0xed, 0xdd, 0xce, 228 | 0xab, 0xbb, 0xab, 0xaa, 0xaa, 0x9a, 0xca, 0x7a, 229 | 0x26, 0x11, 0x11, 0x11, 0x1, 0x10, 0x52, 0x62, 230 | 0x87, 0x68, 0x11, 0x32, 0x33, 0x33, 0x44, 0x84, 231 | 0xa7, 0xab, 0xbb, 0xc9, 0xb7, 0x6b, 0x9c, 0x9a, 232 | 0x99, 0x97, 0x89, 0xa9, 0x97, 0x99, 0x76, 0x97, 233 | 0x56, 0x55, 0x55, 0x45, 0x55, 0x54, 0x54, 0x25, 234 | 0x43, 0x44, 0x23, 0x64, 0x77, 0x67, 0x12, 0x22, 235 | 0x63, 0x45, 0x23, 0x32, 0x33, 0x33, 0x24, 0x23, 236 | 0x32, 0x33, 0x33, 0x32, 0x32, 0x22, 0x12, 0x1, 237 | 0x0, 0x0, 0x77, 0x88, 0xb9, 0xcb, 0xee, 0xbd, 238 | 0xaa, 0xaa, 0xbb, 0xbb, 0xaa, 0x99, 0xb8, 0x9c, 239 | 0x45, 0x11, 0x11, 0x11, 0x1, 0x0, 0x42, 0x43, 240 | 0x76, 0x88, 0x11, 0x31, 0x33, 0x43, 0x33, 0x65, 241 | 0xa9, 0xaa, 0xba, 0xc9, 0xc7, 0x5b, 0x7c, 0x6a, 242 | 0xa9, 0xa8, 0x99, 0x86, 0x97, 0x99, 0x76, 0x78, 243 | 0x66, 0x36, 0x54, 0x55, 0x55, 0x54, 0x43, 0x32, 244 | 0x33, 0x44, 0x32, 0x65, 0x56, 0x3, 0x10, 0x22, 245 | 0x64, 0x44, 0x23, 0x22, 0x33, 0x23, 0x33, 0x32, 246 | 0x32, 0x43, 0x33, 0x33, 0x22, 0x22, 0x12, 0x1, 247 | 0x10, 0x0, 0x77, 0x87, 0x98, 0xdb, 0xdd, 0xac, 248 | 0x9a, 0xa8, 0xbb, 0xbb, 0xaa, 0x8a, 0xb9, 0xbc, 249 | 0x46, 0x12, 0x11, 0x11, 0x1, 0x0, 0x31, 0x23, 250 | 0x75, 0x87, 0x12, 0x31, 0x33, 0x33, 0x33, 0x68, 251 | 0xa9, 0xab, 0xbb, 0xb9, 0xc8, 0x5a, 0x7c, 0x7a, 252 | 0xa7, 0xa9, 0x79, 0x87, 0x87, 0x8a, 0x85, 0x68, 253 | 0x67, 0x45, 0x55, 0x45, 0x56, 0x54, 0x43, 0x13, 254 | 0x53, 0x35, 0x22, 0x11, 0x0, 0x0, 0x11, 0x32, 255 | 0x55, 0x34, 0x33, 0x22, 0x22, 0x34, 0x34, 0x44, 256 | 0x33, 0x34, 0x23, 0x22, 0x22, 0x11, 0x11, 0x11, 257 | 0x10, 0x11, 0x77, 0x77, 0x97, 0xcb, 0xcc, 0xab, 258 | 0x99, 0xaa, 0xba, 0xab, 0x9a, 0x89, 0x97, 0xbc, 259 | 0x47, 0x12, 0x11, 0x11, 0x11, 0x0, 0x31, 0x34, 260 | 0x63, 0x87, 0x34, 0x11, 0x22, 0x33, 0x52, 0x57, 261 | 0xba, 0xab, 0xca, 0xb9, 0xb7, 0x6a, 0x7b, 0x8a, 262 | 0xa6, 0x99, 0x89, 0x76, 0x77, 0x68, 0x86, 0x57, 263 | 0x56, 0x55, 0x46, 0x54, 0x54, 0x44, 0x35, 0x43, 264 | 0x35, 0x11, 0x1, 0x0, 0x0, 0x11, 0x22, 0x53, 265 | 0x44, 0x33, 0x32, 0x32, 0x34, 0x34, 0x34, 0x44, 266 | 0x45, 0x34, 0x33, 0x23, 0x12, 0x1, 0x0, 0x21, 267 | 0x1, 0x1, 0x67, 0x76, 0x97, 0xba, 0xbb, 0xab, 268 | 0xbb, 0xbb, 0xaa, 0xaa, 0x89, 0x88, 0x97, 0xac, 269 | 0x47, 0x23, 0x11, 0x11, 0x11, 0x1, 0x10, 0x34, 270 | 0x42, 0x75, 0x25, 0x11, 0x43, 0x56, 0x65, 0x75, 271 | 0xba, 0xab, 0xba, 0xba, 0xa9, 0x6a, 0x8a, 0x9a, 272 | 0xa5, 0x89, 0x79, 0x76, 0x67, 0x67, 0x76, 0x66, 273 | 0x76, 0x54, 0x55, 0x45, 0x45, 0x34, 0x54, 0x23, 274 | 0x33, 0x1, 0x0, 0x0, 0x11, 0x21, 0x42, 0x55, 275 | 0x33, 0x32, 0x32, 0x43, 0x44, 0x44, 0x44, 0x45, 276 | 0x35, 0x33, 0x23, 0x23, 0x12, 0x11, 0x1, 0x0, 277 | 0x12, 0x11, 0x66, 0x77, 0x97, 0xba, 0xac, 0xcb, 278 | 0xbb, 0xbb, 0xaa, 0xaa, 0xaa, 0x89, 0x98, 0xba, 279 | 0x68, 0x24, 0x11, 0x11, 0x11, 0x11, 0x10, 0x43, 280 | 0x33, 0x74, 0x37, 0x12, 0x20, 0x22, 0x54, 0x82, 281 | 0xbb, 0xab, 0xaa, 0xaa, 0x9a, 0x5b, 0x9a, 0x9b, 282 | 0x95, 0x89, 0x68, 0x57, 0x67, 0x77, 0x76, 0x66, 283 | 0x66, 0x65, 0x44, 0x55, 0x55, 0x54, 0x43, 0x34, 284 | 0x22, 0x12, 0x1, 0x10, 0x11, 0x32, 0x65, 0x34, 285 | 0x33, 0x22, 0x42, 0x43, 0x44, 0x66, 0x44, 0x44, 286 | 0x33, 0x32, 0x12, 0x23, 0x11, 0x11, 0x11, 0x1, 287 | 0x1, 0x21, 0x66, 0x66, 0x98, 0xbb, 0xba, 0xcc, 288 | 0xbb, 0xab, 0x99, 0xba, 0xab, 0x79, 0x78, 0xc9, 289 | 0x79, 0x24, 0x12, 0x11, 0x11, 0x11, 0x0, 0x31, 290 | 0x43, 0x22, 0x66, 0x23, 0x0, 0x41, 0x45, 0xa4, 291 | 0xbb, 0xbb, 0xa9, 0x89, 0x8a, 0x6b, 0xa9, 0x8a, 292 | 0x95, 0x89, 0x77, 0x57, 0x67, 0x76, 0x67, 0x66, 293 | 0x65, 0x66, 0x54, 0x55, 0x45, 0x45, 0x44, 0x33, 294 | 0x22, 0x13, 0x0, 0x10, 0x22, 0x64, 0x45, 0x33, 295 | 0x23, 0x22, 0x54, 0x66, 0x56, 0x55, 0x44, 0x33, 296 | 0x22, 0x22, 0x11, 0x22, 0x11, 0x11, 0x0, 0x1, 297 | 0x0, 0x11, 0x66, 0x66, 0xa8, 0xbb, 0xcc, 0xbb, 298 | 0xbb, 0x9a, 0xa9, 0xba, 0xab, 0x9a, 0x87, 0xb9, 299 | 0x6a, 0x35, 0x12, 0x11, 0x11, 0x11, 0x1, 0x21, 300 | 0x33, 0x33, 0x62, 0x34, 0x11, 0x64, 0x23, 0xa7, 301 | 0xbc, 0xbb, 0xaa, 0x79, 0x7a, 0x7b, 0x99, 0x9a, 302 | 0x96, 0x89, 0x78, 0x57, 0x57, 0x65, 0x58, 0x66, 303 | 0x54, 0x66, 0x65, 0x54, 0x55, 0x46, 0x45, 0x34, 304 | 0x23, 0x12, 0x0, 0x10, 0x73, 0x57, 0x33, 0x32, 305 | 0x43, 0x44, 0x56, 0x55, 0x45, 0x34, 0x34, 0x32, 306 | 0x12, 0x12, 0x11, 0x22, 0x22, 0x11, 0x11, 0x11, 307 | 0x11, 0x21, 0x56, 0x65, 0x98, 0xcb, 0xcd, 0xbb, 308 | 0xaa, 0x89, 0x98, 0xba, 0xbb, 0x9a, 0x88, 0x98, 309 | 0x8b, 0x45, 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 310 | 0x21, 0x33, 0x44, 0x46, 0x43, 0x34, 0x53, 0xa9, 311 | 0xbb, 0xab, 0x8a, 0x89, 0x88, 0xa9, 0x96, 0x78, 312 | 0x78, 0x8a, 0x89, 0x56, 0x67, 0x76, 0x67, 0x76, 313 | 0x55, 0x64, 0x65, 0x64, 0x45, 0x55, 0x55, 0x32, 314 | 0x34, 0x11, 0x11, 0x31, 0x66, 0x34, 0x32, 0x54, 315 | 0x44, 0x44, 0x45, 0x45, 0x35, 0x43, 0x23, 0x22, 316 | 0x11, 0x22, 0x10, 0x21, 0x11, 0x11, 0x0, 0x10, 317 | 0x0, 0x10, 0x55, 0x65, 0xa7, 0xcc, 0xcd, 0xbc, 318 | 0x9a, 0x77, 0x87, 0xa9, 0xbb, 0xab, 0x89, 0xa9, 319 | 0xbb, 0x47, 0x23, 0x11, 0x11, 0x11, 0x11, 0x11, 320 | 0x22, 0x22, 0x44, 0x44, 0x34, 0x42, 0x84, 0xb9, 321 | 0xaa, 0x99, 0x99, 0x99, 0xa7, 0xa7, 0x96, 0x69, 322 | 0x88, 0x9a, 0x89, 0x57, 0x77, 0x77, 0x76, 0x76, 323 | 0x66, 0x54, 0x65, 0x55, 0x55, 0x54, 0x53, 0x24, 324 | 0x43, 0x11, 0x11, 0x62, 0x33, 0x32, 0x54, 0x45, 325 | 0x54, 0x45, 0x45, 0x34, 0x34, 0x33, 0x23, 0x12, 326 | 0x11, 0x21, 0x1, 0x11, 0x1, 0x11, 0x1, 0x10, 327 | 0x0, 0x0, 0x66, 0x55, 0xa7, 0xcb, 0xdc, 0xbc, 328 | 0xab, 0x78, 0x87, 0xa8, 0xba, 0xab, 0x99, 0xa9, 329 | 0xba, 0x79, 0x24, 0x11, 0x11, 0x11, 0x11, 0x11, 330 | 0x11, 0x32, 0x33, 0x43, 0x33, 0x56, 0x98, 0x99, 331 | 0x99, 0x99, 0x88, 0x99, 0x98, 0x98, 0x79, 0x8a, 332 | 0x85, 0xaa, 0x87, 0x56, 0x76, 0x76, 0x66, 0x76, 333 | 0x76, 0x64, 0x76, 0x66, 0x67, 0x55, 0x45, 0x44, 334 | 0x32, 0x14, 0x22, 0x22, 0x32, 0x54, 0x55, 0x36, 335 | 0x54, 0x53, 0x33, 0x23, 0x33, 0x22, 0x22, 0x11, 336 | 0x11, 0x11, 0x12, 0x11, 0x10, 0x10, 0x11, 0x11, 337 | 0x1, 0x0}; 338 | -------------------------------------------------------------------------------- /examples/Example3_Lines/Example3_Lines.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | Display lines, pixels, circles, and rectangles. 9 | 10 | To connect the display to an Arduino: 11 | (Arduino pin) = (Display pin) 12 | Pin 13 = SCLK on display carrier 13 | 11 = SDIN 14 | 10 = !CS 15 | 9 = !RES 16 | 17 | The display is 160 pixels long and 32 pixels wide 18 | Each 4-bit nibble is the 4-bit grayscale for that pixel 19 | Therefore each byte of data written to the display paints two sequential pixels 20 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 21 | */ 22 | 23 | #include 24 | 25 | //Initialize the display with the follow pin connections 26 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 27 | 28 | void setup() 29 | { 30 | Serial.begin(115200); 31 | 32 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 33 | 34 | flexibleOLED.clearDisplay(); //Clear display RAM and local display buffer 35 | 36 | byte displayWidth = flexibleOLED.getDisplayWidth(); 37 | byte displayHeight = flexibleOLED.getDisplayHeight(); 38 | 39 | //Put pixels in the four corners 40 | flexibleOLED.setPixel(0, 0); 41 | flexibleOLED.setPixel(0, displayHeight - 1); 42 | flexibleOLED.setPixel(displayWidth - 1, 0); 43 | flexibleOLED.setPixel(displayWidth - 1, displayHeight - 1); 44 | 45 | //Shapes 46 | flexibleOLED.rect(2, 2, 5, 10); //X, Y, Width, Height 47 | flexibleOLED.circleFill(15, 10, 5); //X, Y, Radius 48 | 49 | flexibleOLED.rectFill(25, 2, 5, 10); 50 | flexibleOLED.circle(40, 10, 5); 51 | 52 | flexibleOLED.display(); 53 | } 54 | 55 | void loop() 56 | { 57 | 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /examples/Example4_BMP_Eater/Che.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library/cbfcaae428b470f72525c24e944d2e5ed9f87a94/examples/Example4_BMP_Eater/Che.bmp -------------------------------------------------------------------------------- /examples/Example4_BMP_Eater/Example4_BMP_Eater.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | This example takes in a full BMP file, parses it and displays it on the OLED. This is handy 9 | because you don't have to convert the BMP into a prog_mem array or anything else. 10 | 11 | This is a fun but tricky example. 12 | 1) Use Teraterm or other terminal program capable of sending a binary file. 13 | 2) Connect at 57600bps 14 | 3) Upload che.bmp, monkey.bmp, or whitebox.bmp 15 | 4) Should display on the screen 16 | 17 | Requirements: 18 | * The BMP should be 160x32 pixels 19 | * The BMP should be in grayscale 20 | * You can send non-grayscale bitmaps but this program will only display the blue channel 21 | * You can send taller or wider bitmaps but it will be displayed incorrectly 22 | 23 | To connect the display to an Arduino: 24 | (Arduino pin) = (Display pin) 25 | Pin 13 = SCLK 26 | 11 = SDIN 27 | 10 = !CS 28 | 9 = !RES 29 | 30 | The display is 160 pixels long and 32 pixels wide 31 | Each 4-bit nibble is the 4-bit grayscale for that pixel 32 | Therefore each byte of data written to the display paints two sequential pixels 33 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 34 | */ 35 | 36 | #include 37 | 38 | //Initialize the display with the follow pin connections 39 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 40 | 41 | void setup() 42 | { 43 | Serial.begin(57600); 44 | //For this example the 8MHz Arduino Pro Mini can't do the communication with LCD, 45 | //and the bitmap manipulations, and serial greater than 57600bps. 46 | //Other platforms may be able to go faster. 47 | 48 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 49 | 50 | flexibleOLED.clearDisplay(); //Clear display and buffer 51 | } 52 | 53 | void loop() 54 | { 55 | getBitmap(); 56 | } 57 | 58 | void getBitmap() 59 | { 60 | /* 61 | From: #https://github.com/yy502/ePaperDisplay 62 | ### Sample BMP header structure, total = 70 bytes 63 | ### !!! little-endian !!! 64 | 65 | Bitmap file header 14 bytes 66 | 42 4D "BM" 67 | C6 A9 03 00 FileSize = 240,070 <= dynamic value 68 | 00 00 Reserved 69 | 00 00 Reserved 70 | 46 00 00 00 Offset = 70 = 14+56 71 | 72 | DIB header (bitmap information header) 73 | BITMAPV3INFOHEADER 56 bytes 74 | 28 00 00 00 Size = 40 75 | 20 03 00 00 Width = 800 <= dynamic value 76 | 58 02 00 00 Height = 600 <= dynamic value 77 | 01 00 Planes = 1 78 | 04 00 BitCount = 4 79 | 00 00 00 00 compression 80 | 00 00 00 00 SizeImage 81 | 00 00 00 00 XPerlPerMeter 82 | 00 00 00 00 YPerlPerMeter 83 | 04 00 00 00 Colors used = 4 84 | 00 00 00 00 ColorImportant 85 | 00 00 00 00 Color definition index 0 86 | 55 55 55 00 Color definition index 1 87 | AA AA AA 00 Color definition index 2 88 | FF FF FF 00 Color definition index 3 89 | */ 90 | 91 | //Begin scanning for incoming bytes 92 | Serial.flush(); //Flush anything in RX buffer 93 | Serial.println(); 94 | Serial.println("Waiting for 160x32 sized grayscale bitmap to be sent"); 95 | Serial.println("Note: File must be sent in binary"); 96 | 97 | //Get BMP header 98 | unsigned long fileSize = 0; 99 | unsigned long offset = 0; 100 | for (int x = 0 ; x < 14 ; x++) 101 | { 102 | while (Serial.available() == false) delay(1); //Spin and do nothing 103 | 104 | byte incoming = Serial.read(); 105 | 106 | //Error check the header bytes 107 | if (x == 0) 108 | { 109 | if (incoming != 'B') 110 | { 111 | Serial.println("Error: This does not look like a bitmap"); 112 | while (Serial.available()) 113 | { 114 | Serial.read(); //Wait for sender to stop 115 | delay(100); 116 | } 117 | return; 118 | } 119 | } 120 | if (x == 1) 121 | { 122 | if (incoming != 'M') 123 | { 124 | Serial.println("Error: This does not look like a bitmap"); 125 | while (Serial.available()) 126 | { 127 | Serial.read(); //Wait for sender to stop 128 | delay(100); 129 | } 130 | return; 131 | } 132 | } 133 | 134 | if (x == 2) fileSize |= ((long)incoming << (8 * 0)); 135 | if (x == 3) fileSize |= ((long)incoming << (8 * 1)); 136 | if (x == 4) fileSize |= ((long)incoming << (8 * 2)); 137 | if (x == 5) fileSize |= ((long)incoming << (8 * 3)); 138 | 139 | if (x == 10) offset |= ((long)incoming << (8 * 0)); 140 | if (x == 11) offset |= ((long)incoming << (8 * 1)); 141 | if (x == 12) offset |= ((long)incoming << (8 * 2)); 142 | if (x == 13) offset |= ((long)incoming << (8 * 3)); 143 | } 144 | 145 | //Get BMP size and number of colors used 146 | unsigned long colorsUsed = 0; 147 | for (int x = 0 ; x < 40 ; x++) 148 | { 149 | while (Serial.available() == false) delay(1); //Spin and do nothing 150 | 151 | byte incoming = Serial.read(); 152 | 153 | if (x == 32) colorsUsed |= ((long)incoming << (8 * 0)); 154 | if (x == 33) colorsUsed |= ((long)incoming << (8 * 1)); 155 | if (x == 34) colorsUsed |= ((long)incoming << (8 * 2)); 156 | if (x == 35) colorsUsed |= ((long)incoming << (8 * 3)); 157 | } 158 | 159 | //Get look-up-table of colors 160 | byte colorTable[colorsUsed]; //Create array big enough to handle # of colors 161 | for (int x = 0 ; x < colorsUsed ; x++) 162 | { 163 | //Each color record is 4 bytes but we only need the first 164 | for (int j = 0 ; j < 4 ; j++) 165 | { 166 | while (Serial.available() == false) delay(1); //Spin and do nothing 167 | byte incoming = Serial.read(); 168 | 169 | if (j == 0) colorTable[x] = incoming; 170 | } 171 | } 172 | 173 | //Make sure the display is ready to go 174 | flexibleOLED.setRowAddress(0); 175 | flexibleOLED.setColumnAddress(0); 176 | 177 | //Next we have pixel data. Using the look-up-table 178 | //convert the pixel's color code to the actual color, 179 | //then down sample each 8-bit byte to a 4-bit, 180 | //then combine two bytes at a time into one byte 181 | //then send to the display 182 | for (unsigned long i = 0 ; i < fileSize - offset - 1 ; i += 2) 183 | { 184 | //Get the two bytes 185 | while (Serial.available() == false) delay(1); //Spin and do nothing 186 | byte byte1 = Serial.read(); 187 | 188 | while (Serial.available() == false) delay(1); //Spin and do nothing 189 | byte byte2 = Serial.read(); 190 | 191 | //Covert color code to actual color 192 | byte1 = colorTable[byte1]; 193 | byte2 = colorTable[byte2]; 194 | 195 | //Covert 8-bit value to 4 bit by removing lower 4 bits 196 | byte2 &= 0xF0; 197 | byte1 >>= 4; 198 | 199 | byte combined = byte1 | byte2; //Combine two bytes into one 200 | 201 | flexibleOLED.data(combined); //Write byte directly to display 202 | } 203 | 204 | Serial.print("fileSize: "); 205 | Serial.println(fileSize); 206 | Serial.print("offset: "); 207 | Serial.println(offset); 208 | Serial.print("colorsUsed: "); 209 | Serial.println(colorsUsed); 210 | 211 | while (Serial.available()) 212 | { 213 | delay(10); 214 | Serial.read(); //Wait for sender to stop sending 215 | } 216 | 217 | Serial.println("All done!"); 218 | } 219 | 220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /examples/Example4_BMP_Eater/Monkey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library/cbfcaae428b470f72525c24e944d2e5ed9f87a94/examples/Example4_BMP_Eater/Monkey.bmp -------------------------------------------------------------------------------- /examples/Example4_BMP_Eater/gnome-tooTall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library/cbfcaae428b470f72525c24e944d2e5ed9f87a94/examples/Example4_BMP_Eater/gnome-tooTall.bmp -------------------------------------------------------------------------------- /examples/Example4_BMP_Eater/nyan-tooWide.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library/cbfcaae428b470f72525c24e944d2e5ed9f87a94/examples/Example4_BMP_Eater/nyan-tooWide.bmp -------------------------------------------------------------------------------- /examples/Example4_BMP_Eater/whiteBox.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library/cbfcaae428b470f72525c24e944d2e5ed9f87a94/examples/Example4_BMP_Eater/whiteBox.bmp -------------------------------------------------------------------------------- /examples/Example5_AllTheText/Example5_AllTheText.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | To connect the display to an Arduino: 9 | (Arduino pin) = (Display pin) 10 | Pin 13 = SCLK on display carrier 11 | 11 = SDIN 12 | 10 = !CS 13 | 9 = !RES 14 | 15 | The display is 160 pixels long and 32 pixels wide 16 | Each 4-bit nibble is the 4-bit grayscale for that pixel 17 | Therefore each byte of data written to the display paints two sequential pixels 18 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 19 | */ 20 | 21 | #include 22 | 23 | //Initialize the display with the follow pin connections 24 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 25 | 26 | void setup() 27 | { 28 | Serial.begin(115200); 29 | 30 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 31 | } 32 | 33 | void loop() 34 | { 35 | smallTextExample(); 36 | largeTextExample(); 37 | } 38 | 39 | void smallTextExample() 40 | { 41 | printTitle("Small text", 0); 42 | 43 | flexibleOLED.setFontType(0); //Small text 44 | 45 | byte thisFontHeight = flexibleOLED.getFontHeight(); 46 | 47 | flexibleOLED.clearDisplay(); //Clear display RAM and local display buffer 48 | flexibleOLED.setCursor(0, thisFontHeight * 3); 49 | flexibleOLED.print("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 50 | flexibleOLED.setCursor(0, thisFontHeight * 2); 51 | flexibleOLED.print("abcdefghijklmnopqrstuvwxyz"); 52 | flexibleOLED.setCursor(0, thisFontHeight * 1); 53 | flexibleOLED.print("1234567890!@#$%^&*(),.<>/?"); 54 | flexibleOLED.setCursor(0, thisFontHeight * 0); 55 | flexibleOLED.print(";:'\"[]{}-=_+|\\~`"); 56 | 57 | flexibleOLED.display(); 58 | 59 | delay(2000); 60 | } 61 | 62 | void largeTextExample() 63 | { 64 | printTitle("Large text", 0); 65 | 66 | flexibleOLED.setFontType(1); //Larger text 67 | byte theDisplayHeight = flexibleOLED.getDisplayHeight(); 68 | byte thisFontHeight = flexibleOLED.getFontHeight(); 69 | 70 | flexibleOLED.clearDisplay(); //Clear display RAM and local display buffer 71 | 72 | flexibleOLED.setCursor(0, theDisplayHeight - (thisFontHeight * 1)); 73 | flexibleOLED.print("ABCDEFGHIJKLMNOPQ"); 74 | flexibleOLED.setCursor(0, theDisplayHeight - (thisFontHeight * 2)); 75 | flexibleOLED.print("abcdefghij1234567"); 76 | 77 | flexibleOLED.display(); 78 | 79 | delay(2000); 80 | } 81 | 82 | // Center and print a small title 83 | // This function is quick and dirty. Only works for titles one line long. 84 | void printTitle(String title, int font) 85 | { 86 | int middleX = flexibleOLED.getDisplayWidth() / 2; 87 | int middleY = flexibleOLED.getDisplayHeight() / 2; 88 | 89 | flexibleOLED.clearDisplay(); 90 | flexibleOLED.setFontType(font); 91 | 92 | // Set the cursor in the middle of the screen 93 | flexibleOLED.setCursor(middleX - (flexibleOLED.getFontWidth() * (title.length() / 2)), 94 | middleY - (flexibleOLED.getFontHeight() / 2)); 95 | 96 | // Print the title: 97 | flexibleOLED.print(title); 98 | flexibleOLED.display(); 99 | 100 | delay(1500); 101 | 102 | flexibleOLED.clearDisplay(); //Clear everything 103 | } 104 | 105 | -------------------------------------------------------------------------------- /examples/Example6_Pong/Example6_Pong.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | A silly pong example. Comes from Marshall's tutorial: 9 | https://learn.sparkfun.com/tutorials/teensyview-hookup-guide#example-prop-shield-compatible-connection 10 | 11 | On an 8MHz Arduino Pro Mini this is pretty painfully slow. 12 | 13 | To connect the display to an Arduino: 14 | (Arduino pin) = (Display pin) 15 | Pin 13 = SCLK on display carrier 16 | 11 = SDIN 17 | 10 = !CS 18 | 9 = !RES 19 | 20 | The display is 160 pixels long and 32 pixels wide 21 | Each 4-bit nibble is the 4-bit grayscale for that pixel 22 | Therefore each byte of data written to the display paints two sequential pixels 23 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 24 | */ 25 | 26 | #include 27 | 28 | //Initialize the display with the follow pin connections 29 | //Note that you should not change SCLK and MOSI because the 30 | //library uses hardware SPI 31 | SSD1320 flexibleOLED(10, 9, 13, 11); //CS, RES, SCLK, MOSI(SDIN on OLED board) 32 | 33 | void setup() 34 | { 35 | Serial.begin(115200); 36 | 37 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 38 | } 39 | 40 | void loop() 41 | { 42 | shapeExample(); 43 | } 44 | 45 | void shapeExample() 46 | { 47 | printTitle("Shapes!", 0); 48 | 49 | // Silly pong demo. It takes a lot of work to fake pong... 50 | int paddleW = 3; // Paddle width 51 | int paddleH = 15; // Paddle height 52 | // Paddle 0 (left) position coordinates 53 | int paddle0_Y = (flexibleOLED.getDisplayHeight() / 2) - (paddleH / 2); 54 | int paddle0_X = 2; 55 | // Paddle 1 (right) position coordinates 56 | int paddle1_Y = (flexibleOLED.getDisplayHeight() / 2) - (paddleH / 2); 57 | int paddle1_X = flexibleOLED.getDisplayWidth() - 3 - paddleW; 58 | int ball_rad = 2; // Ball radius 59 | // Ball position coordinates 60 | int ball_X = paddle0_X + paddleW + ball_rad; 61 | int ball_Y = random(1 + ball_rad, flexibleOLED.getDisplayHeight() - ball_rad);//paddle0_Y + ball_rad; 62 | int ballVelocityX = 1; // Ball left/right velocity 63 | int ballVelocityY = 1; // Ball up/down velocity 64 | int paddle0Velocity = -1; // Paddle 0 velocity 65 | int paddle1Velocity = 1; // Paddle 1 velocity 66 | 67 | //while(ball_X >= paddle0_X + paddleW - 1) 68 | while ((ball_X - ball_rad > 1) && 69 | (ball_X + ball_rad < flexibleOLED.getDisplayWidth() - 2)) 70 | { 71 | // Increment ball's position 72 | ball_X += ballVelocityX; 73 | ball_Y += ballVelocityY; 74 | // Check if the ball is colliding with the left paddle 75 | if (ball_X - ball_rad < paddle0_X + paddleW) 76 | { 77 | // Check if ball is within paddle's height 78 | if ((ball_Y > paddle0_Y) && (ball_Y < paddle0_Y + paddleH)) 79 | { 80 | ball_X++; // Move ball over one to the right 81 | ballVelocityX = -ballVelocityX; // Change velocity 82 | } 83 | } 84 | // Check if the ball hit the right paddle 85 | if (ball_X + ball_rad > paddle1_X) 86 | { 87 | // Check if ball is within paddle's height 88 | if ((ball_Y > paddle1_Y) && (ball_Y < paddle1_Y + paddleH)) 89 | { 90 | ball_X--; // Move ball over one to the left 91 | ballVelocityX = -ballVelocityX; // change velocity 92 | } 93 | } 94 | // Check if the ball hit the top or bottom 95 | if ((ball_Y <= ball_rad) || (ball_Y >= (flexibleOLED.getDisplayHeight() - ball_rad - 1))) 96 | { 97 | // Change up/down velocity direction 98 | ballVelocityY = -ballVelocityY; 99 | } 100 | // Move the paddles up and down 101 | paddle0_Y += paddle0Velocity; 102 | paddle1_Y += paddle1Velocity; 103 | // Change paddle 0's direction if it hit top/bottom 104 | if ((paddle0_Y <= 1) || (paddle0_Y > flexibleOLED.getDisplayHeight() - 2 - paddleH)) 105 | { 106 | paddle0Velocity = -paddle0Velocity; 107 | } 108 | // Change paddle 1's direction if it hit top/bottom 109 | if ((paddle1_Y <= 1) || (paddle1_Y > flexibleOLED.getDisplayHeight() - 2 - paddleH)) 110 | { 111 | paddle1Velocity = -paddle1Velocity; 112 | } 113 | 114 | // Draw the Pong Field 115 | flexibleOLED.clearDisplay(CLEAR_BUFFER); //Save time. Only clear the local buffer. 116 | // Draw an outline of the screen: 117 | flexibleOLED.rect(0, 0, flexibleOLED.getDisplayWidth() - 1, flexibleOLED.getDisplayHeight()); 118 | // Draw the center line 119 | flexibleOLED.rectFill(flexibleOLED.getDisplayWidth() / 2 - 1, 0, 2, flexibleOLED.getDisplayHeight()); 120 | // Draw the Paddles: 121 | flexibleOLED.rectFill(paddle0_X, paddle0_Y, paddleW, paddleH); 122 | flexibleOLED.rectFill(paddle1_X, paddle1_Y, paddleW, paddleH); 123 | // Draw the ball: 124 | flexibleOLED.circle(ball_X, ball_Y, ball_rad); 125 | // Actually draw everything on the screen: 126 | flexibleOLED.display(); 127 | 128 | //delay(25); // Delay for visibility 129 | } 130 | 131 | delay(1000); 132 | } 133 | 134 | // Center and print a small title 135 | // This function is quick and dirty. Only works for titles one line long. 136 | void printTitle(String title, int font) 137 | { 138 | int middleX = flexibleOLED.getDisplayWidth() / 2; 139 | int middleY = flexibleOLED.getDisplayHeight() / 2; 140 | 141 | flexibleOLED.clearDisplay(); 142 | flexibleOLED.setFontType(font); 143 | 144 | // Set the cursor in the middle of the screen 145 | flexibleOLED.setCursor(middleX - (flexibleOLED.getFontWidth() * (title.length() / 2)), 146 | middleY - (flexibleOLED.getFontHeight() / 2)); 147 | 148 | // Print the title: 149 | flexibleOLED.print(title); 150 | flexibleOLED.display(); 151 | 152 | delay(1500); 153 | 154 | flexibleOLED.clearDisplay(); //Clear everything 155 | } 156 | -------------------------------------------------------------------------------- /examples/Example7_Logo/Example7_Logo.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | The SparkFun logo is built into the library. This displays it. 9 | 10 | To connect the display to an Arduino: 11 | (Arduino pin) = (Display pin) 12 | Pin 13 = SCLK on display carrier 13 | 11 = SDIN 14 | 10 = !CS 15 | 9 = !RES 16 | 17 | The display is 160 pixels long and 32 pixels wide 18 | Each 4-bit nibble is the 4-bit grayscale for that pixel 19 | Therefore each byte of data written to the display paints two sequential pixels 20 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 21 | */ 22 | 23 | #include 24 | 25 | //Initialize the display with the follow pin connections 26 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 27 | 28 | void setup() 29 | { 30 | Serial.begin(115200); 31 | 32 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 33 | 34 | //The SparkFun logo gets stored in the buffer when the library 35 | //is initialized. Let's display it! 36 | flexibleOLED.display(); 37 | } 38 | 39 | void loop() 40 | { 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /examples/Example9_NoiseDrawing/Example9_NoiseDrawing.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Control a SSD1320 based flexible OLED display 3 | By: Nathan Seidle 4 | SparkFun Electronics 5 | Date: November 21st, 2017 6 | License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 7 | 8 | This example takes random noise and prints it to the screen. 9 | 10 | To connect the display to an Arduino: 11 | (Arduino pin) = (Display pin) 12 | Pin 13 = SCLK on display carrier 13 | 11 = SDIN 14 | 10 = !CS 15 | 9 = !RES 16 | 17 | The display is 160 pixels long and 32 pixels wide 18 | Each 4-bit nibble is the 4-bit grayscale for that pixel 19 | Therefore each byte of data written to the display paints two sequential pixels 20 | Loops that write to the display should be 80 iterations wide and 32 iterations tall 21 | */ 22 | 23 | #include 24 | 25 | //Initialize the display with the follow pin connections 26 | SSD1320 flexibleOLED(10, 9); //10 = CS, 9 = RES 27 | 28 | //Get access to the screen buffer 29 | byte *displayMemory = flexibleOLED.getScreenBuffer(); 30 | 31 | void setup() 32 | { 33 | Serial.begin(115200); 34 | 35 | flexibleOLED.begin(160, 32); //Display is 160 wide, 32 high 36 | 37 | randomSeed(analogRead(A0) * analogRead(A1)); 38 | } 39 | 40 | void loop() 41 | { 42 | writeToBuffer(); 43 | delay(2000); 44 | 45 | writeDirect(); 46 | delay(2000); 47 | } 48 | 49 | //Write directly to the display 50 | //Because we are writing directly we can do grayscale 51 | //And we have 80 columns (not 20) 52 | void writeDirect() 53 | { 54 | flexibleOLED.clearDisplay(); //Clear display RAM and local display buffer 55 | 56 | for (int rows = 0 ; rows < 32 ; rows++) 57 | { 58 | for (int columns = 0 ; columns < 80 ; columns++) 59 | { 60 | byte noise = random(0xFF); 61 | flexibleOLED.data(noise); 62 | } 63 | } 64 | } 65 | 66 | //Write to the local buffer then push to display 67 | //The display buffer is limited to on or off. It can't do gray scale. 68 | void writeToBuffer() 69 | { 70 | flexibleOLED.clearDisplay(); //Clear display RAM and local display buffer 71 | 72 | for (int rows = 0 ; rows < 32 ; rows++) 73 | for (int columns = 0 ; columns < 20 ; columns++) 74 | { 75 | byte noise = random(0xFF); 76 | displayMemory[rows * 20 + columns] = noise; 77 | } 78 | 79 | flexibleOLED.display(); //Push the buffer out to the display 80 | } 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SFE_Flexible OLED 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SSD1320 KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | 17 | command KEYWORD2 18 | data KEYWORD2 19 | setColumnAddress KEYWORD2 20 | setRowAddress KEYWORD2 21 | 22 | clearDisplay KEYWORD2 23 | display KEYWORD2 24 | setCursor KEYWORD2 25 | 26 | invert KEYWORD2 27 | setContrast KEYWORD2 28 | flipVertical KEYWORD2 29 | flipHorizontal KEYWORD2 30 | 31 | setPixel KEYWORD2 32 | 33 | line KEYWORD2 34 | lineH KEYWORD2 35 | lineV KEYWORD2 36 | 37 | rect KEYWORD2 38 | rectFill KEYWORD2 39 | 40 | circle KEYWORD2 41 | circleFill KEYWORD2 42 | 43 | drawChar KEYWORD2 44 | 45 | drawBitmap KEYWORD2 46 | 47 | getDisplayWidth KEYWORD2 48 | getDisplayHeight KEYWORD2 49 | setDisplayWidth KEYWORD2 50 | setDisplayHeight KEYWORD2 51 | setColor KEYWORD2 52 | setDrawMode KEYWORD2 53 | getScreenBuffer KEYWORD2 54 | 55 | getFontWidth KEYWORD2 56 | getFontHeight KEYWORD2 57 | getTotalFonts KEYWORD2 58 | getFontType KEYWORD2 59 | setFontType KEYWORD2 60 | getFontStartChar KEYWORD2 61 | getFontTotalChar KEYWORD2 62 | 63 | scrollLeft KEYWORD2 64 | scrollRight KEYWORD2 65 | scollUp KEYWORD2 66 | scrollStop KEYWORD2 67 | 68 | ####################################### 69 | # Constants (LITERAL1) 70 | ####################################### 71 | 72 | BLACK LITERAL1 73 | WHITE LITERAL1 74 | NORM LITERAL1 75 | XOR LITERAL1 76 | PAGE LITERAL1 77 | ALL LITERAL1 78 | 79 | -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=SparkFun Flexible Grayscale OLED Breakout 2 | version=1.0.4 3 | author=SparkFun Electronics 4 | maintainer=SparkFun Electronics 5 | sentence=Library for the SparkFun Flexible Grayscale Display. 6 | paragraph=Library for the SSD1320 OLED, a grayscale, 1.81", 160x32 OLED display. Several basic functionlity examples included. 7 | category=Display 8 | url=https://github.com/sparkfun/SparkFun_SSD1320_OLED_Arduino_Library 9 | architectures=* -------------------------------------------------------------------------------- /src/SSD1320_OLED.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This is a basic driver for the SSD1320 OLED driver IC. It can initialize the display 3 | and do simple commands like setPixels, drawCharacters, and other simple commands. 4 | 5 | We can't use SPI library out of the box because the display 6 | requires 9-bit data in 3-wire SPI mode. 7 | So we bit-bang the first bit then use SPI hardware to send remaining 8 bits 8 | */ 9 | 10 | #include "SSD1320_OLED.h" 11 | 12 | // Add header of the fonts here. Remove as many as possible to conserve FLASH memory. 13 | #include "util/font5x7.h" 14 | #include "util/font8x16.h" 15 | #include "util/7segment.h" 16 | #include "util/fontlargenumber.h" 17 | 18 | // Change the total fonts included 19 | #define TOTALFONTS 4 20 | 21 | // Add the font name as declared in the header file. Remove as many as possible to conserve FLASH memory. 22 | const unsigned char *SSD1320::fontsPointer[] = { 23 | font5x7, 24 | font8x16, 25 | sevensegment, 26 | fontlargenumber 27 | }; 28 | 29 | // Definition of D/C# command bits 30 | #define SPI3_COMMAND LOW // Command bit is LOW 31 | #define SPI3_DATA HIGH // Data bit is HIGH 32 | 33 | enum { 34 | OLED_INTERFACE_SPI3, // 3-wire SPI interface 35 | OLED_INTERFACE_I2C // I2C interface 36 | }; 37 | 38 | 39 | /** \brief Grayscale Flexible OLED screen buffer. 40 | Page buffer 80 x 32 = 2,560 bytes are needed for full 4-bit grayscale. We don't have that. 41 | So the buffer is 1 bit per pixel or 640 pixels 42 | 43 | TODO - Allow for turning on/off different buffers for different targets. 44 | For example, if target is Teensy, allow for larger buffer that can contain grayscale 45 | 46 | Page buffer is required because in SPI mode the host cannot read the SSD1320's GDRAM 47 | of the controller. This page buffer serves as a scratch RAM for graphical functions. 48 | All drawing function will first be drawn on this page buffer, only upon calling 49 | display() function will transfer the page buffer to the actual LCD controller's memory. 50 | */ 51 | static uint8_t screenMemory [] = { 52 | //LCD Memory organized in 20 bytes (160 columns) and 32 rows = 640 bytes 53 | 54 | //SparkFun Electronics Logo in 8-bit glory! 55 | 56 | // ROW0, BYTE0 to BYTE20 57 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 58 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x73 , 0x9C , 0x71 , 0x0A , 0x30, 59 | 0xA2 , 0x71 , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x42, 60 | 0x10 , 0x41 , 0x0E , 0x48 , 0xE2 , 0x40 , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 61 | 0x00 , 0x00 , 0x04 , 0x62 , 0x18 , 0x41 , 0x0A , 0x48 , 0xE2 , 0x41 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 62 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0x72 , 0x1C , 0x73 , 0x8E , 0x30 , 0xA2 , 0x71 , 0x80 , 0x00, 63 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 64 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0x00, 65 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 66 | 0x00 , 0x07 , 0xCF , 0xE3 , 0xFB , 0x0C , 0x66 , 0x3D , 0xB1 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 67 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0F , 0xEF , 0xF7 , 0x7B , 0x0C , 0xE6 , 0x7F , 0xB1 , 0xC0 , 0x00 , 0x00, 68 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0x6E , 0x36 , 0x3B , 0x0D , 0xC6 , 0x73, 69 | 0xB1 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x01 , 0xEC , 0x37, 70 | 0x3B , 0x0F , 0x86 , 0x71 , 0xB1 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 71 | 0x00 , 0x0F , 0xCC , 0x33 , 0xFB , 0x0F , 0x86 , 0x71 , 0xB1 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 72 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0E , 0x0E , 0x30 , 0x3B , 0x0F , 0x86 , 0x71 , 0xB1 , 0xC0 , 0x00 , 0x00, 73 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0E , 0xEF , 0xF7 , 0x33 , 0xED , 0xC7 , 0x71, 74 | 0xBF , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x07 , 0xC7 , 0xE3, 75 | 0xF3 , 0xEC , 0xEF , 0xF1 , 0xBF , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 76 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0x06 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 77 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0x87 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 78 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0C , 0xC3 , 0x80, 79 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 80 | 0x00 , 0x00 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 81 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 82 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xF0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 83 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xFF , 0x00, 84 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 85 | 0x00 , 0x00 , 0xFF , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 86 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xFF , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 87 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xFF , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00, 88 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x47 , 0xC0, 89 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 90 | 0x00 , 0x00 , 0x07 , 0xC0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 91 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x0F , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 92 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x1C , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 93 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x1C , 0x00, 94 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 95 | 0x00 , 0x00 , 0x0F , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00, 96 | 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 97 | }; 98 | 99 | SSD1320::SSD1320(uint8_t csPin, uint8_t rstPin, uint8_t sclkPin, uint8_t sdoutPin, SPIClass *spiInterface) { 100 | _cs = csPin; 101 | _rst = rstPin; 102 | _sclk = sclkPin; 103 | _sd = sdoutPin; 104 | 105 | _interface = OLED_INTERFACE_SPI3; 106 | _spi = spiInterface; 107 | } 108 | 109 | void SSD1320::begin(uint16_t lcdWidth, uint16_t lcdHeight) { 110 | _displayWidth = lcdWidth; 111 | _displayHeight = lcdHeight; 112 | 113 | if (_interface == OLED_INTERFACE_SPI3) { 114 | pinMode(_cs, OUTPUT); 115 | digitalWrite(_cs, HIGH); // CS = OUTPUT, init HIGH 116 | pinMode(_rst, OUTPUT); 117 | digitalWrite(_rst, LOW); // RST = OUTPUT, init LOW 118 | pinMode(_sclk, OUTPUT); 119 | digitalWrite(_sclk, LOW);// SCLK = OUTPUT, init LOW 120 | pinMode(_sd, OUTPUT); 121 | digitalWrite(_sd, LOW); // SDIN = OUTPUT, init LOW 122 | 123 | } else if (_interface == OLED_INTERFACE_I2C) { 124 | //! TODO 125 | } 126 | 127 | setFontType(0); 128 | setColor(WHITE); 129 | setDrawMode(NORM); 130 | setCursor(0, 0); 131 | 132 | powerUp(); 133 | } 134 | 135 | /////////////////////// 136 | // Private Functions // 137 | /////////////////////// 138 | 139 | /** \brief Send the display a command byte 140 | 141 | Send a command via SPI, I2C or parallel to SSD1320 controller. 142 | Display is configured for 3 wire SPI. Arduino SPI does not support 9-bit SPI. 143 | So we bit bang the first D/C# bit and then use hardware SPI for the command 144 | */ 145 | void SSD1320::command(uint8_t cmd) { 146 | 147 | if (_interface == OLED_INTERFACE_SPI3) { 148 | digitalWrite(_cs, LOW); // CS LOW 149 | 150 | // Send D/C# bit 151 | digitalWrite(_sd, SPI3_COMMAND); // Send command bit 152 | digitalWrite(_sclk, HIGH); // SCLK HIGH - clock in on rising edge 153 | digitalWrite(_sclk, LOW); // SCLK LOW 154 | 155 | // Send command byte 156 | _spi->beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); //Start up SPI again 157 | _spi->transfer(cmd); 158 | _spi->endTransaction(); 159 | 160 | _spi->end(); //We have to stop the SPI hardware before we can bit bang the 9th bit 161 | 162 | digitalWrite(_cs, HIGH); // CS HIGH 163 | 164 | } else if (_interface == OLED_INTERFACE_I2C) { 165 | //! TODO 166 | } 167 | } 168 | 169 | /** \brief Send the display a data byte 170 | 171 | Send a command via SPI, I2C or parallel to SSD1320 controller. 172 | Display is configured for 3 wire SPI. Arduino SPI does not support 9-bit SPI. 173 | So we bit bang the first D/C# bit and then use hardware SPI for the data 174 | */ 175 | void SSD1320::data(uint8_t cmd) { 176 | 177 | if (_interface == OLED_INTERFACE_SPI3) { 178 | digitalWrite(_cs, LOW); // CS LOW 179 | 180 | // Send D/C# bit 181 | digitalWrite(_sd, SPI3_DATA); // Send data bit 182 | digitalWrite(_sclk, HIGH); // SCLK HIGH - clock in on rising edge 183 | digitalWrite(_sclk, LOW); // SCLK LOW 184 | 185 | // Send data byte 186 | _spi->beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); //Start up SPI again 187 | _spi->transfer(cmd); 188 | _spi->endTransaction(); 189 | 190 | _spi->end(); //We have to stop the SPI hardware before we can bit bang the 9th bit 191 | 192 | digitalWrite(_cs, HIGH); // CS HIGH 193 | } else if (_interface == OLED_INTERFACE_I2C) { 194 | //! TODO 195 | } 196 | } 197 | 198 | /** \brief Set SSD1320 column address. 199 | Send page address command and address to the SSD1320 OLED controller. 200 | 201 | This triple byte command specifies column start address and end address 202 | of the display data RAM. This command also sets the column address 203 | pointer to row start address. 204 | */ 205 | void SSD1320::setColumnAddress(uint8_t address) { 206 | command(SETCOLUMN); // Set column address 207 | command(address); //Set start address 208 | command((_displayWidth / 2) - 1); //There are 160 pixels but each byte is 2 pixels. We want addresses 0 to 79. 209 | return; 210 | } 211 | 212 | /** \brief Set SSD1320 row address. 213 | Send page address command and address to the SSD1320 OLED controller. 214 | 215 | This triple byte command specifies row start address and end address 216 | of the display data RAM. This command also sets the row address 217 | pointer to row start address. 218 | */ 219 | void SSD1320::setRowAddress(uint8_t address) { 220 | command(SETROW); // Set row address 221 | command(address); //Set start address 222 | command(_displayHeight - 1); //Set end address: Display has 32 rows of pixels. 223 | return; 224 | } 225 | 226 | // Execute power up sequence as diagramed on page 11 of OLED datasheet 227 | void SSD1320::powerUp() { 228 | digitalWrite(_rst, LOW); // Start with display off 229 | delay(1); // Wait for power to stabilize 230 | 231 | digitalWrite(_rst, HIGH); // Set reset line high 232 | delayMicroseconds(3); 233 | 234 | command(DISPLAYOFF); // 0xAE - Display off 235 | 236 | command(SETDISPLAYCLOCKDIV); // 0xD5 - Clock divide ratio/osc. freq 237 | command(0xC2); // 0xC2 - osc clock=0xC divide ratio = 0x2 238 | 239 | command(SETMULTIPLEX); // 0xA8 - Multiplex ratio 240 | command(0x1F); // 0x1F - 31 241 | 242 | command(SETDISPLAYOFFSET); // 0xD3 - Display offset 243 | command(0x60); // 0x60 - 96 244 | 245 | command(SETSTARTLINE); // 0xA2 - Start line 246 | command(0x00); // 0x00 - Line 0 247 | 248 | command(SETSEGREMAP); // 0xA0 - Segment re-map 249 | 250 | command(COMSCANINC); // 0xC0 - COM Output scan direction 251 | 252 | command(SETCOMPINS); // 0xDA - seg pins hardware config 253 | command(0x12); // 0x12 - 254 | 255 | command(SETCONTRAST); // 0x81 - Contrast control 256 | command(0x5A); // 0x5A - value between 0x00 and 0xFF 257 | 258 | command(SETPHASELENGTH); // 0xD9 - Pre-charge period 259 | command(0x22); // 0x22 260 | 261 | command(SETVCOMDESELECT); // 0xDB - VCOMH Deselect level 262 | command(0x30); // 0x30 263 | 264 | command(SELECTIREF); // 0xAD - Internal IREF Enable 265 | command(0x10); // 0x10 266 | 267 | command(MEMORYMODE); // 0x20 - Memory addressing mode 268 | command(0x00); // 0x00 - Horizontal 269 | 270 | // disable internal charge pump 271 | command(SETCHARGEPMP1); // 0x8D - Internal charge pump 272 | command(0x01); // 0x01 273 | command(SETCHARGEPMP2); // 0xAC - Internal charge pump 274 | command(0x00); // 0x00 275 | 276 | // set entire display on/off 277 | command(RESETALLON); // 0xA4 - Display on 278 | 279 | // set normal/inverse display 280 | command(RESETINVERT); // 0xA6 - Normal display (not inverted) 281 | 282 | // display on 283 | command(DISPLAYON); // 0xAF - Display on 284 | 285 | //Set the row and column limits for this display 286 | //These commands also set the RAM pointer on the display to 0,0 287 | setColumnAddress(0); 288 | setRowAddress(0); 289 | } 290 | 291 | /** \brief Invert display. 292 | The WHITE color of the display will turn to BLACK and the BLACK will turn to WHITE. 293 | */ 294 | void SSD1320::invert(boolean inv) { 295 | if (inv) 296 | command(INVERTDISPLAY); 297 | else 298 | command(RESETINVERT); 299 | } 300 | 301 | /** \brief Set contrast. 302 | OLED contract value from 0 to 255. Note: Contrast level is not very obvious. 303 | */ 304 | void SSD1320::setContrast(uint8_t contrast) { 305 | command(SETCONTRAST); //0x81 306 | command(contrast); 307 | } 308 | 309 | /** \brief Transfer display memory. 310 | Bulk move the screen buffer to the SSD1320 controller's memory so that images/graphics 311 | drawn on the screen buffer will be displayed on the OLED. 312 | */ 313 | void SSD1320::display(void) { 314 | 315 | //Return CGRAM pointer to 0,0 316 | setColumnAddress(0); 317 | setRowAddress(0); 318 | 319 | for (uint8_t rows = 0 ; rows < 32 ; rows++) 320 | { 321 | for (uint8_t columns = 0 ; columns < 20 ; columns++) 322 | { 323 | uint8_t originalByte = screenMemory[(int)rows * 20 + columns]; 324 | for (uint8_t bitNumber = 8 ; bitNumber > 0 ; bitNumber -= 2) 325 | { 326 | uint8_t newByte = 0; 327 | //Because our scatch buffer is too small to contain 4-bit grayscale, 328 | //we extrapolate 1 bit onto 4 bits so we pull in two bits to make a byte. 329 | //We look at each bit in the byte and change it to 0 = 0x00 and 1 = 0x0F. 330 | if ( (originalByte & (1 << (bitNumber - 1))) != 0) newByte |= 0x0F; 331 | if ( (originalByte & (1 << (bitNumber - 2))) != 0) newByte |= 0xF0; 332 | 333 | data(newByte); 334 | } 335 | } 336 | } 337 | } 338 | 339 | /** \brief Override Arduino's Print. 340 | Arduino's print overridden so that we can use oled.print(). 341 | */ 342 | size_t SSD1320::write(uint8_t c) { 343 | if (c == '\n') 344 | { 345 | cursorY += fontHeight; 346 | cursorX = 0; 347 | } 348 | else if (c == '\r') 349 | { 350 | // skip 351 | } 352 | else 353 | { 354 | drawChar(cursorX, cursorY, c, foreColor, drawMode); 355 | cursorX += fontWidth + 1; 356 | if ((cursorX > (_displayWidth - fontWidth))) 357 | { 358 | cursorY += fontHeight; 359 | cursorX = 0; 360 | } 361 | } 362 | 363 | return 1; 364 | } 365 | 366 | /** \brief Draw line. 367 | Draw line using current fore color and current draw mode from x0,y0 to x1,y1 of the screen buffer. 368 | */ 369 | void SSD1320::line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1) { 370 | line(x0, y0, x1, y1, foreColor, drawMode); 371 | } 372 | 373 | /** \brief Draw line with color and mode. 374 | Draw line using color and mode from x0,y0 to x1,y1 of the screen buffer. 375 | */ 376 | void SSD1320::line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode) { 377 | uint8_t steep = abs(y1 - y0) > abs(x1 - x0); 378 | if (steep) { 379 | swap(x0, y0); 380 | swap(x1, y1); 381 | } 382 | 383 | if (x0 > x1) { 384 | swap(x0, x1); 385 | swap(y0, y1); 386 | } 387 | 388 | uint8_t dx, dy; 389 | dx = x1 - x0; 390 | dy = abs(y1 - y0); 391 | 392 | int8_t err = dx / 2; 393 | int8_t ystep; 394 | 395 | if (y0 < y1) { 396 | ystep = 1; 397 | } else { 398 | ystep = -1; 399 | } 400 | 401 | for (; x0 < x1; x0++) { 402 | if (steep) { 403 | setPixel(y0, x0, color, mode); 404 | } else { 405 | setPixel(x0, y0, color, mode); 406 | } 407 | err -= dy; 408 | if (err < 0) { 409 | y0 += ystep; 410 | err += dx; 411 | } 412 | } 413 | } 414 | 415 | /** \brief Draw horizontal line. 416 | Draw horizontal line using current fore color and current draw mode from x,y to x+width,y of the screen buffer. 417 | */ 418 | void SSD1320::lineH(uint8_t x, uint8_t y, uint8_t width) { 419 | line(x, y, x + width, y, foreColor, drawMode); 420 | } 421 | 422 | /** \brief Draw horizontal line with color and mode. 423 | Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer. 424 | */ 425 | void SSD1320::lineH(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) { 426 | line(x, y, x + width, y, color, mode); 427 | } 428 | 429 | /** \brief Draw vertical line. 430 | Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer. 431 | */ 432 | void SSD1320::lineV(uint8_t x, uint8_t y, uint8_t height) { 433 | line(x, y, x, y + height, foreColor, drawMode); 434 | } 435 | 436 | /** \brief Draw vertical line with color and mode. 437 | Draw vertical line using color and mode from x,y to x,y+height of the screen buffer. 438 | */ 439 | void SSD1320::lineV(uint8_t x, uint8_t y, uint8_t height, uint8_t color, uint8_t mode) { 440 | line(x, y, x, y + height, color, mode); 441 | } 442 | 443 | /** \brief Draw rectangle. 444 | Draw rectangle using current fore color and current draw mode from x,y to x+width,y+height of the screen buffer. 445 | */ 446 | void SSD1320::rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height) { 447 | rect(x, y, width, height, foreColor, drawMode); 448 | } 449 | 450 | /** \brief Draw rectangle with color and mode. 451 | Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. 452 | */ 453 | void SSD1320::rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode) { 454 | uint8_t tempHeight; 455 | 456 | lineH(x, y, width, color, mode); 457 | lineH(x, y + height - 1, width, color, mode); 458 | 459 | tempHeight = height - 2; 460 | 461 | // skip drawing vertical lines to avoid overlapping of pixel that will 462 | // affect XOR plot if no pixel in between horizontal lines 463 | if (tempHeight < 1) return; 464 | 465 | lineV(x, y + 1, tempHeight, color, mode); 466 | lineV(x + width - 1, y + 1, tempHeight, color, mode); 467 | } 468 | 469 | /** \brief Draw filled rectangle. 470 | Draw filled rectangle using current fore color and current draw mode from x,y to x+width,y+height of the screen buffer. 471 | */ 472 | void SSD1320::rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height) { 473 | rectFill(x, y, width, height, foreColor, drawMode); 474 | } 475 | 476 | /** \brief Draw filled rectangle with color and mode. 477 | Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer. 478 | */ 479 | void SSD1320::rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode) { 480 | // TODO - need to optimise the memory map draw so that this function will not call pixel one by one 481 | for (int i = x; i < x + width; i++) { 482 | lineV(i, y, height, color, mode); 483 | } 484 | } 485 | 486 | /** \brief Draw circle. 487 | Draw circle with radius using current fore color and current draw mode at x,y of the screen buffer. 488 | */ 489 | void SSD1320::circle(uint8_t x0, uint8_t y0, uint8_t radius) { 490 | circle(x0, y0, radius, foreColor, drawMode); 491 | } 492 | 493 | /** \brief Draw circle with color and mode. 494 | Draw circle with radius using color and mode at x,y of the screen buffer. 495 | */ 496 | void SSD1320::circle(uint8_t x0, uint8_t y0, uint8_t radius, uint8_t color, uint8_t mode) { 497 | //TODO - find a way to check for no overlapping of pixels so that XOR draw mode will work perfectly 498 | int8_t f = 1 - radius; 499 | int8_t ddF_x = 1; 500 | int8_t ddF_y = -2 * radius; 501 | int8_t x = 0; 502 | int8_t y = radius; 503 | 504 | setPixel(x0, y0 + radius, color, mode); 505 | setPixel(x0, y0 - radius, color, mode); 506 | setPixel(x0 + radius, y0, color, mode); 507 | setPixel(x0 - radius, y0, color, mode); 508 | 509 | while (x < y) { 510 | if (f >= 0) { 511 | y--; 512 | ddF_y += 2; 513 | f += ddF_y; 514 | } 515 | x++; 516 | ddF_x += 2; 517 | f += ddF_x; 518 | 519 | setPixel(x0 + x, y0 + y, color, mode); 520 | setPixel(x0 - x, y0 + y, color, mode); 521 | setPixel(x0 + x, y0 - y, color, mode); 522 | setPixel(x0 - x, y0 - y, color, mode); 523 | 524 | setPixel(x0 + y, y0 + x, color, mode); 525 | setPixel(x0 - y, y0 + x, color, mode); 526 | setPixel(x0 + y, y0 - x, color, mode); 527 | setPixel(x0 - y, y0 - x, color, mode); 528 | } 529 | } 530 | 531 | /** \brief Draw filled circle. 532 | Draw filled circle with radius using current fore color and current draw mode at x,y of the screen buffer. 533 | */ 534 | void SSD1320::circleFill(uint8_t x0, uint8_t y0, uint8_t radius) { 535 | circleFill(x0, y0, radius, foreColor, drawMode); 536 | } 537 | 538 | /** \brief Draw filled circle with color and mode. 539 | Draw filled circle with radius using color and mode at x,y of the screen buffer. 540 | */ 541 | void SSD1320::circleFill(uint8_t x0, uint8_t y0, uint8_t radius, uint8_t color, uint8_t mode) { 542 | // TODO - - find a way to check for no overlapping of pixels so that XOR draw mode will work perfectly 543 | int8_t f = 1 - radius; 544 | int8_t ddF_x = 1; 545 | int8_t ddF_y = -2 * radius; 546 | int8_t x = 0; 547 | int8_t y = radius; 548 | 549 | // Temporary disable fill circle for XOR mode. 550 | if (mode == XOR) return; 551 | 552 | for (uint8_t i = y0 - radius ; i <= y0 + radius ; i++) { 553 | setPixel(x0, i, color, mode); 554 | } 555 | 556 | while (x < y) { 557 | if (f >= 0) { 558 | y--; 559 | ddF_y += 2; 560 | f += ddF_y; 561 | } 562 | x++; 563 | ddF_x += 2; 564 | f += ddF_x; 565 | 566 | for (uint8_t i = y0 - y ; i <= y0 + y ; i++) { 567 | setPixel(x0 + x, i, color, mode); 568 | setPixel(x0 - x, i, color, mode); 569 | } 570 | for (uint8_t i = y0 - x ; i <= y0 + x ; i++) { 571 | setPixel(x0 + y, i, color, mode); 572 | setPixel(x0 - y, i, color, mode); 573 | } 574 | } 575 | } 576 | 577 | /** \brief Draw character. 578 | Draw character c using current color and current draw mode at x,y. 579 | */ 580 | void SSD1320::drawChar(uint8_t x, uint8_t y, uint8_t c) { 581 | drawChar(x, y, c, foreColor, drawMode); 582 | } 583 | 584 | /** \brief Draw character with color and mode. 585 | Draw character c using color and draw mode at x,y. 586 | */ 587 | void SSD1320::drawChar(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode) { 588 | // TODO - New routine to take font of any height, at the moment limited to font height in multiple of 8 pixels 589 | 590 | uint8_t rowsToDraw, row, tempC; 591 | uint8_t i, j, temp; 592 | uint16_t charPerBitmapRow, charColPositionOnBitmap, charRowPositionOnBitmap, charBitmapStartPosition; 593 | 594 | if ((c < fontStartChar) || (c > (fontStartChar + fontTotalChar - 1))) // no bitmap available for the required c 595 | return; 596 | 597 | tempC = c - fontStartChar; //Turn user's character into a byte number 598 | 599 | // each row (in datasheet is called a page) is 8 bits high, 16 bit high character will have 2 rows to be drawn 600 | rowsToDraw = fontHeight / 8; // 8 is LCD's page size, see datasheet 601 | if (rowsToDraw < 1) rowsToDraw = 1; 602 | 603 | // The following draw function can draw anywhere on the screen, but SLOW pixel by pixel draw 604 | if (rowsToDraw == 1) { 605 | for (i = 0 ; i < fontWidth + 1 ; i++) 606 | { 607 | if (i == fontWidth) // this is done in a weird way because for 5x7 font, there is no margin, this code add a margin after col 5 608 | temp = 0; 609 | else 610 | temp = pgm_read_byte(fontsPointer[fontType] + FONTHEADERSIZE + (tempC * fontWidth) + i); 611 | 612 | //0x7F is the first vertical line of the lowercase letter h 613 | //The fonts are coming in upside down? 614 | temp = flipByte(temp); 615 | 616 | //Step through this line of the character checking each bit and setting a pixel 617 | for (j = 0 ; j < 8 ; j++) 618 | { 619 | if (temp & 0x01) { 620 | setPixel(x + i, y + j, color, mode); 621 | } 622 | else { 623 | setPixel(x + i, y + j, !color, mode); 624 | } 625 | 626 | temp >>= 1; 627 | } 628 | } 629 | return; 630 | } 631 | 632 | // Font height over 8 bit 633 | // Take character "0" ASCII 48 as example 634 | charPerBitmapRow = fontMapWidth / fontWidth; // 256/8 = 32 char per row 635 | charColPositionOnBitmap = tempC % charPerBitmapRow; // = 16 636 | charRowPositionOnBitmap = int(tempC / charPerBitmapRow); // = 1 637 | charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight / 8)) + (charColPositionOnBitmap * fontWidth) ; 638 | 639 | for (row = 0 ; row < rowsToDraw ; row++) { 640 | for (i = 0 ; i < fontWidth ; i++) { 641 | temp = pgm_read_byte(fontsPointer[fontType] + FONTHEADERSIZE + (charBitmapStartPosition + i + (row * fontMapWidth))); 642 | 643 | //The fonts are coming in upside down 644 | //Additionally, the large font #1 has padding at the (now) bottom that causes problems 645 | //The fonts really need to be updated 646 | temp = flipByte(temp); 647 | 648 | for (j = 0 ; j < 8 ; j++) { 649 | if (temp & 0x01) { 650 | setPixel(x + i, y + j + ((rowsToDraw - 1 - row) * 8), color, mode); 651 | } 652 | else { 653 | setPixel(x + i, y + j + ((rowsToDraw - 1 - row) * 8), !color, mode); 654 | } 655 | temp >>= 1; 656 | } 657 | } 658 | } 659 | } 660 | 661 | /* 662 | Draw Bitmap image on screen. The array for the bitmap can be stored in the Arduino file, 663 | so user don't have to mess with the library files. 664 | To use, create uint8_t array that is 160x32 pixels (640 bytes). Then call .drawBitmap and pass it the array. 665 | */ 666 | void SSD1320::drawBitmap(uint8_t * bitArray) 667 | { 668 | for (int i = 0; i < (_displayWidth * _displayHeight / 8); i++) 669 | screenMemory[i] = bitArray[i]; 670 | } 671 | 672 | /** \brief Draw pixel. 673 | Draw pixel using the current fore color and current draw mode in the screen buffer's x,y position. 674 | */ 675 | void SSD1320::setPixel(uint8_t x, uint8_t y) { 676 | setPixel(x, y, foreColor, drawMode); 677 | } 678 | 679 | /** \brief Draw pixel with color and mode. 680 | Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode. 681 | */ 682 | void SSD1320::setPixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) { 683 | if ((x < 0) || (x >= _displayWidth) || (y < 0) || (y >= _displayHeight)) 684 | return; 685 | 686 | int byteNumber = y * (_displayWidth / 8) + (x / 8); 687 | 688 | if (mode == XOR) 689 | { 690 | screenMemory[byteNumber] ^= (1 << (7 - (x % 8))); 691 | } 692 | else //mode = NORM 693 | { 694 | if (color == WHITE) 695 | { 696 | screenMemory[byteNumber] |= (1 << (7 - (x % 8))); 697 | } 698 | else 699 | { 700 | screenMemory[byteNumber] &= ~(1 << (7 - (x % 8))); 701 | } 702 | } 703 | } 704 | 705 | /** \brief Clear screen buffer or SSD1306's memory. 706 | To clear both RAM and local buffer use CLEAR_ALL 707 | To clear GDRAM inside the LCD controller use CLEAR_DISPLAY 708 | To clear local buffer use CLEAR_BUFFER 709 | */ 710 | void SSD1320::clearDisplay(uint8_t mode) 711 | { 712 | if (mode == CLEAR_DISPLAY || mode == CLEAR_ALL) //Clear the RAM on the display 713 | { 714 | //Return CGRAM pointer to 0,0 715 | setColumnAddress(0); 716 | setRowAddress(0); 717 | 718 | //Display is 160 pixels long and 32 pixels wide 719 | //Each byte paints two sequential pixels 720 | //Each 4-bit nibble is the 4-bit grayscale for that pixel 721 | //There are only 80 columns because each byte has 2 pixels 722 | for (int rows = 0 ; rows < _displayHeight ; rows++) 723 | for (int columns = 0 ; columns < (_displayWidth / 2) ; columns++) 724 | data(0x00); 725 | 726 | if (mode == CLEAR_ALL) memset(screenMemory, 0, (_displayHeight * _displayWidth / 8)); //Clear the local buffer as well 727 | } 728 | else //Clear the local buffer 729 | { 730 | memset(screenMemory, 0, (_displayHeight * _displayWidth / 8)); // (32 x 160/8) = 640 bytes in the screenMemory buffer 731 | } 732 | } 733 | 734 | /** \brief Set cursor position. 735 | OLED's cursor position to x,y. 736 | */ 737 | void SSD1320::setCursor(uint8_t x, uint8_t y) { 738 | cursorX = x; 739 | cursorY = y; 740 | } 741 | 742 | /** \brief Set the display height. 743 | Set the height of the display. This will affect the setPixel function. 744 | */ 745 | void SSD1320::setDisplayHeight(uint16_t H) { 746 | _displayHeight = H; 747 | } 748 | 749 | /** \brief Set the display width. 750 | Set the width of the display. This will affect the setPixel function. 751 | */ 752 | void SSD1320::setDisplayWidth(uint16_t W) { 753 | _displayWidth = W; 754 | } 755 | 756 | /** \brief Get display height. 757 | The height of the display returned as int. 758 | */ 759 | uint16_t SSD1320::getDisplayHeight(void) { 760 | return _displayHeight; 761 | } 762 | 763 | /** \brief Get display width. 764 | The width of the display returned as int. 765 | */ 766 | uint16_t SSD1320::getDisplayWidth(void) { 767 | return _displayWidth; 768 | } 769 | 770 | /** \brief Set color. 771 | Set the current draw's color. Only WHITE and BLACK available. 772 | */ 773 | void SSD1320::setColor(uint8_t color) { 774 | foreColor = color; 775 | } 776 | 777 | /** \brief Set draw mode. 778 | Set current draw mode with NORM or XOR. 779 | */ 780 | void SSD1320::setDrawMode(uint8_t mode) { 781 | drawMode = mode; 782 | } 783 | 784 | //https://forum.arduino.cc/index.php?topic=117966.0 785 | uint8_t SSD1320::flipByte(uint8_t c) 786 | { 787 | c = ((c >> 1) & 0x55) | ((c << 1) & 0xAA); 788 | c = ((c >> 2) & 0x33) | ((c << 2) & 0xCC); 789 | c = (c >> 4) | (c << 4) ; 790 | 791 | return c; 792 | } 793 | 794 | /* 795 | Return a pointer to the start of the RAM screen buffer for direct access. 796 | */ 797 | uint8_t *SSD1320::getScreenBuffer(void) { 798 | return screenMemory; 799 | } 800 | 801 | /** \brief Get font width. 802 | The cucrrent font's width return as byte. 803 | */ 804 | uint8_t SSD1320::getFontWidth(void) { 805 | return fontWidth; 806 | } 807 | 808 | /** \brief Get font height. 809 | The current font's height return as byte. 810 | */ 811 | uint8_t SSD1320::getFontHeight(void) { 812 | return fontHeight; 813 | } 814 | 815 | /** \brief Get total fonts. 816 | Return the total number of fonts loaded into the MicroOLED's flash memory. 817 | */ 818 | uint8_t SSD1320::getTotalFonts(void) { 819 | return TOTALFONTS; 820 | } 821 | 822 | /** \brief Get font type. 823 | Return the font type number of the current font. 824 | */ 825 | uint8_t SSD1320::getFontType(void) { 826 | return fontType; 827 | } 828 | 829 | /** \brief Set font type. 830 | Set the current font type number, ie changing to different fonts base on the type provided. 831 | */ 832 | boolean SSD1320::setFontType(uint8_t type) { 833 | if ((type >= TOTALFONTS) || (type < 0)) 834 | return false; 835 | 836 | fontType = type; 837 | fontWidth = pgm_read_byte(fontsPointer[fontType] + 0); 838 | fontHeight = pgm_read_byte(fontsPointer[fontType] + 1); 839 | fontStartChar = pgm_read_byte(fontsPointer[fontType] + 2); 840 | fontTotalChar = pgm_read_byte(fontsPointer[fontType] + 3); 841 | fontMapWidth = (pgm_read_byte(fontsPointer[fontType] + 4) * 100) + pgm_read_byte(fontsPointer[fontType] + 5); // two bytes values into integer 16 842 | return true; 843 | } 844 | 845 | /** \brief Get font starting character. 846 | Return the starting ASCII character of the currnet font, not all fonts start with ASCII character 0. Custom fonts can start from any ASCII character. 847 | */ 848 | uint8_t SSD1320::getFontStartChar(void) { 849 | return fontStartChar; 850 | } 851 | 852 | /** \brief Get font total characters. 853 | Return the total characters of the current font. 854 | */ 855 | uint8_t SSD1320::getFontTotalChar(void) { 856 | return fontTotalChar; 857 | } 858 | 859 | /** \brief Right scrolling. 860 | Set row start to row stop on the OLED to scroll right. 861 | 862 | Scrolling in not documented for the SSD1320 but I stumbled on 863 | some interesting behavior. scrollRight does nothing (but is documented 864 | in SSD1306). scrollLeft is the one that does weird stuff. 865 | */ 866 | void SSD1320::scrollRight(uint8_t start, uint8_t stop) { 867 | if (stop < start) // stop must be larger or equal to start 868 | return; 869 | scrollStop(); // need to disable scrolling before starting to avoid memory corruption 870 | command(RIGHTHORIZONTALSCROLL); 871 | command(0x00); //Byte A - Dummy 0x00 872 | command(start); //Byte B - Define start page address 873 | command(0x07); //Byte C - Set scroll speed to 2 frames (time interval in number of frames 5/64/128/256/3/4/25/2) 874 | command(stop); //Byte D - Define end page address 875 | command(0x00); //Byte E - Dummy 0x00 876 | command(0xFF); //Byte F - Dummy 0xFF 877 | command(ACTIVATESCROLL); 878 | } 879 | 880 | /** \brief Left scrolling. 881 | Set row start to row stop on the OLED to scroll left. 882 | */ 883 | void SSD1320::scrollLeft(uint8_t start, uint8_t stop) { 884 | if (stop < start) // Stop must be larger or equal to start 885 | return; 886 | 887 | scrollStop(); // Must disable scrolling before starting to avoid memory corruption 888 | 889 | command(LEFTHORIZONTALSCROLL); 890 | command(0x00); //Dummy byte 891 | command(0x00); //Dummy byte 892 | command(start); //Define starting page address 893 | 894 | command(32); //Number of rows to scroll. You scan scroll part of the display 895 | 896 | command(stop); //Define end page address 897 | command(0x00); 898 | command(0xFF); //Speed? 899 | command(ACTIVATESCROLL); 900 | } 901 | 902 | /** \brief Left scrolling. 903 | Set row start to row stop on the OLED to scroll left. 904 | 905 | Undocumented. Doesn't yet work. 906 | */ 907 | void SSD1320::scrollUp(uint8_t start, uint8_t stop) { 908 | if (stop < start) // Stop must be larger or equal to start 909 | return; 910 | 911 | scrollStop(); // Must disable scrolling before starting to avoid memory corruption 912 | 913 | command(SETVERTICALSCROLLAREA); 914 | command(0x00); //Byte A - Set number of rows in top fixed area 915 | command(64); //Byte B - Set number of rows in scroll area 916 | 917 | command(VERTICALRIGHTHORIZONTALSCROLL); 918 | command(0x00); //Byte A - Dummy byte 919 | //command(0x00); //Dummy byte 920 | command(start); //Byte B - Define starting page address 921 | 922 | command(0); //Byte C - Number of rows to scroll. You scan scroll part of the display 923 | 924 | command(stop); //Byte D - Define end page address 925 | command(0x01); //Byte E - Vertical scrolling offset 926 | command(ACTIVATESCROLL); 927 | } 928 | /** \brief Stop scrolling. 929 | Stop the scrolling of graphics on the OLED. 930 | */ 931 | void SSD1320::scrollStop(void) { 932 | command(DEACTIVATESCROLL); 933 | } 934 | 935 | /** \brief Vertical flip. 936 | Flip the graphics on the OLED vertically. 937 | */ 938 | void SSD1320::flipVertical(boolean flip) { 939 | if (flip) { 940 | command(COMSCANINC); 941 | } 942 | else { 943 | command(COMSCANDEC); 944 | } 945 | } 946 | 947 | /** \brief Horizontal flip. 948 | Flip the graphics on the OLED horizontally. 949 | */ 950 | void SSD1320::flipHorizontal(boolean flip) { 951 | if (flip) { 952 | command(SETSEGREMAP | 0x01); //Set the bit 953 | } 954 | else { 955 | command(SETSEGREMAP & ~0x01); //Clear the bit 956 | } 957 | } 958 | -------------------------------------------------------------------------------- /src/SSD1320_OLED.h: -------------------------------------------------------------------------------- 1 | /* 2 | This is a basic driver for the SSD1320 OLED driver IC. It can initialize the display 3 | and do simple commands like setPixels, drawCharacters, and other simple commands. 4 | 5 | We can't use SPI library out of the box because the display 6 | requires 9-bit data in 3-wire SPI mode. 7 | So we bit-bang the first bit then use SPI hardware to send remaining 8 bits 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #define SCLK_PIN_DEFAULT 13 14 | #define SDOUT_PIN_DEFAULT 11 15 | #define CS_PIN_DEFAULT 10 16 | #define RST_PIN_DEFAULT 8 17 | 18 | #define swap(a, b) { uint8_t t = a; a = b; b = t; } 19 | 20 | #define BLACK 0 21 | #define WHITE 1 22 | 23 | #define FONTHEADERSIZE 6 24 | 25 | #define NORM 0 26 | #define XOR 1 27 | 28 | #define CLEAR_ALL 0 29 | #define CLEAR_DISPLAY 1 30 | #define CLEAR_BUFFER 2 31 | 32 | #define MEMORYMODE 0x20 33 | #define SETCOLUMN 0x21 34 | #define SETROW 0x22 35 | #define SETPORTRAIT 0x25 36 | #define SETCONTRAST 0x81 37 | #define SETCHARGEPMP1 0x8D 38 | #define SETSEGREMAP 0xA0 39 | #define SETSTARTLINE 0xA2 40 | #define RESETALLON 0xA4 41 | #define DISPLAYALLON 0xA5 42 | #define RESETINVERT 0xA6 43 | #define INVERTDISPLAY 0xA7 44 | #define SETMULTIPLEX 0xA8 45 | #define SETCHARGEPMP2 0xAC 46 | #define SELECTIREF 0xAD 47 | #define DISPLAYOFF 0xAE 48 | #define DISPLAYON 0xAF 49 | #define SETPRECHARGE 0xBC 50 | #define SETGSTABLE 0xBE 51 | #define SETDEFAULTTABLE 0xBF 52 | #define COMSCANINC 0xC0 53 | #define COMSCANDEC 0xC8 54 | #define SETDISPLAYOFFSET 0xD3 55 | #define SETDISPLAYCLOCKDIV 0xD5 56 | #define SETPHASELENGTH 0xD9 57 | #define SETCOMPINS 0xDA 58 | #define SETVCOMDESELECT 0xDB 59 | #define SETCOMMANDLOCK 0xFD 60 | 61 | // Scroll - It's not documented in the SSD1320 doc but we 62 | // guessed at it from the SSD1306 doc (see MicroOLED product). 63 | #define ACTIVATESCROLL 0x2F 64 | #define DEACTIVATESCROLL 0x2E 65 | #define SETVERTICALSCROLLAREA 0xA3 66 | #define RIGHTHORIZONTALSCROLL 0x26 67 | #define LEFTHORIZONTALSCROLL 0x27 68 | #define VERTICALRIGHTHORIZONTALSCROLL 0x29 69 | #define VERTICALLEFTHORIZONTALSCROLL 0x2A 70 | 71 | typedef enum CMD { 72 | CMD_CLEAR, //0 73 | CMD_INVERT, //1 74 | CMD_CONTRAST, //2 75 | CMD_DISPLAY, //3 76 | CMD_SETCURSOR, //4 77 | CMD_PIXEL, //5 78 | CMD_LINE, //6 79 | CMD_LINEH, //7 80 | CMD_LINEV, //8 81 | CMD_RECT, //9 82 | CMD_RECTFILL, //10 83 | CMD_CIRCLE, //11 84 | CMD_CIRCLEFILL, //12 85 | CMD_DRAWCHAR, //13 86 | CMD_DRAWBITMAP, //14 87 | CMD_GETLCDWIDTH, //15 88 | CMD_GETLCDHEIGHT, //16 89 | CMD_SETCOLOR, //17 90 | CMD_SETDRAWMODE //18 91 | } commCommand_t; 92 | 93 | class SSD1320 : public Print { 94 | public: 95 | SSD1320(uint8_t csPin = CS_PIN_DEFAULT, 96 | uint8_t rstPin = RST_PIN_DEFAULT, 97 | uint8_t sclkPin = SCLK_PIN_DEFAULT, 98 | uint8_t sdoutPin = SDOUT_PIN_DEFAULT, 99 | SPIClass *spiInterface = &SPI); 100 | void begin(uint16_t, uint16_t); 101 | virtual size_t write(uint8_t); 102 | 103 | // RAW LCD functions 104 | void command(uint8_t cmd); 105 | void data(uint8_t d); 106 | void setColumnAddress(uint8_t address); 107 | void setRowAddress(uint8_t address); 108 | 109 | // LCD Draw functions 110 | void clearDisplay(uint8_t mode = CLEAR_ALL); 111 | void display(void); 112 | void setCursor(uint8_t x, uint8_t y); 113 | 114 | void invert(boolean inv); 115 | void setContrast(uint8_t contrast); 116 | void flipVertical(boolean flip); 117 | void flipHorizontal(boolean flip); 118 | 119 | void setPixel(uint8_t x, uint8_t y); 120 | void setPixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode); 121 | 122 | void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1); 123 | void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode); 124 | void lineH(uint8_t x, uint8_t y, uint8_t width); 125 | void lineH(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode); 126 | void lineV(uint8_t x, uint8_t y, uint8_t height); 127 | void lineV(uint8_t x, uint8_t y, uint8_t height, uint8_t color, uint8_t mode); 128 | 129 | void rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height); 130 | void rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode); 131 | void rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height); 132 | void rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode); 133 | 134 | void circle(uint8_t x, uint8_t y, uint8_t radius); 135 | void circle(uint8_t x, uint8_t y, uint8_t radius, uint8_t color, uint8_t mode); 136 | void circleFill(uint8_t x0, uint8_t y0, uint8_t radius); 137 | void circleFill(uint8_t x0, uint8_t y0, uint8_t radius, uint8_t color, uint8_t mode); 138 | 139 | void drawChar(uint8_t x, uint8_t y, uint8_t c); 140 | void drawChar(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode); 141 | 142 | void drawBitmap(uint8_t *bitArray); 143 | 144 | uint16_t getDisplayWidth(void); 145 | uint16_t getDisplayHeight(void); 146 | void setDisplayWidth(uint16_t); 147 | void setDisplayHeight(uint16_t); 148 | void setColor(uint8_t color); 149 | void setDrawMode(uint8_t mode); 150 | uint8_t *getScreenBuffer(void); 151 | 152 | //Font functions 153 | uint8_t getFontWidth(void); 154 | uint8_t getFontHeight(void); 155 | uint8_t getTotalFonts(void); 156 | uint8_t getFontType(void); 157 | boolean setFontType(uint8_t type); 158 | uint8_t getFontStartChar(void); 159 | uint8_t getFontTotalChar(void); 160 | 161 | // LCD Rotate Scroll functions 162 | void scrollRight(uint8_t start, uint8_t stop); 163 | void scrollLeft(uint8_t start, uint8_t stop); 164 | 165 | //TODO Add 0x29/0x2A vertical scrolling commands 166 | void scrollUp(uint8_t start, uint8_t stop); 167 | //void scrollVertLeft(uint8_t start, uint8_t stop); 168 | 169 | void scrollStop(void); 170 | 171 | private: 172 | uint8_t _sclk, _sd, _cs, _rst; 173 | uint8_t _interface; 174 | SPIClass *_spi; 175 | 176 | uint16_t _displayWidth, _displayHeight; 177 | 178 | void powerUp(); 179 | static const unsigned char *fontsPointer[]; 180 | 181 | uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; 182 | uint16_t fontMapWidth; 183 | 184 | uint8_t flipByte(uint8_t thing); 185 | }; 186 | -------------------------------------------------------------------------------- /src/util/7segment.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 7segment.h 3 | Definition for 7-segment font 4 | 5 | This file was imported from the MicroView library, written by GeekAmmo 6 | (https://github.com/geekammo/MicroView-Arduino-Library), and released under 7 | the terms of the GNU General Public License as published by the Free Software 8 | Foundation, either version 3 of the License, or (at your option) any later 9 | version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | ******************************************************************************/ 19 | #ifndef FONT7SEGMENT_H 20 | #define FONT7SEGMENT_H 21 | 22 | #include 23 | 24 | static const unsigned char sevensegment [] PROGMEM = { 25 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 26 | 10,16,46,12,1,20, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02, 0xFC, 0x78, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 0x00, 0x00, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 30 | 0xFC, 0x78, 0x00, 0x00, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x7E, 0xFF, 0x00, 0x80, 31 | 0x80, 0x80, 0x80, 0x00, 0xFF, 0x7E, 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0x00, 0x00, 32 | 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x03, 33 | 0x03, 0x02, 0xFC, 0x78, 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x78, 0xFC, 34 | 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x60, 0xF0, 0xF0, 0x60, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x3F, 0x40, 0xC0, 36 | 0xC0, 0xC0, 0xC0, 0x40, 0x3F, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 37 | 0x1C, 0x3E, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x00, 0x00, 0x00, 0x00, 0x41, 0xC1, 0xC1, 0xC1, 38 | 0xC1, 0x41, 0x3E, 0x1C, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, 0x7E, 0x00, 0x00, 39 | 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C, 0x1C, 0x3E, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 40 | 0x3E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 0x1C, 0x3E, 0x41, 0xC1, 41 | 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C, 0x00, 0x00, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C 42 | }; 43 | #endif -------------------------------------------------------------------------------- /src/util/font5x7.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | font5x7.h 3 | Definition for small font 4 | 5 | This file was imported from the MicroView library, written by GeekAmmo 6 | (https://github.com/geekammo/MicroView-Arduino-Library), and released under 7 | the terms of the GNU General Public License as published by the Free Software 8 | Foundation, either version 3 of the License, or (at your option) any later 9 | version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | ******************************************************************************/ 19 | #ifndef FONT5X7_H 20 | #define FONT5X7_H 21 | 22 | #include 23 | 24 | // Standard ASCII 5x7 font 25 | static const unsigned char font5x7[] PROGMEM = { 26 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 27 | 5,8,0,255,12,75, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 29 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 30 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 31 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 32 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 33 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 34 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 35 | 0x00, 0x18, 0x3C, 0x18, 0x00, 36 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 37 | 0x00, 0x18, 0x24, 0x18, 0x00, 38 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 39 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 40 | 0x26, 0x29, 0x79, 0x29, 0x26, 41 | 0x40, 0x7F, 0x05, 0x05, 0x07, 42 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 43 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 44 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 45 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 46 | 0x14, 0x22, 0x7F, 0x22, 0x14, 47 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 48 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 49 | 0x00, 0x66, 0x89, 0x95, 0x6A, 50 | 0x60, 0x60, 0x60, 0x60, 0x60, 51 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 52 | 0x08, 0x04, 0x7E, 0x04, 0x08, 53 | 0x10, 0x20, 0x7E, 0x20, 0x10, 54 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 55 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 56 | 0x1E, 0x10, 0x10, 0x10, 0x10, 57 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 58 | 0x30, 0x38, 0x3E, 0x38, 0x30, 59 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 60 | 0x00, 0x00, 0x00, 0x00, 0x00, 61 | 0x00, 0x00, 0x5F, 0x00, 0x00, 62 | 0x00, 0x07, 0x00, 0x07, 0x00, 63 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 64 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 65 | 0x23, 0x13, 0x08, 0x64, 0x62, 66 | 0x36, 0x49, 0x56, 0x20, 0x50, 67 | 0x00, 0x08, 0x07, 0x03, 0x00, 68 | 0x00, 0x1C, 0x22, 0x41, 0x00, 69 | 0x00, 0x41, 0x22, 0x1C, 0x00, 70 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 71 | 0x08, 0x08, 0x3E, 0x08, 0x08, 72 | 0x00, 0x80, 0x70, 0x30, 0x00, 73 | 0x08, 0x08, 0x08, 0x08, 0x08, 74 | 0x00, 0x00, 0x60, 0x60, 0x00, 75 | 0x20, 0x10, 0x08, 0x04, 0x02, 76 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 77 | 0x00, 0x42, 0x7F, 0x40, 0x00, 78 | 0x72, 0x49, 0x49, 0x49, 0x46, 79 | 0x21, 0x41, 0x49, 0x4D, 0x33, 80 | 0x18, 0x14, 0x12, 0x7F, 0x10, 81 | 0x27, 0x45, 0x45, 0x45, 0x39, 82 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 83 | 0x41, 0x21, 0x11, 0x09, 0x07, 84 | 0x36, 0x49, 0x49, 0x49, 0x36, 85 | 0x46, 0x49, 0x49, 0x29, 0x1E, 86 | 0x00, 0x00, 0x14, 0x00, 0x00, 87 | 0x00, 0x40, 0x34, 0x00, 0x00, 88 | 0x00, 0x08, 0x14, 0x22, 0x41, 89 | 0x14, 0x14, 0x14, 0x14, 0x14, 90 | 0x00, 0x41, 0x22, 0x14, 0x08, 91 | 0x02, 0x01, 0x59, 0x09, 0x06, 92 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 93 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 94 | 0x7F, 0x49, 0x49, 0x49, 0x36, 95 | 0x3E, 0x41, 0x41, 0x41, 0x22, 96 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 97 | 0x7F, 0x49, 0x49, 0x49, 0x41, 98 | 0x7F, 0x09, 0x09, 0x09, 0x01, 99 | 0x3E, 0x41, 0x41, 0x51, 0x73, 100 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 101 | 0x00, 0x41, 0x7F, 0x41, 0x00, 102 | 0x20, 0x40, 0x41, 0x3F, 0x01, 103 | 0x7F, 0x08, 0x14, 0x22, 0x41, 104 | 0x7F, 0x40, 0x40, 0x40, 0x40, 105 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 106 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 107 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 108 | 0x7F, 0x09, 0x09, 0x09, 0x06, 109 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 110 | 0x7F, 0x09, 0x19, 0x29, 0x46, 111 | 0x26, 0x49, 0x49, 0x49, 0x32, 112 | 0x03, 0x01, 0x7F, 0x01, 0x03, 113 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 114 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 115 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 116 | 0x63, 0x14, 0x08, 0x14, 0x63, 117 | 0x03, 0x04, 0x78, 0x04, 0x03, 118 | 0x61, 0x59, 0x49, 0x4D, 0x43, 119 | 0x00, 0x7F, 0x41, 0x41, 0x41, 120 | 0x02, 0x04, 0x08, 0x10, 0x20, 121 | 0x00, 0x41, 0x41, 0x41, 0x7F, 122 | 0x04, 0x02, 0x01, 0x02, 0x04, 123 | 0x40, 0x40, 0x40, 0x40, 0x40, 124 | 0x00, 0x03, 0x07, 0x08, 0x00, 125 | 0x20, 0x54, 0x54, 0x78, 0x40, 126 | 0x7F, 0x28, 0x44, 0x44, 0x38, 127 | 0x38, 0x44, 0x44, 0x44, 0x28, 128 | 0x38, 0x44, 0x44, 0x28, 0x7F, 129 | 0x38, 0x54, 0x54, 0x54, 0x18, 130 | 0x00, 0x08, 0x7E, 0x09, 0x02, 131 | 0x18, 0xA4, 0xA4, 0x9C, 0x78, 132 | 0x7F, 0x08, 0x04, 0x04, 0x78, 133 | 0x00, 0x44, 0x7D, 0x40, 0x00, 134 | 0x20, 0x40, 0x40, 0x3D, 0x00, 135 | 0x7F, 0x10, 0x28, 0x44, 0x00, 136 | 0x00, 0x41, 0x7F, 0x40, 0x00, 137 | 0x7C, 0x04, 0x78, 0x04, 0x78, 138 | 0x7C, 0x08, 0x04, 0x04, 0x78, 139 | 0x38, 0x44, 0x44, 0x44, 0x38, 140 | 0xFC, 0x18, 0x24, 0x24, 0x18, 141 | 0x18, 0x24, 0x24, 0x18, 0xFC, 142 | 0x7C, 0x08, 0x04, 0x04, 0x08, 143 | 0x48, 0x54, 0x54, 0x54, 0x24, 144 | 0x04, 0x04, 0x3F, 0x44, 0x24, 145 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 146 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 147 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 148 | 0x44, 0x28, 0x10, 0x28, 0x44, 149 | 0x4C, 0x90, 0x90, 0x90, 0x7C, 150 | 0x44, 0x64, 0x54, 0x4C, 0x44, 151 | 0x00, 0x08, 0x36, 0x41, 0x00, 152 | 0x00, 0x00, 0x77, 0x00, 0x00, 153 | 0x00, 0x41, 0x36, 0x08, 0x00, 154 | 0x02, 0x01, 0x02, 0x04, 0x02, 155 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 156 | 0x1E, 0xA1, 0xA1, 0x61, 0x12, 157 | 0x3A, 0x40, 0x40, 0x20, 0x7A, 158 | 0x38, 0x54, 0x54, 0x55, 0x59, 159 | 0x21, 0x55, 0x55, 0x79, 0x41, 160 | 0x21, 0x54, 0x54, 0x78, 0x41, 161 | 0x21, 0x55, 0x54, 0x78, 0x40, 162 | 0x20, 0x54, 0x55, 0x79, 0x40, 163 | 0x0C, 0x1E, 0x52, 0x72, 0x12, 164 | 0x39, 0x55, 0x55, 0x55, 0x59, 165 | 0x39, 0x54, 0x54, 0x54, 0x59, 166 | 0x39, 0x55, 0x54, 0x54, 0x58, 167 | 0x00, 0x00, 0x45, 0x7C, 0x41, 168 | 0x00, 0x02, 0x45, 0x7D, 0x42, 169 | 0x00, 0x01, 0x45, 0x7C, 0x40, 170 | 0xF0, 0x29, 0x24, 0x29, 0xF0, 171 | 0xF0, 0x28, 0x25, 0x28, 0xF0, 172 | 0x7C, 0x54, 0x55, 0x45, 0x00, 173 | 0x20, 0x54, 0x54, 0x7C, 0x54, 174 | 0x7C, 0x0A, 0x09, 0x7F, 0x49, 175 | 0x32, 0x49, 0x49, 0x49, 0x32, 176 | 0x32, 0x48, 0x48, 0x48, 0x32, 177 | 0x32, 0x4A, 0x48, 0x48, 0x30, 178 | 0x3A, 0x41, 0x41, 0x21, 0x7A, 179 | 0x3A, 0x42, 0x40, 0x20, 0x78, 180 | 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 181 | 0x39, 0x44, 0x44, 0x44, 0x39, 182 | 0x3D, 0x40, 0x40, 0x40, 0x3D, 183 | 0x3C, 0x24, 0xFF, 0x24, 0x24, 184 | 0x48, 0x7E, 0x49, 0x43, 0x66, 185 | 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 186 | 0xFF, 0x09, 0x29, 0xF6, 0x20, 187 | 0xC0, 0x88, 0x7E, 0x09, 0x03, 188 | 0x20, 0x54, 0x54, 0x79, 0x41, 189 | 0x00, 0x00, 0x44, 0x7D, 0x41, 190 | 0x30, 0x48, 0x48, 0x4A, 0x32, 191 | 0x38, 0x40, 0x40, 0x22, 0x7A, 192 | 0x00, 0x7A, 0x0A, 0x0A, 0x72, 193 | 0x7D, 0x0D, 0x19, 0x31, 0x7D, 194 | 0x26, 0x29, 0x29, 0x2F, 0x28, 195 | 0x26, 0x29, 0x29, 0x29, 0x26, 196 | 0x30, 0x48, 0x4D, 0x40, 0x20, 197 | 0x38, 0x08, 0x08, 0x08, 0x08, 198 | 0x08, 0x08, 0x08, 0x08, 0x38, 199 | 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 200 | 0x2F, 0x10, 0x28, 0x34, 0xFA, 201 | 0x00, 0x00, 0x7B, 0x00, 0x00, 202 | 0x08, 0x14, 0x2A, 0x14, 0x22, 203 | 0x22, 0x14, 0x2A, 0x14, 0x08, 204 | 0xAA, 0x00, 0x55, 0x00, 0xAA, 205 | 0xAA, 0x55, 0xAA, 0x55, 0xAA, 206 | 0x00, 0x00, 0x00, 0xFF, 0x00, 207 | 0x10, 0x10, 0x10, 0xFF, 0x00, 208 | 0x14, 0x14, 0x14, 0xFF, 0x00, 209 | 0x10, 0x10, 0xFF, 0x00, 0xFF, 210 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 211 | 0x14, 0x14, 0x14, 0xFC, 0x00, 212 | 0x14, 0x14, 0xF7, 0x00, 0xFF, 213 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 214 | 0x14, 0x14, 0xF4, 0x04, 0xFC, 215 | 0x14, 0x14, 0x17, 0x10, 0x1F, 216 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 217 | 0x14, 0x14, 0x14, 0x1F, 0x00, 218 | 0x10, 0x10, 0x10, 0xF0, 0x00, 219 | 0x00, 0x00, 0x00, 0x1F, 0x10, 220 | 0x10, 0x10, 0x10, 0x1F, 0x10, 221 | 0x10, 0x10, 0x10, 0xF0, 0x10, 222 | 0x00, 0x00, 0x00, 0xFF, 0x10, 223 | 0x10, 0x10, 0x10, 0x10, 0x10, 224 | 0x10, 0x10, 0x10, 0xFF, 0x10, 225 | 0x00, 0x00, 0x00, 0xFF, 0x14, 226 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 227 | 0x00, 0x00, 0x1F, 0x10, 0x17, 228 | 0x00, 0x00, 0xFC, 0x04, 0xF4, 229 | 0x14, 0x14, 0x17, 0x10, 0x17, 230 | 0x14, 0x14, 0xF4, 0x04, 0xF4, 231 | 0x00, 0x00, 0xFF, 0x00, 0xF7, 232 | 0x14, 0x14, 0x14, 0x14, 0x14, 233 | 0x14, 0x14, 0xF7, 0x00, 0xF7, 234 | 0x14, 0x14, 0x14, 0x17, 0x14, 235 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 236 | 0x14, 0x14, 0x14, 0xF4, 0x14, 237 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 238 | 0x00, 0x00, 0x1F, 0x10, 0x1F, 239 | 0x00, 0x00, 0x00, 0x1F, 0x14, 240 | 0x00, 0x00, 0x00, 0xFC, 0x14, 241 | 0x00, 0x00, 0xF0, 0x10, 0xF0, 242 | 0x10, 0x10, 0xFF, 0x10, 0xFF, 243 | 0x14, 0x14, 0x14, 0xFF, 0x14, 244 | 0x10, 0x10, 0x10, 0x1F, 0x00, 245 | 0x00, 0x00, 0x00, 0xF0, 0x10, 246 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 247 | 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 248 | 0xFF, 0xFF, 0xFF, 0x00, 0x00, 249 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 250 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 251 | 0x38, 0x44, 0x44, 0x38, 0x44, 252 | 0x7C, 0x2A, 0x2A, 0x3E, 0x14, 253 | 0x7E, 0x02, 0x02, 0x06, 0x06, 254 | 0x02, 0x7E, 0x02, 0x7E, 0x02, 255 | 0x63, 0x55, 0x49, 0x41, 0x63, 256 | 0x38, 0x44, 0x44, 0x3C, 0x04, 257 | 0x40, 0x7E, 0x20, 0x1E, 0x20, 258 | 0x06, 0x02, 0x7E, 0x02, 0x02, 259 | 0x99, 0xA5, 0xE7, 0xA5, 0x99, 260 | 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 261 | 0x4C, 0x72, 0x01, 0x72, 0x4C, 262 | 0x30, 0x4A, 0x4D, 0x4D, 0x30, 263 | 0x30, 0x48, 0x78, 0x48, 0x30, 264 | 0xBC, 0x62, 0x5A, 0x46, 0x3D, 265 | 0x3E, 0x49, 0x49, 0x49, 0x00, 266 | 0x7E, 0x01, 0x01, 0x01, 0x7E, 267 | 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 268 | 0x44, 0x44, 0x5F, 0x44, 0x44, 269 | 0x40, 0x51, 0x4A, 0x44, 0x40, 270 | 0x40, 0x44, 0x4A, 0x51, 0x40, 271 | 0x00, 0x00, 0xFF, 0x01, 0x03, 272 | 0xE0, 0x80, 0xFF, 0x00, 0x00, 273 | 0x08, 0x08, 0x6B, 0x6B, 0x08, 274 | 0x36, 0x12, 0x36, 0x24, 0x36, 275 | 0x06, 0x0F, 0x09, 0x0F, 0x06, 276 | 0x00, 0x00, 0x18, 0x18, 0x00, 277 | 0x00, 0x00, 0x10, 0x10, 0x00, 278 | 0x30, 0x40, 0xFF, 0x01, 0x01, 279 | 0x00, 0x1F, 0x01, 0x01, 0x1E, 280 | 0x00, 0x19, 0x1D, 0x17, 0x12, 281 | 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 282 | 0x00, 0x00, 0x00, 0x00, 0x00 283 | }; 284 | #endif // FONT5X7_H 285 | -------------------------------------------------------------------------------- /src/util/font8x16.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | font8x16.h 3 | Definition for medium font 4 | 5 | This file was imported from the MicroView library, written by GeekAmmo 6 | (https://github.com/geekammo/MicroView-Arduino-Library), and released under 7 | the terms of the GNU General Public License as published by the Free Software 8 | Foundation, either version 3 of the License, or (at your option) any later 9 | version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | ******************************************************************************/ 19 | #ifndef FONT8X16_H 20 | #define FONT8X16_H 21 | 22 | #include 23 | 24 | static const unsigned char font8x16[] PROGMEM = { 25 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 26 | 8,16,32,96,2,56, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 28 | 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, 29 | 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, 30 | 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, 31 | 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 32 | 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, 35 | 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, 36 | 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 37 | 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, 38 | 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 39 | 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, 40 | 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 41 | 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 42 | 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 45 | 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, 46 | 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 52 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 54 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 56 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 58 | 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, 60 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 61 | 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 62 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, 63 | 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, 64 | 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, 65 | 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, 66 | 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 67 | 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 68 | 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, 69 | 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 70 | 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, 71 | 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, 72 | 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, 73 | 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 74 | 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 75 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, 76 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 77 | 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 78 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 79 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 80 | 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 81 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 82 | 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 83 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, 84 | 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 85 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 86 | 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 87 | 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 88 | 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, 89 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 91 | 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 92 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 93 | 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, 94 | 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 95 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 96 | 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 97 | 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, 98 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, 99 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 100 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, 101 | 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 102 | 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, 103 | 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 104 | 0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, 105 | 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, 106 | 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 107 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 108 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 109 | 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 110 | 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, 111 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 112 | 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 113 | 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 114 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 115 | 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, 116 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 117 | 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 118 | 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, 119 | 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, 120 | 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, 121 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 122 | 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 123 | }; 124 | #endif 125 | 126 | -------------------------------------------------------------------------------- /src/util/fontlargenumber.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | fontlargenumber.h 3 | Definition for large font 4 | 5 | This file was imported from the MicroView library, written by GeekAmmo 6 | (https://github.com/geekammo/MicroView-Arduino-Library), and released under 7 | the terms of the GNU General Public License as published by the Free Software 8 | Foundation, either version 3 of the License, or (at your option) any later 9 | version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | ******************************************************************************/ 19 | #ifndef FONTLARGENUMBER_H 20 | #define FONTLARGENUMBER_H 21 | 22 | #include 23 | 24 | static const unsigned char fontlargenumber[] PROGMEM = { 25 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 26 | 12,48,48,11,1,32, 27 | 0x00, 0xC0, 0xF8, 0x7C, 0x3E, 0x3E, 0xFC, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 28 | 0x78, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7C, 0x3C, 0x3E, 0x3E, 0xFE, 0xFC, 29 | 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x3E, 0x3E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 30 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x3E, 31 | 0x3E, 0x3E, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0xFC, 0x3E, 0x3E, 0x3E, 32 | 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0xFE, 0xFE, 0x00, 0x00, 33 | 0x00, 0x00, 0xC0, 0xF8, 0xFE, 0x3E, 0x7E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 34 | 0x7E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xF9, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 36 | 0x00, 0x00, 0x07, 0x03, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 39 | 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 41 | 0x7F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 42 | 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 43 | 0x3F, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 44 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 46 | 0xFC, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFE, 0x3F, 0x03, 0x00, 0xFF, 0xFF, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3E, 0x7E, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0xFF, 0xFF, 0x80, 0xF0, 0x7C, 0x7C, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x80, 0xF8, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9F, 0xFF, 0xF8, 0xFE, 0x1F, 50 | 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xFC, 52 | 0x7F, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xE7, 0xE0, 55 | 0xE0, 0xE0, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 56 | 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 0x3F, 58 | 0x03, 0x03, 0x1F, 0xFF, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x3E, 0x3E, 0x0F, 0x01, 59 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | 0x07, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 61 | 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 62 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 63 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFF, 0xFF, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 64 | 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x80, 65 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 66 | 0x00, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 67 | 0x00, 0x00, 0x80, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 68 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0x3F, 0x7C, 0x7C, 0x3F, 0x1F, 0x03, 0x00, 0x00, 0x00, 69 | 0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7F, 0x7F, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7C, 70 | 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0x7C, 0x7C, 0x7E, 0x1F, 0x07, 71 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 72 | 0x00, 0x1F, 0x3E, 0x7C, 0x7C, 0x3E, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 73 | 0x7F, 0x7C, 0x7C, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 74 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x3F, 0x7E, 0x7C, 0x7E, 0x3F, 0x1F, 0x01, 0x00, 0x00, 75 | 0x00, 0x00, 0x3E, 0x7C, 0x7C, 0x7E, 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 76 | 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 77 | }; 78 | #endif 79 | --------------------------------------------------------------------------------