├── Распиновка модуля RDM6300.jpg ├── images ├── photo_2020-01-29_00-12-37.jpg ├── photo_2020-01-29_00-12-38.jpg ├── photo_2020-01-29_00-12-39.jpg ├── photo_2020-01-29_00-12-41.jpg ├── photo_2020-01-29_00-12-42.jpg └── photo_2020-01-29_00-12-43.jpg ├── Схема RFID-спуфера для версии 0.3 .jpg ├── README.md ├── Библиотеки ├── Adafruit-GFX-Library-master │ ├── fontconvert │ │ ├── Makefile │ │ ├── makefonts.sh │ │ ├── fontconvert_win.md │ │ └── fontconvert.c │ ├── library.properties │ ├── gfxfont.h │ ├── license.txt │ ├── Adafruit_SPITFT.h │ ├── README.md │ ├── Adafruit_SPITFT_Macros.h │ ├── Fonts │ │ ├── Picopixel.h │ │ ├── Tiny3x3a2pt7b │ │ ├── Org_01.h │ │ ├── FreeMono9pt7b.h │ │ ├── FreeMonoOblique9pt7b.h │ │ ├── FreeMonoBold9pt7b.h │ │ ├── FreeSerif9pt7b.h │ │ └── FreeSans9pt7b.h │ ├── Adafruit_GFX.h │ ├── glcdfont.c │ └── Adafruit_SPITFT.cpp ├── Adafruit_SSD1306 │ ├── library.properties │ ├── README.txt │ ├── license.txt │ ├── README.md │ ├── Adafruit_SSD1306.h │ └── examples │ │ ├── ssd1306_128x64_spi │ │ └── ssd1306_128x64_spi.ino │ │ ├── ssd1306_128x32_spi │ │ └── ssd1306_128x32_spi.ino │ │ ├── ssd1306_128x32_i2c │ │ └── ssd1306_128x32_i2c.ino │ │ └── ssd1306_128x64_i2c │ │ └── ssd1306_128x64_i2c.ino └── SoftwareSerial-master │ ├── library.properties │ ├── keywords.txt │ ├── examples │ ├── SoftwareSerialExample │ │ └── SoftwareSerialExample.ino │ └── TwoPortReceive │ │ └── TwoPortReceive.ino │ └── SoftwareSerial.h ├── RDM6300 └── RDM6300.ino └── My_125_kHz_spoofer_v.03 ├── functions.ino └── My_125_kHz_spoofer_v.03.ino /Распиновка модуля RDM6300.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/Распиновка модуля RDM6300.jpg -------------------------------------------------------------------------------- /images/photo_2020-01-29_00-12-37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/images/photo_2020-01-29_00-12-37.jpg -------------------------------------------------------------------------------- /images/photo_2020-01-29_00-12-38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/images/photo_2020-01-29_00-12-38.jpg -------------------------------------------------------------------------------- /images/photo_2020-01-29_00-12-39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/images/photo_2020-01-29_00-12-39.jpg -------------------------------------------------------------------------------- /images/photo_2020-01-29_00-12-41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/images/photo_2020-01-29_00-12-41.jpg -------------------------------------------------------------------------------- /images/photo_2020-01-29_00-12-42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/images/photo_2020-01-29_00-12-42.jpg -------------------------------------------------------------------------------- /images/photo_2020-01-29_00-12-43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/images/photo_2020-01-29_00-12-43.jpg -------------------------------------------------------------------------------- /Схема RFID-спуфера для версии 0.3 .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VladimirMozg/RFID_125kHz_spoofer/HEAD/Схема RFID-спуфера для версии 0.3 .jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RFID_125kHz_spoofer 2 | Multikey on Arduino board. 3 | 4 | Универсальный ключ для RFID-домофонов, работающих на частоте 125 кГц. Собираем по схеме, загружаем прошивку - радуемся. 5 | 6 | Статья на Хабре с инструкцией по сборке и краткой историей разработки: https://habr.com/ru/post/485104/ 7 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/fontconvert/Makefile: -------------------------------------------------------------------------------- 1 | all: fontconvert 2 | 3 | CC = gcc 4 | CFLAGS = -Wall -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/include 5 | LIBS = -lfreetype 6 | 7 | fontconvert: fontconvert.c 8 | $(CC) $(CFLAGS) $< $(LIBS) -o $@ 9 | strip $@ 10 | 11 | clean: 12 | rm -f fontconvert 13 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit_SSD1306/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit SSD1306 2 | version=1.1.2 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=SSD1306 oled driver library for 'monochrome' 128x64 and 128x32 OLEDs! 6 | paragraph=SSD1306 oled driver library for 'monochrome' 128x64 and 128x32 OLEDs! 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit_SSD1306 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit GFX Library 2 | version=1.2.3 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from. 6 | paragraph=Install this library in addition to the display library for your hardware. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit-GFX-Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Библиотеки/SoftwareSerial-master/library.properties: -------------------------------------------------------------------------------- 1 | name=SoftwareSerial 2 | version=1.0 3 | author=Arduino 4 | maintainer=Paul Stoffregen 5 | sentence=Enables serial communication on any digital pin. 6 | paragraph=The SoftwareSerial library has been developed to allow serial communication, using software to replicate the functionality of the hardware UART. It is possible to have multiple software serial ports with speeds up to 115200 bps. On 32 bit Teensy boards, SoftwareSerial uses the real hardware serial ports (and is restricted to only those pins), but allows compatibility with programs that depend on SoftwareSerial. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/SoftwareSerial 9 | architectures=* 10 | 11 | -------------------------------------------------------------------------------- /Библиотеки/SoftwareSerial-master/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map for SoftwareSerial 3 | # (formerly NewSoftSerial) 4 | ####################################### 5 | 6 | ####################################### 7 | # Datatypes (KEYWORD1) 8 | ####################################### 9 | 10 | SoftwareSerial KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | begin KEYWORD2 17 | end KEYWORD2 18 | read KEYWORD2 19 | write KEYWORD2 20 | available KEYWORD2 21 | isListening KEYWORD2 22 | overflow KEYWORD2 23 | flush KEYWORD2 24 | listen KEYWORD2 25 | peek KEYWORD2 26 | 27 | ####################################### 28 | # Constants (LITERAL1) 29 | ####################################### 30 | 31 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/gfxfont.h: -------------------------------------------------------------------------------- 1 | // Font structures for newer Adafruit_GFX (1.1 and later). 2 | // Example fonts are included in 'Fonts' directory. 3 | // To use a font in your Arduino sketch, #include the corresponding .h 4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to 5 | // revert to 'classic' fixed-space bitmap font. 6 | 7 | #ifndef _GFXFONT_H_ 8 | #define _GFXFONT_H_ 9 | 10 | typedef struct { // Data stored PER GLYPH 11 | uint16_t bitmapOffset; // Pointer into GFXfont->bitmap 12 | uint8_t width, height; // Bitmap dimensions in pixels 13 | uint8_t xAdvance; // Distance to advance cursor (x axis) 14 | int8_t xOffset, yOffset; // Dist from cursor pos to UL corner 15 | } GFXglyph; 16 | 17 | typedef struct { // Data stored for FONT AS A WHOLE: 18 | uint8_t *bitmap; // Glyph bitmaps, concatenated 19 | GFXglyph *glyph; // Glyph array 20 | uint8_t first, last; // ASCII extents 21 | uint8_t yAdvance; // Newline distance (y axis) 22 | } GFXfont; 23 | 24 | #endif // _GFXFONT_H_ 25 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit_SSD1306/README.txt: -------------------------------------------------------------------------------- 1 | This is a library for our Monochrome OLEDs based on SSD1306 drivers 2 | 3 | Pick one up today in the adafruit shop! 4 | ------> http://www.adafruit.com/category/63_98 5 | 6 | These displays use SPI to communicate, 4 or 5 pins are required to 7 | interface 8 | 9 | Adafruit invests time and resources providing this open source code, 10 | please support Adafruit and open-source hardware by purchasing 11 | products from Adafruit! 12 | 13 | Written by Limor Fried/Ladyada for Adafruit Industries. 14 | Scrolling code contributed by Michael Gregg 15 | BSD license, check license.txt for more information 16 | All text above must be included in any redistribution 17 | 18 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_SSD1306. Check that the Adafruit_SSD1306 folder contains Adafruit_SSD1306.cpp and Adafruit_SSD1306.h 19 | 20 | Place the Adafruit_SSD1306 library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. 21 | 22 | You will also have to download the Adafruit GFX Graphics core which does all the circles, text, rectangles, etc. You can get it from 23 | https://github.com/adafruit/Adafruit-GFX-Library 24 | and download/install that library as well -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/fontconvert/makefonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Ugly little Bash script, generates a set of .h files for GFX using 4 | # GNU FreeFont sources. There are three fonts: 'Mono' (Courier-like), 5 | # 'Sans' (Helvetica-like) and 'Serif' (Times-like); four styles: regular, 6 | # bold, oblique or italic, and bold+oblique or bold+italic; and four 7 | # sizes: 9, 12, 18 and 24 point. No real error checking or anything, 8 | # this just powers through all the combinations, calling the fontconvert 9 | # utility and redirecting the output to a .h file for each combo. 10 | 11 | # Adafruit_GFX repository does not include the source outline fonts 12 | # (huge zipfile, different license) but they're easily acquired: 13 | # http://savannah.gnu.org/projects/freefont/ 14 | 15 | convert=./fontconvert 16 | inpath=~/Desktop/freefont/ 17 | outpath=../Fonts/ 18 | fonts=(FreeMono FreeSans FreeSerif) 19 | styles=("" Bold Italic BoldItalic Oblique BoldOblique) 20 | sizes=(9 12 18 24) 21 | 22 | for f in ${fonts[*]} 23 | do 24 | for index in ${!styles[*]} 25 | do 26 | st=${styles[$index]} 27 | for si in ${sizes[*]} 28 | do 29 | infile=$inpath$f$st".ttf" 30 | if [ -f $infile ] # Does source combination exist? 31 | then 32 | outfile=$outpath$f$st$si"pt7b.h" 33 | # printf "%s %s %s > %s\n" $convert $infile $si $outfile 34 | $convert $infile $si > $outfile 35 | fi 36 | done 37 | done 38 | done 39 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012 Adafruit Industries. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit_SSD1306/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012, Adafruit Industries 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holders nor the 14 | names of its contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY 18 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /Библиотеки/SoftwareSerial-master/examples/SoftwareSerialExample/SoftwareSerialExample.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Software serial multple serial test 3 | 4 | Receives from the hardware serial, sends to software serial. 5 | Receives from software serial, sends to hardware serial. 6 | 7 | The circuit: 8 | * RX is digital pin 10 (connect to TX of other device) 9 | * TX is digital pin 11 (connect to RX of other device) 10 | 11 | Note: 12 | Not all pins on the Mega and Mega 2560 support change interrupts, 13 | so only the following can be used for RX: 14 | 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 15 | 16 | Not all pins on the Leonardo support change interrupts, 17 | so only the following can be used for RX: 18 | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). 19 | 20 | created back in the mists of time 21 | modified 25 May 2012 22 | by Tom Igoe 23 | based on Mikal Hart's example 24 | 25 | This example code is in the public domain. 26 | 27 | */ 28 | #include 29 | 30 | SoftwareSerial mySerial(10, 11); // RX, TX 31 | 32 | void setup() 33 | { 34 | // Open serial communications and wait for port to open: 35 | Serial.begin(57600); 36 | while (!Serial) { 37 | ; // wait for serial port to connect. Needed for Leonardo only 38 | } 39 | 40 | 41 | Serial.println("Goodnight moon!"); 42 | 43 | // set the data rate for the SoftwareSerial port 44 | mySerial.begin(4800); 45 | mySerial.println("Hello, world?"); 46 | } 47 | 48 | void loop() // run over and over 49 | { 50 | if (mySerial.available()) 51 | Serial.write(mySerial.read()); 52 | if (Serial.available()) 53 | mySerial.write(Serial.read()); 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit_SSD1306/README.md: -------------------------------------------------------------------------------- 1 | # Adafruit_SSD1306 2 | 3 | 4 | ## Compatibility 5 | 6 | MCU | Tested Works | Doesn't Work | Not Tested | Notes 7 | ------------------ | :----------: | :----------: | :---------: | ----- 8 | Atmega328 @ 16MHz | X | | | 9 | Atmega328 @ 12MHz | X | | | 10 | Atmega32u4 @ 16MHz | X | | | 11 | Atmega32u4 @ 8MHz | X | | | 12 | ESP8266 | X | | | change OLED_RESET to different pin if using default I2C pins D4/D5. 13 | Atmega2560 @ 16MHz | X | | | 14 | ATSAM3X8E | X | | | 15 | ATSAM21D | X | | | 16 | ATtiny85 @ 16MHz | | X | | 17 | ATtiny85 @ 8MHz | | X | | 18 | Intel Curie @ 32MHz | | | X | 19 | STM32F2 | | | X | 20 | 21 | * ATmega328 @ 16MHz : Arduino UNO, Adafruit Pro Trinket 5V, Adafruit Metro 328, Adafruit Metro Mini 22 | * ATmega328 @ 12MHz : Adafruit Pro Trinket 3V 23 | * ATmega32u4 @ 16MHz : Arduino Leonardo, Arduino Micro, Arduino Yun, Teensy 2.0 24 | * ATmega32u4 @ 8MHz : Adafruit Flora, Bluefruit Micro 25 | * ESP8266 : Adafruit Huzzah 26 | * ATmega2560 @ 16MHz : Arduino Mega 27 | * ATSAM3X8E : Arduino Due 28 | * ATSAM21D : Arduino Zero, M0 Pro 29 | * ATtiny85 @ 16MHz : Adafruit Trinket 5V 30 | * ATtiny85 @ 8MHz : Adafruit Gemma, Arduino Gemma, Adafruit Trinket 3V 31 | 32 | 33 | -------------------------------------------------------------------------------- /Библиотеки/SoftwareSerial-master/examples/TwoPortReceive/TwoPortReceive.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Software serial multple serial test 3 | 4 | Receives from the two software serial ports, 5 | sends to the hardware serial port. 6 | 7 | In order to listen on a software port, you call port.listen(). 8 | When using two software serial ports, you have to switch ports 9 | by listen()ing on each one in turn. Pick a logical time to switch 10 | ports, like the end of an expected transmission, or when the 11 | buffer is empty. This example switches ports when there is nothing 12 | more to read from a port 13 | 14 | The circuit: 15 | Two devices which communicate serially are needed. 16 | * First serial device's TX attached to digital pin 2, RX to pin 3 17 | * Second serial device's TX attached to digital pin 4, RX to pin 5 18 | 19 | Note: 20 | Not all pins on the Mega and Mega 2560 support change interrupts, 21 | so only the following can be used for RX: 22 | 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 23 | 24 | Not all pins on the Leonardo support change interrupts, 25 | so only the following can be used for RX: 26 | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). 27 | 28 | created 18 Apr. 2011 29 | modified 25 May 2012 30 | by Tom Igoe 31 | based on Mikal Hart's twoPortRXExample 32 | 33 | This example code is in the public domain. 34 | 35 | */ 36 | 37 | #include 38 | // software serial #1: TX = digital pin 10, RX = digital pin 11 39 | SoftwareSerial portOne(10,11); 40 | 41 | // software serial #2: TX = digital pin 8, RX = digital pin 9 42 | // on the Mega, use other pins instead, since 8 and 9 don't work on the Mega 43 | SoftwareSerial portTwo(8,9); 44 | 45 | void setup() 46 | { 47 | // Open serial communications and wait for port to open: 48 | Serial.begin(9600); 49 | while (!Serial) { 50 | ; // wait for serial port to connect. Needed for Leonardo only 51 | } 52 | 53 | 54 | // Start each software serial port 55 | portOne.begin(9600); 56 | portTwo.begin(9600); 57 | } 58 | 59 | void loop() 60 | { 61 | // By default, the last intialized port is listening. 62 | // when you want to listen on a port, explicitly select it: 63 | portOne.listen(); 64 | Serial.println("Data from port one:"); 65 | // while there is data coming in, read it 66 | // and send to the hardware serial port: 67 | while (portOne.available() > 0) { 68 | char inByte = portOne.read(); 69 | Serial.write(inByte); 70 | } 71 | 72 | // blank line to separate data from the two ports: 73 | Serial.println(); 74 | 75 | // Now listen on the second port 76 | portTwo.listen(); 77 | // while there is data coming in, read it 78 | // and send to the hardware serial port: 79 | Serial.println("Data from port two:"); 80 | while (portTwo.available() > 0) { 81 | char inByte = portTwo.read(); 82 | Serial.write(inByte); 83 | } 84 | 85 | // blank line to separate data from the two ports: 86 | Serial.println(); 87 | } 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /RDM6300/RDM6300.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | SoftwareSerial mySerial(3, 11); // RX, TX 4 | 5 | uint8_t buffer1[14]; 6 | uint8_t* buffer_at; 7 | uint8_t* buffer_end = buffer1 + sizeof(buffer1); 8 | 9 | uint8_t bufferCounter = 0;//счётчик итерраций первого цикла вайл 10 | 11 | String checksum; 12 | boolean tagfound = false; 13 | 14 | void setup() 15 | { 16 | Serial.begin(9600); 17 | Serial.println("Serial Ready"); 18 | 19 | mySerial.begin(9600); 20 | Serial.println("RFID Ready"); 21 | } 22 | 23 | void loop() 24 | { 25 | if (mySerial.available())// если на чипе есть данные 26 | { 27 | delay(20); 28 | buffer_at = buffer1; 29 | 30 | while ( buffer_at < buffer_end ) 31 | { 32 | *buffer_at++ = mySerial.read();//считываем данные с чипа, здесь получилось 14 итерраций 33 | bufferCounter++;//++++++++++++++++++++++ 34 | } 35 | 36 | Serial.println(bufferCounter); 37 | bufferCounter = 0; 38 | 39 | tagfound = true; 40 | // Serial1.end(); 41 | // Serial1.begin(9600); 42 | } 43 | 44 | if (tagfound) 45 | { 46 | buffer_at = buffer1; 47 | uint32_t result = 0; 48 | 49 | // Skip the preamble 50 | ++buffer_at; 51 | // Accumulate the checksum, starting with the first value 52 | uint8_t checksum = rfid_get_next(); 53 | 54 | // We are looking for 4 more values 55 | int i = 4; 56 | while(i--)//------------------------------------------- классный трюк 57 | {//---------------------------------------------------- здесь считываются данные 58 | // Grab the next value 59 | uint8_t value = rfid_get_next(); 60 | // Add it into the result 61 | result <<= 8; 62 | result |= value; 63 | // Xor it into the checksum 64 | checksum ^= value; 65 | 66 | Serial.println(value, DEC); 67 | } 68 | // Pull out the checksum from the data 69 | uint8_t data_checksum = rfid_get_next(); 70 | 71 | // Print the result 72 | Serial.print("Tag: "); 73 | Serial.print(result, DEC); 74 | if ( checksum == data_checksum ) 75 | Serial.println(" OK"); 76 | else 77 | Serial.println(" CHECKSUM FAILED"); 78 | // We're done processing, so there is no current value 79 | 80 | tagfound = false; 81 | } 82 | 83 | } 84 | 85 | uint8_t rfid_get_next(void)//здесь происходит считывание метки через RDM6300 86 | { 87 | // sscanf needs a 2-byte space to put the result but we 88 | // only need one byte. 89 | uint16_t hexresult; 90 | // Working space to assemble each byte 91 | static char byte_chars[3]; 92 | // Pull out one byte from this position in the stream 93 | snprintf(byte_chars,3,"%c%c",buffer_at[0],buffer_at[1]); 94 | sscanf(byte_chars,"%x",&hexresult); 95 | buffer_at += 2; 96 | return static_cast(hexresult); 97 | } 98 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Adafruit_SPITFT.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _ADAFRUIT_SPITFT_ 3 | #define _ADAFRUIT_SPITFT_ 4 | 5 | 6 | #if ARDUINO >= 100 7 | #include "Arduino.h" 8 | #include "Print.h" 9 | #else 10 | #include "WProgram.h" 11 | #endif 12 | #include 13 | #include "Adafruit_GFX.h" 14 | 15 | 16 | #if defined(ARDUINO_STM32_FEATHER) 17 | typedef volatile uint32 RwReg; 18 | #endif 19 | #if defined(ARDUINO_FEATHER52) 20 | typedef volatile uint32_t RwReg; 21 | #endif 22 | 23 | class Adafruit_SPITFT : public Adafruit_GFX { 24 | protected: 25 | 26 | public: 27 | Adafruit_SPITFT(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1); 28 | Adafruit_SPITFT(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _RST = -1); 29 | 30 | virtual void begin(uint32_t freq) = 0; 31 | void initSPI(uint32_t freq); 32 | 33 | // Required Non-Transaction 34 | void drawPixel(int16_t x, int16_t y, uint16_t color); 35 | 36 | // Transaction API 37 | void startWrite(void); 38 | void endWrite(void); 39 | void writePixel(int16_t x, int16_t y, uint16_t color); 40 | void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 41 | void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color); 42 | void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 43 | 44 | // Transaction API not used by GFX 45 | virtual void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h) = 0; 46 | void writePixel(uint16_t color); 47 | void writePixels(uint16_t * colors, uint32_t len); 48 | void writeColor(uint16_t color, uint32_t len); 49 | void pushColor(uint16_t color); 50 | 51 | // Recommended Non-Transaction 52 | void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color); 53 | void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 54 | void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 55 | 56 | using Adafruit_GFX::drawRGBBitmap; // Check base class first 57 | void drawRGBBitmap(int16_t x, int16_t y, 58 | uint16_t *pcolors, int16_t w, int16_t h); 59 | 60 | uint16_t color565(uint8_t r, uint8_t g, uint8_t b); 61 | 62 | protected: 63 | uint32_t _freq; 64 | #if defined (__AVR__) || defined(TEENSYDUINO) || defined (ESP8266) || defined (ESP32) 65 | int8_t _cs, _dc, _rst, _sclk, _mosi, _miso; 66 | #else 67 | int32_t _cs, _dc, _rst, _sclk, _mosi, _miso; 68 | #endif 69 | 70 | #ifdef USE_FAST_PINIO 71 | volatile RwReg *mosiport, *misoport, *clkport, *dcport, *csport; 72 | RwReg mosipinmask, misopinmask, clkpinmask, cspinmask, dcpinmask; 73 | #endif 74 | 75 | void writeCommand(uint8_t cmd); 76 | void spiWrite(uint8_t v); 77 | uint8_t spiRead(void); 78 | }; 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/README.md: -------------------------------------------------------------------------------- 1 | # Adafruit GFX Library 2 | 3 | This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions). 4 | 5 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 6 | 7 | Written by Limor Fried/Ladyada for Adafruit Industries. 8 | BSD license, check license.txt for more information. 9 | All text above must be included in any redistribution. 10 | 11 | Recent Arduino IDE releases include the Library Manager for easy installation. Otherwise, to download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX. Confirm that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h. Place the Adafruit_GFX library folder your /Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE. 12 | 13 | # Useful Resources 14 | 15 | - Image2Code: This is a handy Java GUI utility to convert a BMP file into the array code necessary to display the image with the drawBitmap function. Check out the code at ehubin's GitHub repository: https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code 16 | 17 | - drawXBitmap function: You can use the GIMP photo editor to save a .xbm file and use the array saved in the file to draw a bitmap with the drawXBitmap function. See the pull request here for more details: https://github.com/adafruit/Adafruit-GFX-Library/pull/31 18 | 19 | - 'Fonts' folder contains bitmap fonts for use with recent (1.1 and later) Adafruit_GFX. To use a font in your Arduino sketch, #include the corresponding .h file and pass address of GFXfont struct to setFont(). Pass NULL to revert to 'classic' fixed-space bitmap font. 20 | 21 | - 'fontconvert' folder contains a command-line tool for converting TTF fonts to Adafruit_GFX .h format. 22 | 23 | --- 24 | 25 | ### Roadmap 26 | 27 | The PRIME DIRECTIVE is to maintain backward compatibility with existing Arduino sketches -- many are hosted elsewhere and don't track changes here, some are in print and can never be changed! This "little" library has grown organically over time and sometimes we paint ourselves into a design corner and just have to live with it or add ungainly workarounds. 28 | 29 | Highly unlikely to merge any changes for additional or incompatible font formats (see Prime Directive above). There are already two formats and the code is quite bloaty there as it is (this also creates liabilities for tools and documentation). If you *must* have a more sophisticated font format, consider creating a fork with the features required for your project. For similar reasons, also unlikely to add any more bitmap formats, it's getting messy. 30 | 31 | Please don't reformat code for the sake of reformatting code. The resulting large "visual diff" makes it impossible to untangle actual bug fixes from merely rearranged lines. 32 | -------------------------------------------------------------------------------- /My_125_kHz_spoofer_v.03/functions.ino: -------------------------------------------------------------------------------- 1 | void WriteHeader(void) 2 | { 3 | // a header consists of 9 one bits 4 | RFIDdata[datapointer++]=1; 5 | RFIDdata[datapointer++]=1; 6 | RFIDdata[datapointer++]=1; 7 | RFIDdata[datapointer++]=1; 8 | RFIDdata[datapointer++]=1; 9 | RFIDdata[datapointer++]=1; 10 | RFIDdata[datapointer++]=1; 11 | RFIDdata[datapointer++]=1; 12 | RFIDdata[datapointer++]=1; 13 | } 14 | 15 | 16 | void WriteData(byte nibble) 17 | { 18 | byte data; 19 | byte rowsum=0; 20 | for (int i=4; i>0; i--) 21 | { 22 | if ((nibble& 1<0; i--) 69 | { 70 | if ((colsum[i-1]%2) ==0) 71 | { 72 | RFIDdata[datapointer++]=0; 73 | #ifdef SERIALDEBUG 74 | Serial.print((int)0); 75 | #endif 76 | } 77 | else 78 | { 79 | RFIDdata[datapointer++]=1; 80 | #ifdef SERIALDEBUG 81 | Serial.print((int) 1); 82 | #endif 83 | } 84 | } 85 | 86 | // write the stop bit 87 | RFIDdata[datapointer++]=0; 88 | 89 | #ifdef SERIALDEBUG 90 | Serial.print((int)0); 91 | #endif 92 | 93 | } 94 | 95 | 96 | 97 | 98 | 99 | void BuildCard(void) 100 | { 101 | // load up the RFID array with card data 102 | // intitalise the write pointer 103 | datapointer=0; 104 | 105 | WriteHeader(); 106 | // Write facility 107 | WriteData(facility[0]); 108 | WriteData(facility[1]); 109 | 110 | // Write cardID 111 | WriteData(cardID[0]); 112 | WriteData(cardID[1]); 113 | WriteData(cardID[2]); 114 | WriteData(cardID[3]); 115 | WriteData(cardID[4]); 116 | WriteData(cardID[5]); 117 | WriteData(cardID[6]); 118 | WriteData(cardID[7]); 119 | 120 | WriteChecksum(); 121 | } 122 | 123 | 124 | void TransmitManchester(int cycle, int data) 125 | { 126 | 127 | if(cycle ^ data == 1) 128 | { 129 | digitalWrite(COIL, HIGH); 130 | } 131 | else 132 | { 133 | digitalWrite(COIL, LOW); 134 | } 135 | } 136 | 137 | void EmulateCard(void) 138 | { 139 | #ifdef SERIALDEBUG 140 | Serial.println("Emulate Card Entered"); 141 | #endif // enter a low power modewritedataLEDS(0); // turn off the LEDs 142 | 143 | BuildCard(); 144 | 145 | #ifdef SERIALDEBUG 146 | Serial.println(); 147 | for(int i = 0; i < 64; i++) 148 | { 149 | if (RFIDdata[i]==1) Serial.print("1"); 150 | else if (RFIDdata[i]==0) Serial.print("0"); 151 | else Serial.print((int)RFIDdata[i]); 152 | } 153 | Serial.println(); 154 | #endif 155 | 156 | 157 | while (1) 158 | { 159 | for(int i = 0; i < 64; i++) 160 | { 161 | TransmitManchester(0, RFIDdata[i]); 162 | delayMicroseconds(bittime); 163 | TransmitManchester(1, RFIDdata[i]); 164 | delayMicroseconds(bittime); 165 | } 166 | //if (keypad.getKey()) break; 167 | } 168 | } 169 | 170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/fontconvert/fontconvert_win.md: -------------------------------------------------------------------------------- 1 | ### A short guide to use fontconvert.c to create your own fonts using MinGW. 2 | 3 | #### STEP 1: INSTALL MinGW 4 | 5 | Install MinGW (Minimalist GNU for Windows) from [MinGW.org](http://www.mingw.org/). 6 | Please read carefully the instructions found on [Getting started page](http://www.mingw.org/wiki/Getting_Started). 7 | I suggest installing with the "Graphical User Interface Installer". 8 | To complete your initial installation you should further install some "packages". 9 | For our purpose you should only install the "Basic Setup" packages. 10 | To do that: 11 | 12 | 1. Open the MinGW Installation Manager 13 | 2. From the left panel click "Basic Setup". 14 | 3. On the right panel choose "mingw32-base", "mingw-gcc-g++", "mingw-gcc-objc" and "msys-base" 15 | and click "Mark for installation" 16 | 4. From the Menu click "Installation" and then "Apply changes". In the pop-up window select "Apply". 17 | 18 | 19 | #### STEP 2: INSTALL Freetype Library 20 | 21 | To read about the freetype project visit [freetype.org](https://www.freetype.org/). 22 | To Download the latest version of freetype go to [download page](http://download.savannah.gnu.org/releases/freetype/) 23 | and choose "freetype-2.7.tar.gz" file (or a newer version if available). 24 | To avoid long cd commands later in the command prompt, I suggest you unzip the file in the C:\ directory. 25 | (I also renamed the folder to "ft27") 26 | Before you build the library it's good to read these articles: 27 | * [Using MSYS with MinGW](http://www.mingw.org/wiki/MSYS) 28 | * [Installation and Use of Supplementary Libraries with MinGW](http://www.mingw.org/wiki/LibraryPathHOWTO) 29 | * [Include Path](http://www.mingw.org/wiki/IncludePathHOWTO) 30 | 31 | Inside the unzipped folder there is another folder named "docs". Open it and read the INSTALL.UNIX (using notepad). 32 | Pay attention to paragraph 3 (Build and Install the Library). So, let's begin the installation. 33 | To give the appropriate commands we will use the MSYS command prompt (not cmd.exe of windows) which is UNIX like. 34 | Follow the path C:\MinGW\msys\1.0 and double click "msys.bat". The command prompt environment appears. 35 | Enter "ft27" directory using the cd commands: 36 | ``` 37 | cd /c 38 | cd ft27 39 | ``` 40 | 41 | and then type one by one the commands: 42 | ``` 43 | ./configure --prefix=/mingw 44 | make 45 | make install 46 | ``` 47 | Once you're finished, go inside "C:\MinGW\include" and there should be a new folder named "freetype2". 48 | That, hopefully, means that you have installed the library correctly !! 49 | 50 | #### STEP 3: Build fontconvert.c 51 | 52 | Before proceeding I suggest you make a copy of Adafruit_GFX_library folder in C:\ directory. 53 | Then, inside "fontconvert" folder open the "makefile" with an editor ( I used notepad++). 54 | Change the commands so in the end the program looks like : 55 | ``` 56 | all: fontconvert 57 | 58 | CC = gcc 59 | CFLAGS = -Wall -I c:/mingw/include/freetype2 60 | LIBS = -lfreetype 61 | 62 | fontconvert: fontconvert.c 63 | $(CC) $(CFLAGS) $< $(LIBS) -o $@ 64 | 65 | clean: 66 | rm -f fontconvert 67 | ``` 68 | Go back in the command prompt and with a cd command enter the fontconvert directory. 69 | ``` 70 | cd /c/adafruit_gfx_library\fontconvert 71 | ``` 72 | Give the command: 73 | ``` 74 | make 75 | ``` 76 | This command will, eventually, create a "fontconvert.exe" file inside fontconvert directory. 77 | 78 | #### STEP 4: Create your own font header files 79 | 80 | Now that you have an executable file, you can use it to create your own fonts to work with Adafruit GFX lib. 81 | So, if we suppose that you already have a .ttf file with your favorite fonts, jump to the command prompt and type: 82 | ``` 83 | ./fontconvert yourfonts.ttf 9 > yourfonts9pt7b.h 84 | ``` 85 | You can read more details at: [learn.adafruit](https://learn.adafruit.com/adafruit-gfx-graphics-library/using-fonts). 86 | 87 | Taraaaaaammm !! you've just created your new font header file. Put it inside the "Fonts" folder, grab a cup of coffee 88 | and start playing with your Arduino (or whatever else ....)+ display module project. 89 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Adafruit_SPITFT_Macros.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Control Pins 4 | * */ 5 | 6 | #ifdef USE_FAST_PINIO 7 | #define SPI_DC_HIGH() *dcport |= dcpinmask 8 | #define SPI_DC_LOW() *dcport &= ~dcpinmask 9 | #define SPI_CS_HIGH() *csport |= cspinmask 10 | #define SPI_CS_LOW() *csport &= ~cspinmask 11 | #else 12 | #define SPI_DC_HIGH() digitalWrite(_dc, HIGH) 13 | #define SPI_DC_LOW() digitalWrite(_dc, LOW) 14 | #define SPI_CS_HIGH() digitalWrite(_cs, HIGH) 15 | #define SPI_CS_LOW() digitalWrite(_cs, LOW) 16 | #endif 17 | 18 | /* 19 | * Software SPI Macros 20 | * */ 21 | 22 | #ifdef USE_FAST_PINIO 23 | #define SSPI_MOSI_HIGH() *mosiport |= mosipinmask 24 | #define SSPI_MOSI_LOW() *mosiport &= ~mosipinmask 25 | #define SSPI_SCK_HIGH() *clkport |= clkpinmask 26 | #define SSPI_SCK_LOW() *clkport &= ~clkpinmask 27 | #define SSPI_MISO_READ() ((*misoport & misopinmask) != 0) 28 | #else 29 | #define SSPI_MOSI_HIGH() digitalWrite(_mosi, HIGH) 30 | #define SSPI_MOSI_LOW() digitalWrite(_mosi, LOW) 31 | #define SSPI_SCK_HIGH() digitalWrite(_sclk, HIGH) 32 | #define SSPI_SCK_LOW() digitalWrite(_sclk, LOW) 33 | #define SSPI_MISO_READ() digitalRead(_miso) 34 | #endif 35 | 36 | #define SSPI_BEGIN_TRANSACTION() 37 | #define SSPI_END_TRANSACTION() 38 | #define SSPI_WRITE(v) spiWrite(v) 39 | #define SSPI_WRITE16(s) SSPI_WRITE((s) >> 8); SSPI_WRITE(s) 40 | #define SSPI_WRITE32(l) SSPI_WRITE((l) >> 24); SSPI_WRITE((l) >> 16); SSPI_WRITE((l) >> 8); SSPI_WRITE(l) 41 | #define SSPI_WRITE_PIXELS(c,l) for(uint32_t i=0; i<(l); i+=2){ SSPI_WRITE(((uint8_t*)(c))[i+1]); SSPI_WRITE(((uint8_t*)(c))[i]); } 42 | 43 | /* 44 | * Hardware SPI Macros 45 | * */ 46 | 47 | #define SPI_OBJECT SPI 48 | 49 | #if defined (__AVR__) || defined(TEENSYDUINO) || defined(ARDUINO_ARCH_STM32F1) 50 | #define HSPI_SET_CLOCK() SPI_OBJECT.setClockDivider(SPI_CLOCK_DIV2); 51 | #elif defined (__arm__) 52 | #define HSPI_SET_CLOCK() SPI_OBJECT.setClockDivider(11); 53 | #elif defined(ESP8266) || defined(ESP32) 54 | #define HSPI_SET_CLOCK() SPI_OBJECT.setFrequency(_freq); 55 | #elif defined(RASPI) 56 | #define HSPI_SET_CLOCK() SPI_OBJECT.setClock(_freq); 57 | #elif defined(ARDUINO_ARCH_STM32F1) 58 | #define HSPI_SET_CLOCK() SPI_OBJECT.setClock(_freq); 59 | #else 60 | #define HSPI_SET_CLOCK() 61 | #endif 62 | 63 | #ifdef SPI_HAS_TRANSACTION 64 | #define HSPI_BEGIN_TRANSACTION() SPI_OBJECT.beginTransaction(SPISettings(_freq, MSBFIRST, SPI_MODE0)) 65 | #define HSPI_END_TRANSACTION() SPI_OBJECT.endTransaction() 66 | #else 67 | #define HSPI_BEGIN_TRANSACTION() HSPI_SET_CLOCK(); SPI_OBJECT.setBitOrder(MSBFIRST); SPI_OBJECT.setDataMode(SPI_MODE0) 68 | #define HSPI_END_TRANSACTION() 69 | #endif 70 | 71 | #ifdef ESP32 72 | #define SPI_HAS_WRITE_PIXELS 73 | #endif 74 | #if defined(ESP8266) || defined(ESP32) 75 | // Optimized SPI (ESP8266 and ESP32) 76 | #define HSPI_READ() SPI_OBJECT.transfer(0) 77 | #define HSPI_WRITE(b) SPI_OBJECT.write(b) 78 | #define HSPI_WRITE16(s) SPI_OBJECT.write16(s) 79 | #define HSPI_WRITE32(l) SPI_OBJECT.write32(l) 80 | #ifdef SPI_HAS_WRITE_PIXELS 81 | #define SPI_MAX_PIXELS_AT_ONCE 32 82 | #define HSPI_WRITE_PIXELS(c,l) SPI_OBJECT.writePixels(c,l) 83 | #else 84 | #define HSPI_WRITE_PIXELS(c,l) for(uint32_t i=0; i<((l)/2); i++){ SPI_WRITE16(((uint16_t*)(c))[i]); } 85 | #endif 86 | #else 87 | // Standard Byte-by-Byte SPI 88 | 89 | #if defined (__AVR__) || defined(TEENSYDUINO) 90 | static inline uint8_t _avr_spi_read(void) __attribute__((always_inline)); 91 | static inline uint8_t _avr_spi_read(void) { 92 | uint8_t r = 0; 93 | SPDR = r; 94 | while(!(SPSR & _BV(SPIF))); 95 | r = SPDR; 96 | return r; 97 | } 98 | #define HSPI_WRITE(b) {SPDR = (b); while(!(SPSR & _BV(SPIF)));} 99 | #define HSPI_READ() _avr_spi_read() 100 | #else 101 | #define HSPI_WRITE(b) SPI_OBJECT.transfer((uint8_t)(b)) 102 | #define HSPI_READ() HSPI_WRITE(0) 103 | #endif 104 | #define HSPI_WRITE16(s) HSPI_WRITE((s) >> 8); HSPI_WRITE(s) 105 | #define HSPI_WRITE32(l) HSPI_WRITE((l) >> 24); HSPI_WRITE((l) >> 16); HSPI_WRITE((l) >> 8); HSPI_WRITE(l) 106 | #define HSPI_WRITE_PIXELS(c,l) for(uint32_t i=0; i<(l); i+=2){ HSPI_WRITE(((uint8_t*)(c))[i+1]); HSPI_WRITE(((uint8_t*)(c))[i]); } 107 | #endif 108 | 109 | #define SPI_BEGIN() if(_sclk < 0){SPI_OBJECT.begin();} 110 | #define SPI_BEGIN_TRANSACTION() if(_sclk < 0){HSPI_BEGIN_TRANSACTION();} 111 | #define SPI_END_TRANSACTION() if(_sclk < 0){HSPI_END_TRANSACTION();} 112 | #define SPI_WRITE16(s) if(_sclk < 0){HSPI_WRITE16(s);}else{SSPI_WRITE16(s);} 113 | #define SPI_WRITE32(l) if(_sclk < 0){HSPI_WRITE32(l);}else{SSPI_WRITE32(l);} 114 | #define SPI_WRITE_PIXELS(c,l) if(_sclk < 0){HSPI_WRITE_PIXELS(c,l);}else{SSPI_WRITE_PIXELS(c,l);} 115 | -------------------------------------------------------------------------------- /Библиотеки/SoftwareSerial-master/SoftwareSerial.h: -------------------------------------------------------------------------------- 1 | /* 2 | SoftwareSerial.h (formerly NewSoftSerial.h) - 3 | Multi-instance software serial library for Arduino/Wiring 4 | -- Interrupt-driven receive and other improvements by ladyada 5 | (http://ladyada.net) 6 | -- Tuning, circular buffer, derivation from class Print/Stream, 7 | multi-instance support, porting to 8MHz processors, 8 | various optimizations, PROGMEM delay tables, inverse logic and 9 | direct port writing by Mikal Hart (http://www.arduiniana.org) 10 | -- Pin change interrupt macros by Paul Stoffregen (http://www.pjrc.com) 11 | -- 20MHz processor support by Garrett Mace (http://www.macetech.com) 12 | -- ATmega1280/2560 support by Brett Hagman (http://www.roguerobotics.com/) 13 | 14 | This library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU Lesser General Public 16 | License as published by the Free Software Foundation; either 17 | version 2.1 of the License, or (at your option) any later version. 18 | 19 | This library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | Lesser General Public License for more details. 23 | 24 | You should have received a copy of the GNU Lesser General Public 25 | License along with this library; if not, write to the Free Software 26 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 | 28 | The latest version of this library can always be found at 29 | http://arduiniana.org. 30 | */ 31 | 32 | #ifndef SoftwareSerial_h 33 | #define SoftwareSerial_h 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | /****************************************************************************** 40 | * Definitions 41 | ******************************************************************************/ 42 | 43 | #define _SS_MAX_RX_BUFF 64 // RX buffer size 44 | #ifndef GCC_VERSION 45 | #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) 46 | #endif 47 | 48 | #if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1052__) || defined(__IMXRT1062__) 49 | 50 | class SoftwareSerial : public Stream 51 | { 52 | public: 53 | SoftwareSerial(uint8_t rxPin, uint8_t txPin, bool inverse_logic = false); 54 | ~SoftwareSerial() { end(); } 55 | void begin(unsigned long speed); 56 | void end(); 57 | bool listen() { return true; } 58 | bool isListening() { return true; } 59 | bool overflow() { bool ret = buffer_overflow; buffer_overflow = false; return ret; } 60 | virtual int available(); 61 | virtual int read(); 62 | int peek(); 63 | virtual void flush(); 64 | virtual size_t write(uint8_t byte); 65 | using Print::write; 66 | private: 67 | HardwareSerial *port; 68 | uint32_t cycles_per_bit; 69 | #if defined(__IMXRT1052__) 70 | volatile uint32_t *txreg; 71 | volatile uint32_t *rxreg; 72 | #else 73 | volatile uint8_t *txreg; 74 | volatile uint8_t *rxreg; 75 | #endif 76 | bool buffer_overflow; 77 | uint8_t txpin; 78 | uint8_t rxpin; 79 | }; 80 | 81 | #else 82 | class SoftwareSerial : public Stream 83 | { 84 | private: 85 | // per object data 86 | uint8_t _receivePin; 87 | uint8_t _receiveBitMask; 88 | volatile uint8_t *_receivePortRegister; 89 | uint8_t _transmitBitMask; 90 | volatile uint8_t *_transmitPortRegister; 91 | 92 | uint16_t _rx_delay_centering; 93 | uint16_t _rx_delay_intrabit; 94 | uint16_t _rx_delay_stopbit; 95 | uint16_t _tx_delay; 96 | 97 | uint16_t _buffer_overflow:1; 98 | uint16_t _inverse_logic:1; 99 | 100 | // static data 101 | static char _receive_buffer[_SS_MAX_RX_BUFF]; 102 | static volatile uint8_t _receive_buffer_tail; 103 | static volatile uint8_t _receive_buffer_head; 104 | static SoftwareSerial *active_object; 105 | 106 | // private methods 107 | void recv(); 108 | uint8_t rx_pin_read(); 109 | void tx_pin_write(uint8_t pin_state); 110 | void setTX(uint8_t transmitPin); 111 | void setRX(uint8_t receivePin); 112 | 113 | // private static method for timing 114 | static inline void tunedDelay(uint16_t delay); 115 | 116 | 117 | public: 118 | // public methods 119 | SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false); 120 | ~SoftwareSerial(); 121 | void begin(long speed); 122 | bool listen(); 123 | void end(); 124 | bool isListening() { return this == active_object; } 125 | bool overflow() { bool ret = _buffer_overflow; _buffer_overflow = false; return ret; } 126 | int peek(); 127 | 128 | virtual size_t write(uint8_t byte); 129 | virtual int read(); 130 | virtual int available(); 131 | virtual void flush(); 132 | 133 | using Print::write; 134 | 135 | // public only for easy access by interrupt handlers 136 | static inline void handle_interrupt(); 137 | }; 138 | 139 | // Arduino 0012 workaround 140 | #undef int 141 | #undef char 142 | #undef long 143 | #undef byte 144 | #undef float 145 | #undef abs 146 | #undef round 147 | 148 | #endif 149 | 150 | #endif 151 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit_SSD1306/Adafruit_SSD1306.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | This is a library for our Monochrome OLEDs based on SSD1306 drivers 3 | 4 | Pick one up today in the adafruit shop! 5 | ------> http://www.adafruit.com/category/63_98 6 | 7 | These displays use SPI to communicate, 4 or 5 pins are required to 8 | interface 9 | 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | BSD license, check license.txt for more information 16 | All text above, and the splash screen must be included in any redistribution 17 | *********************************************************************/ 18 | #ifndef _Adafruit_SSD1306_H_ 19 | #define _Adafruit_SSD1306_H_ 20 | 21 | #if ARDUINO >= 100 22 | #include "Arduino.h" 23 | #define WIRE_WRITE Wire.write 24 | #else 25 | #include "WProgram.h" 26 | #define WIRE_WRITE Wire.send 27 | #endif 28 | 29 | #if defined(__SAM3X8E__) 30 | typedef volatile RwReg PortReg; 31 | typedef uint32_t PortMask; 32 | #define HAVE_PORTREG 33 | #elif defined(ARDUINO_ARCH_SAMD) 34 | // not supported 35 | #elif defined(ESP8266) || defined(ESP32) || defined(ARDUINO_STM32_FEATHER) || defined(__arc__) 36 | typedef volatile uint32_t PortReg; 37 | typedef uint32_t PortMask; 38 | #elif defined(__AVR__) 39 | typedef volatile uint8_t PortReg; 40 | typedef uint8_t PortMask; 41 | #define HAVE_PORTREG 42 | #else 43 | // chances are its 32 bit so assume that 44 | typedef volatile uint32_t PortReg; 45 | typedef uint32_t PortMask; 46 | #endif 47 | 48 | #include 49 | #include 50 | 51 | #define BLACK 0 52 | #define WHITE 1 53 | #define INVERSE 2 54 | 55 | #define SSD1306_I2C_ADDRESS 0x3C // 011110+SA0+RW - 0x3C or 0x3D 56 | // Address for 128x32 is 0x3C 57 | // Address for 128x64 is 0x3D (default) or 0x3C (if SA0 is grounded) 58 | 59 | /*========================================================================= 60 | SSD1306 Displays 61 | ----------------------------------------------------------------------- 62 | The driver is used in multiple displays (128x64, 128x32, etc.). 63 | Select the appropriate display below to create an appropriately 64 | sized framebuffer, etc. 65 | 66 | SSD1306_128_64 128x64 pixel display 67 | 68 | SSD1306_128_32 128x32 pixel display 69 | 70 | SSD1306_96_16 71 | 72 | -----------------------------------------------------------------------*/ 73 | // #define SSD1306_128_64 74 | #define SSD1306_128_32 75 | // #define SSD1306_96_16 76 | /*=========================================================================*/ 77 | 78 | #if defined SSD1306_128_64 && defined SSD1306_128_32 79 | #error "Only one SSD1306 display can be specified at once in SSD1306.h" 80 | #endif 81 | #if !defined SSD1306_128_64 && !defined SSD1306_128_32 && !defined SSD1306_96_16 82 | #error "At least one SSD1306 display must be specified in SSD1306.h" 83 | #endif 84 | 85 | #if defined SSD1306_128_64 86 | #define SSD1306_LCDWIDTH 128 87 | #define SSD1306_LCDHEIGHT 64 88 | #endif 89 | #if defined SSD1306_128_32 90 | #define SSD1306_LCDWIDTH 128 91 | #define SSD1306_LCDHEIGHT 32 92 | #endif 93 | #if defined SSD1306_96_16 94 | #define SSD1306_LCDWIDTH 96 95 | #define SSD1306_LCDHEIGHT 16 96 | #endif 97 | 98 | #define SSD1306_SETCONTRAST 0x81 99 | #define SSD1306_DISPLAYALLON_RESUME 0xA4 100 | #define SSD1306_DISPLAYALLON 0xA5 101 | #define SSD1306_NORMALDISPLAY 0xA6 102 | #define SSD1306_INVERTDISPLAY 0xA7 103 | #define SSD1306_DISPLAYOFF 0xAE 104 | #define SSD1306_DISPLAYON 0xAF 105 | 106 | #define SSD1306_SETDISPLAYOFFSET 0xD3 107 | #define SSD1306_SETCOMPINS 0xDA 108 | 109 | #define SSD1306_SETVCOMDETECT 0xDB 110 | 111 | #define SSD1306_SETDISPLAYCLOCKDIV 0xD5 112 | #define SSD1306_SETPRECHARGE 0xD9 113 | 114 | #define SSD1306_SETMULTIPLEX 0xA8 115 | 116 | #define SSD1306_SETLOWCOLUMN 0x00 117 | #define SSD1306_SETHIGHCOLUMN 0x10 118 | 119 | #define SSD1306_SETSTARTLINE 0x40 120 | 121 | #define SSD1306_MEMORYMODE 0x20 122 | #define SSD1306_COLUMNADDR 0x21 123 | #define SSD1306_PAGEADDR 0x22 124 | 125 | #define SSD1306_COMSCANINC 0xC0 126 | #define SSD1306_COMSCANDEC 0xC8 127 | 128 | #define SSD1306_SEGREMAP 0xA0 129 | 130 | #define SSD1306_CHARGEPUMP 0x8D 131 | 132 | #define SSD1306_EXTERNALVCC 0x1 133 | #define SSD1306_SWITCHCAPVCC 0x2 134 | 135 | // Scrolling #defines 136 | #define SSD1306_ACTIVATE_SCROLL 0x2F 137 | #define SSD1306_DEACTIVATE_SCROLL 0x2E 138 | #define SSD1306_SET_VERTICAL_SCROLL_AREA 0xA3 139 | #define SSD1306_RIGHT_HORIZONTAL_SCROLL 0x26 140 | #define SSD1306_LEFT_HORIZONTAL_SCROLL 0x27 141 | #define SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL 0x29 142 | #define SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL 0x2A 143 | 144 | class Adafruit_SSD1306 : public Adafruit_GFX { 145 | public: 146 | Adafruit_SSD1306(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST, int8_t CS); 147 | Adafruit_SSD1306(int8_t DC, int8_t RST, int8_t CS); 148 | Adafruit_SSD1306(int8_t RST = -1); 149 | 150 | void begin(uint8_t switchvcc = SSD1306_SWITCHCAPVCC, uint8_t i2caddr = SSD1306_I2C_ADDRESS, bool reset=true); 151 | void ssd1306_command(uint8_t c); 152 | 153 | void clearDisplay(void); 154 | void invertDisplay(uint8_t i); 155 | void display(); 156 | 157 | void startscrollright(uint8_t start, uint8_t stop); 158 | void startscrollleft(uint8_t start, uint8_t stop); 159 | 160 | void startscrolldiagright(uint8_t start, uint8_t stop); 161 | void startscrolldiagleft(uint8_t start, uint8_t stop); 162 | void stopscroll(void); 163 | 164 | void dim(boolean dim); 165 | 166 | void drawPixel(int16_t x, int16_t y, uint16_t color); 167 | 168 | virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color); 169 | virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 170 | 171 | private: 172 | int8_t _i2caddr, _vccstate, sid, sclk, dc, rst, cs; 173 | void fastSPIwrite(uint8_t c); 174 | 175 | boolean hwSPI; 176 | #ifdef HAVE_PORTREG 177 | PortReg *mosiport, *clkport, *csport, *dcport; 178 | PortMask mosipinmask, clkpinmask, cspinmask, dcpinmask; 179 | #endif 180 | 181 | inline void drawFastVLineInternal(int16_t x, int16_t y, int16_t h, uint16_t color) __attribute__((always_inline)); 182 | inline void drawFastHLineInternal(int16_t x, int16_t y, int16_t w, uint16_t color) __attribute__((always_inline)); 183 | 184 | }; 185 | 186 | #endif /* _Adafruit_SSD1306_H_ */ 187 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/Picopixel.h: -------------------------------------------------------------------------------- 1 | // Picopixel by Sebastian Weber. A tiny font 2 | // with all characters within a 6 pixel height. 3 | 4 | const uint8_t PicopixelBitmaps[] PROGMEM = { 5 | 0xE8, 0xB4, 0x57, 0xD5, 0xF5, 0x00, 0x4E, 0x3E, 0x80, 0xA5, 0x4A, 0x4A, 6 | 0x5A, 0x50, 0xC0, 0x6A, 0x40, 0x95, 0x80, 0xAA, 0x80, 0x5D, 0x00, 0x60, 7 | 0xE0, 0x80, 0x25, 0x48, 0x56, 0xD4, 0x75, 0x40, 0xC5, 0x4E, 0xC5, 0x1C, 8 | 0x97, 0x92, 0xF3, 0x1C, 0x53, 0x54, 0xE5, 0x48, 0x55, 0x54, 0x55, 0x94, 9 | 0xA0, 0x46, 0x64, 0xE3, 0x80, 0x98, 0xC5, 0x04, 0x56, 0xC6, 0x57, 0xDA, 10 | 0xD7, 0x5C, 0x72, 0x46, 0xD6, 0xDC, 0xF3, 0xCE, 0xF3, 0x48, 0x72, 0xD4, 11 | 0xB7, 0xDA, 0xF8, 0x24, 0xD4, 0xBB, 0x5A, 0x92, 0x4E, 0x8E, 0xEB, 0x58, 12 | 0x80, 0x9D, 0xB9, 0x90, 0x56, 0xD4, 0xD7, 0x48, 0x56, 0xD4, 0x40, 0xD7, 13 | 0x5A, 0x71, 0x1C, 0xE9, 0x24, 0xB6, 0xD4, 0xB6, 0xA4, 0x8C, 0x6B, 0x55, 14 | 0x00, 0xB5, 0x5A, 0xB5, 0x24, 0xE5, 0x4E, 0xEA, 0xC0, 0x91, 0x12, 0xD5, 15 | 0xC0, 0x54, 0xF0, 0x90, 0xC7, 0xF0, 0x93, 0x5E, 0x71, 0x80, 0x25, 0xDE, 16 | 0x5E, 0x30, 0x6E, 0x80, 0x77, 0x9C, 0x93, 0x5A, 0xB8, 0x45, 0x60, 0x92, 17 | 0xEA, 0xAA, 0x40, 0xD5, 0x6A, 0xD6, 0x80, 0x55, 0x00, 0xD7, 0x40, 0x75, 18 | 0x90, 0xE8, 0x71, 0xE0, 0xBA, 0x40, 0xB5, 0x80, 0xB5, 0x00, 0x8D, 0x54, 19 | 0xAA, 0x80, 0xAC, 0xE0, 0xE5, 0x70, 0x6A, 0x26, 0xFC, 0xC8, 0xAC, 0x5A }; 20 | 21 | const GFXglyph PicopixelGlyphs[] PROGMEM = { 22 | { 0, 0, 0, 2, 0, 1 }, // 0x20 ' ' 23 | { 0, 1, 5, 2, 0, -4 }, // 0x21 '!' 24 | { 1, 3, 2, 4, 0, -4 }, // 0x22 '"' 25 | { 2, 5, 5, 6, 0, -4 }, // 0x23 '#' 26 | { 6, 3, 6, 4, 0, -4 }, // 0x24 '$' 27 | { 9, 3, 5, 4, 0, -4 }, // 0x25 '%' 28 | { 11, 4, 5, 5, 0, -4 }, // 0x26 '&' 29 | { 14, 1, 2, 2, 0, -4 }, // 0x27 ''' 30 | { 15, 2, 5, 3, 0, -4 }, // 0x28 '(' 31 | { 17, 2, 5, 3, 0, -4 }, // 0x29 ')' 32 | { 19, 3, 3, 4, 0, -3 }, // 0x2A '*' 33 | { 21, 3, 3, 4, 0, -3 }, // 0x2B '+' 34 | { 23, 2, 2, 3, 0, 0 }, // 0x2C ',' 35 | { 24, 3, 1, 4, 0, -2 }, // 0x2D '-' 36 | { 25, 1, 1, 2, 0, 0 }, // 0x2E '.' 37 | { 26, 3, 5, 4, 0, -4 }, // 0x2F '/' 38 | { 28, 3, 5, 4, 0, -4 }, // 0x30 '0' 39 | { 30, 2, 5, 3, 0, -4 }, // 0x31 '1' 40 | { 32, 3, 5, 4, 0, -4 }, // 0x32 '2' 41 | { 34, 3, 5, 4, 0, -4 }, // 0x33 '3' 42 | { 36, 3, 5, 4, 0, -4 }, // 0x34 '4' 43 | { 38, 3, 5, 4, 0, -4 }, // 0x35 '5' 44 | { 40, 3, 5, 4, 0, -4 }, // 0x36 '6' 45 | { 42, 3, 5, 4, 0, -4 }, // 0x37 '7' 46 | { 44, 3, 5, 4, 0, -4 }, // 0x38 '8' 47 | { 46, 3, 5, 4, 0, -4 }, // 0x39 '9' 48 | { 48, 1, 3, 2, 0, -3 }, // 0x3A ':' 49 | { 49, 2, 4, 3, 0, -3 }, // 0x3B ';' 50 | { 50, 2, 3, 3, 0, -3 }, // 0x3C '<' 51 | { 51, 3, 3, 4, 0, -3 }, // 0x3D '=' 52 | { 53, 2, 3, 3, 0, -3 }, // 0x3E '>' 53 | { 54, 3, 5, 4, 0, -4 }, // 0x3F '?' 54 | { 56, 3, 5, 4, 0, -4 }, // 0x40 '@' 55 | { 58, 3, 5, 4, 0, -4 }, // 0x41 'A' 56 | { 60, 3, 5, 4, 0, -4 }, // 0x42 'B' 57 | { 62, 3, 5, 4, 0, -4 }, // 0x43 'C' 58 | { 64, 3, 5, 4, 0, -4 }, // 0x44 'D' 59 | { 66, 3, 5, 4, 0, -4 }, // 0x45 'E' 60 | { 68, 3, 5, 4, 0, -4 }, // 0x46 'F' 61 | { 70, 3, 5, 4, 0, -4 }, // 0x47 'G' 62 | { 72, 3, 5, 4, 0, -4 }, // 0x48 'H' 63 | { 74, 1, 5, 2, 0, -4 }, // 0x49 'I' 64 | { 75, 3, 5, 4, 0, -4 }, // 0x4A 'J' 65 | { 77, 3, 5, 4, 0, -4 }, // 0x4B 'K' 66 | { 79, 3, 5, 4, 0, -4 }, // 0x4C 'L' 67 | { 81, 5, 5, 6, 0, -4 }, // 0x4D 'M' 68 | { 85, 4, 5, 5, 0, -4 }, // 0x4E 'N' 69 | { 88, 3, 5, 4, 0, -4 }, // 0x4F 'O' 70 | { 90, 3, 5, 4, 0, -4 }, // 0x50 'P' 71 | { 92, 3, 6, 4, 0, -4 }, // 0x51 'Q' 72 | { 95, 3, 5, 4, 0, -4 }, // 0x52 'R' 73 | { 97, 3, 5, 4, 0, -4 }, // 0x53 'S' 74 | { 99, 3, 5, 4, 0, -4 }, // 0x54 'T' 75 | { 101, 3, 5, 4, 0, -4 }, // 0x55 'U' 76 | { 103, 3, 5, 4, 0, -4 }, // 0x56 'V' 77 | { 105, 5, 5, 6, 0, -4 }, // 0x57 'W' 78 | { 109, 3, 5, 4, 0, -4 }, // 0x58 'X' 79 | { 111, 3, 5, 4, 0, -4 }, // 0x59 'Y' 80 | { 113, 3, 5, 4, 0, -4 }, // 0x5A 'Z' 81 | { 115, 2, 5, 3, 0, -4 }, // 0x5B '[' 82 | { 117, 3, 5, 4, 0, -4 }, // 0x5C '\' 83 | { 119, 2, 5, 3, 0, -4 }, // 0x5D ']' 84 | { 121, 3, 2, 4, 0, -4 }, // 0x5E '^' 85 | { 122, 4, 1, 4, 0, 1 }, // 0x5F '_' 86 | { 123, 2, 2, 3, 0, -4 }, // 0x60 '`' 87 | { 124, 3, 4, 4, 0, -3 }, // 0x61 'a' 88 | { 126, 3, 5, 4, 0, -4 }, // 0x62 'b' 89 | { 128, 3, 3, 4, 0, -2 }, // 0x63 'c' 90 | { 130, 3, 5, 4, 0, -4 }, // 0x64 'd' 91 | { 132, 3, 4, 4, 0, -3 }, // 0x65 'e' 92 | { 134, 2, 5, 3, 0, -4 }, // 0x66 'f' 93 | { 136, 3, 5, 4, 0, -3 }, // 0x67 'g' 94 | { 138, 3, 5, 4, 0, -4 }, // 0x68 'h' 95 | { 140, 1, 5, 2, 0, -4 }, // 0x69 'i' 96 | { 141, 2, 6, 3, 0, -4 }, // 0x6A 'j' 97 | { 143, 3, 5, 4, 0, -4 }, // 0x6B 'k' 98 | { 145, 2, 5, 3, 0, -4 }, // 0x6C 'l' 99 | { 147, 5, 3, 6, 0, -2 }, // 0x6D 'm' 100 | { 149, 3, 3, 4, 0, -2 }, // 0x6E 'n' 101 | { 151, 3, 3, 4, 0, -2 }, // 0x6F 'o' 102 | { 153, 3, 4, 4, 0, -2 }, // 0x70 'p' 103 | { 155, 3, 4, 4, 0, -2 }, // 0x71 'q' 104 | { 157, 2, 3, 3, 0, -2 }, // 0x72 'r' 105 | { 158, 3, 4, 4, 0, -3 }, // 0x73 's' 106 | { 160, 2, 5, 3, 0, -4 }, // 0x74 't' 107 | { 162, 3, 3, 4, 0, -2 }, // 0x75 'u' 108 | { 164, 3, 3, 4, 0, -2 }, // 0x76 'v' 109 | { 166, 5, 3, 6, 0, -2 }, // 0x77 'w' 110 | { 168, 3, 3, 4, 0, -2 }, // 0x78 'x' 111 | { 170, 3, 4, 4, 0, -2 }, // 0x79 'y' 112 | { 172, 3, 4, 4, 0, -3 }, // 0x7A 'z' 113 | { 174, 3, 5, 4, 0, -4 }, // 0x7B '{' 114 | { 176, 1, 6, 2, 0, -4 }, // 0x7C '|' 115 | { 177, 3, 5, 4, 0, -4 }, // 0x7D '}' 116 | { 179, 4, 2, 5, 0, -3 } }; // 0x7E '~' 117 | 118 | const GFXfont Picopixel PROGMEM = { 119 | (uint8_t *)PicopixelBitmaps, 120 | (GFXglyph *)PicopixelGlyphs, 121 | 0x20, 0x7E, 7 }; 122 | 123 | // Approx. 852 bytes 124 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/Tiny3x3a2pt7b: -------------------------------------------------------------------------------- 1 | /** 2 | ** The FontStruction “Tiny3x3a” 3 | ** (https://fontstruct.com/fontstructions/show/670512) by “Michaelangel007” is 4 | ** licensed under a Creative Commons Attribution Non-commercial Share Alike license 5 | ** (http://creativecommons.org/licenses/by-nc-sa/3.0/). 6 | ** “Tiny3x3a” was originally cloned (copied) from the FontStruction 7 | ** “CHECKER” (https://fontstruct.com/fontstructions/show/2391) by Wolf grant 8 | ** Grant, which is licensed under a Creative Commons Attribution Non-commercial 9 | ** Share Alike license (http://creativecommons.org/licenses/by-nc-sa/3.0/). 10 | * 11 | * Converted by eadmaster with fontconvert 12 | **/ 13 | 14 | const uint8_t Tiny3x3a2pt7bBitmaps[] PROGMEM = { 15 | 0xC0, 0xB4, 0xBF, 0x80, 0x6B, 0x00, 0xDD, 0x80, 0x59, 0x80, 0x80, 0x64, 16 | 0x98, 0xF0, 0x5D, 0x00, 0xC0, 0xE0, 0x80, 0x2A, 0x00, 0x55, 0x00, 0x94, 17 | 0xC9, 0x80, 0xEF, 0x80, 0xBC, 0x80, 0x6B, 0x00, 0x9F, 0x80, 0xE4, 0x80, 18 | 0x7F, 0x00, 0xFC, 0x80, 0xA0, 0x58, 0x64, 0xE3, 0x80, 0x98, 0xD8, 0xD8, 19 | 0x80, 0x5E, 0x80, 0xDF, 0x80, 0x71, 0x80, 0xD7, 0x00, 0xFB, 0x80, 0xFA, 20 | 0x00, 0xD7, 0x80, 0xBE, 0x80, 0xE0, 0x27, 0x00, 0xBA, 0x80, 0x93, 0x80, 21 | 0xFE, 0x80, 0xF6, 0x80, 0xF7, 0x80, 0xFE, 0x00, 0xF7, 0x00, 0xDE, 0x80, 22 | 0x6B, 0x00, 0xE9, 0x00, 0xB7, 0x80, 0xB5, 0x00, 0xBF, 0x80, 0xAA, 0x80, 23 | 0xA9, 0x00, 0xEB, 0x80, 0xEC, 0x88, 0x80, 0xDC, 0x54, 0xE0, 0x90, 0x70, 24 | 0xBC, 0xF0, 0x7C, 0xB0, 0x68, 0xFC, 0xBC, 0xC0, 0x58, 0x9A, 0x80, 0xA4, 25 | 0xDC, 0xD4, 0xF0, 0xF8, 0xF4, 0xE0, 0x60, 0x59, 0x80, 0xBC, 0xA8, 0xEC, 26 | 0xF0, 0xAC, 0x80, 0x90, 0x79, 0x80, 0xF0, 0xCF, 0x00, 0x78 }; 27 | 28 | const GFXglyph Tiny3x3a2pt7bGlyphs[] PROGMEM = { 29 | { 0, 0, 0, 4, 0, 1 }, // 0x20 ' ' 30 | { 0, 1, 2, 3, 1, -2 }, // 0x21 '!' 31 | { 1, 3, 2, 4, 0, -2 }, // 0x22 '"' 32 | { 2, 3, 3, 4, 0, -2 }, // 0x23 '#' 33 | { 4, 3, 3, 4, 0, -2 }, // 0x24 '$' 34 | { 6, 3, 3, 4, 0, -2 }, // 0x25 '%' 35 | { 8, 3, 3, 4, 0, -2 }, // 0x26 '&' 36 | { 10, 1, 1, 3, 1, -2 }, // 0x27 ''' 37 | { 11, 2, 3, 3, 0, -2 }, // 0x28 '(' 38 | { 12, 2, 3, 4, 1, -2 }, // 0x29 ')' 39 | { 13, 2, 2, 4, 1, -2 }, // 0x2A '*' 40 | { 14, 3, 3, 4, 0, -2 }, // 0x2B '+' 41 | { 16, 1, 2, 2, 0, 0 }, // 0x2C ',' 42 | { 17, 3, 1, 4, 0, -1 }, // 0x2D '-' 43 | { 18, 1, 1, 2, 0, 0 }, // 0x2E '.' 44 | { 19, 3, 3, 4, 0, -2 }, // 0x2F '/' 45 | { 21, 3, 3, 4, 0, -2 }, // 0x30 '0' 46 | { 23, 2, 3, 3, 0, -2 }, // 0x31 '1' 47 | { 24, 3, 3, 4, 0, -2 }, // 0x32 '2' 48 | { 26, 3, 3, 4, 0, -2 }, // 0x33 '3' 49 | { 28, 3, 3, 4, 0, -2 }, // 0x34 '4' 50 | { 30, 3, 3, 4, 0, -2 }, // 0x35 '5' 51 | { 32, 3, 3, 4, 0, -2 }, // 0x36 '6' 52 | { 34, 3, 3, 4, 0, -2 }, // 0x37 '7' 53 | { 36, 3, 3, 4, 0, -2 }, // 0x38 '8' 54 | { 38, 3, 3, 4, 0, -2 }, // 0x39 '9' 55 | { 40, 1, 3, 3, 1, -2 }, // 0x3A ':' 56 | { 41, 2, 3, 3, 0, -1 }, // 0x3B ';' 57 | { 42, 2, 3, 3, 0, -2 }, // 0x3C '<' 58 | { 43, 3, 3, 4, 0, -2 }, // 0x3D '=' 59 | { 45, 2, 3, 4, 1, -2 }, // 0x3E '>' 60 | { 46, 2, 3, 4, 1, -2 }, // 0x3F '?' 61 | { 47, 3, 3, 4, 0, -2 }, // 0x40 '@' 62 | { 49, 3, 3, 4, 0, -2 }, // 0x41 'A' 63 | { 51, 3, 3, 4, 0, -2 }, // 0x42 'B' 64 | { 53, 3, 3, 4, 0, -2 }, // 0x43 'C' 65 | { 55, 3, 3, 4, 0, -2 }, // 0x44 'D' 66 | { 57, 3, 3, 4, 0, -2 }, // 0x45 'E' 67 | { 59, 3, 3, 4, 0, -2 }, // 0x46 'F' 68 | { 61, 3, 3, 4, 0, -2 }, // 0x47 'G' 69 | { 63, 3, 3, 4, 0, -2 }, // 0x48 'H' 70 | { 65, 1, 3, 3, 1, -2 }, // 0x49 'I' 71 | { 66, 3, 3, 4, 0, -2 }, // 0x4A 'J' 72 | { 68, 3, 3, 4, 0, -2 }, // 0x4B 'K' 73 | { 70, 3, 3, 4, 0, -2 }, // 0x4C 'L' 74 | { 72, 3, 3, 4, 0, -2 }, // 0x4D 'M' 75 | { 74, 3, 3, 4, 0, -2 }, // 0x4E 'N' 76 | { 76, 3, 3, 4, 0, -2 }, // 0x4F 'O' 77 | { 78, 3, 3, 4, 0, -2 }, // 0x50 'P' 78 | { 80, 3, 3, 4, 0, -2 }, // 0x51 'Q' 79 | { 82, 3, 3, 4, 0, -2 }, // 0x52 'R' 80 | { 84, 3, 3, 4, 0, -2 }, // 0x53 'S' 81 | { 86, 3, 3, 4, 0, -2 }, // 0x54 'T' 82 | { 88, 3, 3, 4, 0, -2 }, // 0x55 'U' 83 | { 90, 3, 3, 4, 0, -2 }, // 0x56 'V' 84 | { 92, 3, 3, 4, 0, -2 }, // 0x57 'W' 85 | { 94, 3, 3, 4, 0, -2 }, // 0x58 'X' 86 | { 96, 3, 3, 4, 0, -2 }, // 0x59 'Y' 87 | { 98, 3, 3, 4, 0, -2 }, // 0x5A 'Z' 88 | { 100, 2, 3, 3, 0, -2 }, // 0x5B '[' 89 | { 101, 3, 3, 4, 0, -2 }, // 0x5C '\' 90 | { 103, 2, 3, 4, 1, -2 }, // 0x5D ']' 91 | { 104, 3, 2, 4, 0, -2 }, // 0x5E '^' 92 | { 105, 3, 1, 4, 0, 0 }, // 0x5F '_' 93 | { 106, 2, 2, 3, 0, -2 }, // 0x60 '`' 94 | { 107, 2, 2, 3, 0, -1 }, // 0x61 'a' 95 | { 108, 2, 3, 3, 0, -2 }, // 0x62 'b' 96 | { 109, 2, 2, 3, 0, -1 }, // 0x63 'c' 97 | { 110, 2, 3, 3, 0, -2 }, // 0x64 'd' 98 | { 111, 2, 2, 3, 0, -1 }, // 0x65 'e' 99 | { 112, 2, 3, 3, 0, -2 }, // 0x66 'f' 100 | { 113, 2, 3, 3, 0, -1 }, // 0x67 'g' 101 | { 114, 2, 3, 3, 0, -2 }, // 0x68 'h' 102 | { 115, 1, 2, 2, 0, -1 }, // 0x69 'i' 103 | { 116, 2, 3, 3, 0, -1 }, // 0x6A 'j' 104 | { 117, 3, 3, 4, 0, -2 }, // 0x6B 'k' 105 | { 119, 2, 3, 3, 0, -2 }, // 0x6C 'l' 106 | { 120, 3, 2, 4, 0, -1 }, // 0x6D 'm' 107 | { 121, 3, 2, 4, 0, -1 }, // 0x6E 'n' 108 | { 122, 2, 2, 3, 0, -1 }, // 0x6F 'o' 109 | { 123, 2, 3, 3, 0, -1 }, // 0x70 'p' 110 | { 124, 2, 3, 3, 0, -1 }, // 0x71 'q' 111 | { 125, 2, 2, 3, 0, -1 }, // 0x72 'r' 112 | { 126, 2, 2, 3, 0, -1 }, // 0x73 's' 113 | { 127, 3, 3, 4, 0, -2 }, // 0x74 't' 114 | { 129, 3, 2, 4, 0, -1 }, // 0x75 'u' 115 | { 130, 3, 2, 4, 0, -1 }, // 0x76 'v' 116 | { 131, 3, 2, 4, 0, -1 }, // 0x77 'w' 117 | { 132, 2, 2, 3, 0, -1 }, // 0x78 'x' 118 | { 133, 3, 3, 4, 0, -1 }, // 0x79 'y' 119 | { 135, 2, 2, 3, 0, -1 }, // 0x7A 'z' 120 | { 136, 3, 3, 4, 0, -2 }, // 0x7B '{' 121 | { 138, 1, 4, 3, 1, -2 }, // 0x7C '|' 122 | { 139, 3, 3, 4, 0, -2 }, // 0x7D '}' 123 | { 141, 3, 2, 4, 0, -2 } }; // 0x7E '~' 124 | 125 | const GFXfont Tiny3x3a2pt7b PROGMEM = { 126 | (uint8_t *)Tiny3x3a2pt7bBitmaps, 127 | (GFXglyph *)Tiny3x3a2pt7bGlyphs, 128 | 0x20, 0x7E, 4 }; 129 | 130 | // Approx. 814 bytes 131 | -------------------------------------------------------------------------------- /My_125_kHz_spoofer_v.03/My_125_kHz_spoofer_v.03.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #define OLED_RESET 6 12 | Adafruit_SSD1306 display(OLED_RESET); 13 | 14 | #define NUMFLAKES 10 15 | #define XPOS 0 16 | #define YPOS 1 17 | #define DELTAY 2 18 | 19 | 20 | #define LOGO16_GLCD_HEIGHT 16 21 | #define LOGO16_GLCD_WIDTH 16 22 | static const unsigned char PROGMEM logo16_glcd_bmp[] = 23 | { B00000000, B11000000, 24 | B00000001, B11000000, 25 | B00000001, B11000000, 26 | B00000011, B11100000, 27 | B11110011, B11100000, 28 | B11111110, B11111000, 29 | B01111110, B11111111, 30 | B00110011, B10011111, 31 | B00011111, B11111100, 32 | B00001101, B01110000, 33 | B00011011, B10100000, 34 | B00111111, B11100000, 35 | B00111111, B11110000, 36 | B01111100, B11110000, 37 | B01110000, B01110000, 38 | B00000000, B00110000 39 | }; 40 | 41 | #if (SSD1306_LCDHEIGHT != 32) 42 | #error("Height incorrect, please fix Adafruit_SSD1306.h!"); 43 | #endif 44 | 45 | // Пин к которому подключена катушка - пин А5 (19 цифровой) 46 | #define COIL 2 47 | 48 | 49 | 50 | byte facility[2] = { 0x02, 0x0C }; 51 | byte cardID[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 52 | int colsum[4] = { 0, 0, 0, 0}; // storage for the column checksums 53 | 54 | // delay between symbols when we are transmitting 55 | int bittime = 256; 56 | 57 | byte RFIDdata[128]; 58 | 59 | int clock = 0; // storage for the current state of our clock signal. 60 | 61 | byte datapointer = 0; 62 | byte state; 63 | 64 | //****************************************************** 65 | #define METAKOM_CYFRAL 0xFFFFFFFFFF 66 | #define METAKOM_1 0x365A1140BE 67 | #define CYFRAL_1 0x01FFFFFFFF 68 | #define VIZIT_1 0x565A1140BE 69 | #define VIZIT_2 0x365A398149 70 | #define ELTIS 0x0 71 | #define LIFT 0x0B57814601 72 | #define TOILET 0x0400711335 //53 73 | 74 | //uint64_t universalID[8] = {1099511627775, 233439314110, 8589934591, 370878267582, 233441952073, 0, 48712730113, 5675447}; 75 | uint64_t universalID[] = 76 | { 77 | METAKOM_CYFRAL, 78 | METAKOM_1, 79 | CYFRAL_1, 80 | VIZIT_1, 81 | VIZIT_2, 82 | 0, 83 | LIFT, 84 | TOILET 85 | }; 86 | uint32_t nibleMask = 15; 87 | 88 | #define BTN_UP 3 89 | #define BTN_DWN 5 90 | #define BTN_SEL 4 91 | 92 | int8_t keyNumber = 0; 93 | 94 | void setup() 95 | { 96 | Serial.begin(9600); 97 | 98 | pinMode(BTN_UP, INPUT); 99 | pinMode(BTN_DWN, INPUT); 100 | pinMode(BTN_SEL, INPUT); 101 | 102 | pinMode(COIL, OUTPUT); 103 | digitalWrite(COIL, LOW); 104 | 105 | display.begin(SSD1306_SWITCHCAPVCC, 0x3C); 106 | display.display(); 107 | display.clearDisplay(); 108 | 109 | display.setTextSize(1); 110 | display.setTextColor(WHITE); 111 | } 112 | 113 | void loop(void) 114 | { 115 | Serial.println(keyNumber); 116 | 117 | if (digitalRead(BTN_UP) == HIGH) 118 | { 119 | keyNumber++; 120 | if (keyNumber == 8) keyNumber = 0; 121 | while (digitalRead(BTN_UP) == HIGH); 122 | display.clearDisplay(); 123 | } 124 | 125 | if (digitalRead(BTN_DWN) == HIGH) 126 | { 127 | keyNumber--; 128 | if (keyNumber == -1) keyNumber = 7; 129 | while (digitalRead(BTN_DWN) == HIGH); 130 | display.clearDisplay(); 131 | } 132 | 133 | switch (keyNumber) 134 | { 135 | case 0: 136 | display.setCursor(0, 0); 137 | display.println(">1 MEATACOM_CYFRAL"); 138 | display.println(" 2 MEATACOM_1"); 139 | display.println(" 3 CYFRAL_1"); 140 | display.println(" 4 VIZIT_1"); 141 | display.display(); 142 | break; 143 | case 1: 144 | display.setCursor(0, 0); 145 | display.println(" 1 MEATACOM"); 146 | display.println(">2 MEATACOM_1"); 147 | display.println(" 3 CYFRAL_1"); 148 | display.println(" 4 VIZIT_1"); 149 | display.display(); 150 | break; 151 | case 2: 152 | display.setCursor(0, 0); 153 | display.println(" 1 MEATACOM"); 154 | display.println(" 2 MEATACOM_1"); 155 | display.println(">3 CYFRAL_1"); 156 | display.println(" 4 VIZIT_1"); 157 | display.display(); 158 | break; 159 | case 3: 160 | display.setCursor(0, 0); 161 | display.println(" 1 MEATACOM"); 162 | display.println(" 2 MEATACOM_1"); 163 | display.println(" 3 CYFRAL_1"); 164 | display.println(">4 VIZIT_1"); 165 | display.display(); 166 | break; 167 | case 4: 168 | display.setCursor(0, 0); 169 | display.println(">5 VIZIT_2"); 170 | display.println(" 6 ELTIS"); 171 | display.println(" 7 LIFT"); 172 | display.println(" 8 TOILET"); 173 | display.display(); 174 | break; 175 | case 5: 176 | display.setCursor(0, 0); 177 | display.println(" 5 VIZIT_2"); 178 | display.println(">6 ELTIS"); 179 | display.println(" 7 LIFT"); 180 | display.println(" 8 TOILET"); 181 | display.display(); 182 | break; 183 | case 6: 184 | display.setCursor(0, 0); 185 | display.println(" 5 VIZIT_2"); 186 | display.println(" 6 ELTIS"); 187 | display.println(">7 LIFT"); 188 | display.println(" 8 TOILET"); 189 | display.display(); 190 | break; 191 | case 7: 192 | display.setCursor(0, 0); 193 | display.println(" 5 VIZIT_2"); 194 | display.println(" 6 ELTIS"); 195 | display.println(" 7 LIFT"); 196 | display.println(">8 TOILET"); 197 | display.display(); 198 | break; 199 | } 200 | 201 | if (digitalRead(BTN_SEL) == HIGH) 202 | { 203 | display.clearDisplay(); 204 | switch (keyNumber) 205 | { 206 | case 0: 207 | display.setCursor(0, 0); 208 | display.println("> MEATACOM_CYFRAL <"); 209 | break; 210 | case 1: 211 | display.setCursor(0, 0); 212 | display.println("> MEATACOM_1 <"); 213 | break; 214 | case 2: 215 | display.setCursor(0, 0); 216 | display.println("> CYFRAL_1 <"); 217 | break; 218 | case 3: 219 | display.setCursor(0, 0); 220 | display.println("> VIZIT_1 <"); 221 | break; 222 | case 4: 223 | display.setCursor(0, 0); 224 | display.println("> VIZIT_2 <"); 225 | break; 226 | case 5: 227 | display.setCursor(0, 0); 228 | display.println("> ELTIS <"); 229 | break; 230 | case 6: 231 | display.setCursor(0, 0); 232 | display.println("> LIFT <"); 233 | break; 234 | case 7: 235 | display.setCursor(0, 0); 236 | display.println("> TOILET <"); 237 | break; 238 | } 239 | display.println("Press reset"); 240 | display.println("to continue..."); 241 | display.display(); 242 | 243 | facility[0] = universalID[keyNumber] >> 36 & nibleMask; 244 | facility[1] = universalID[keyNumber] >> 32 & nibleMask; 245 | 246 | for (uint8_t i = 0; i < 8; ++i ) //забиваем десятичный ID карты в массив 247 | { 248 | cardID[i] = (universalID[keyNumber] >> ((7 - i) * 4)) & nibleMask; //в нулевой элемент массива надо записывать старший разряд, поэтому 7-i 249 | } 250 | 251 | EmulateCard(); // start card emulation 252 | } 253 | 254 | } 255 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/Org_01.h: -------------------------------------------------------------------------------- 1 | // Org_v01 by Orgdot (www.orgdot.com/aliasfonts). A tiny, 2 | // stylized font with all characters within a 6 pixel height. 3 | 4 | const uint8_t Org_01Bitmaps[] PROGMEM = { 5 | 0xE8, 0xA0, 0x57, 0xD5, 0xF5, 0x00, 0xFD, 0x3E, 0x5F, 0x80, 0x88, 0x88, 6 | 0x88, 0x80, 0xF4, 0xBF, 0x2E, 0x80, 0x80, 0x6A, 0x40, 0x95, 0x80, 0xAA, 7 | 0x80, 0x5D, 0x00, 0xC0, 0xF0, 0x80, 0x08, 0x88, 0x88, 0x00, 0xFC, 0x63, 8 | 0x1F, 0x80, 0xF8, 0xF8, 0x7F, 0x0F, 0x80, 0xF8, 0x7E, 0x1F, 0x80, 0x8C, 9 | 0x7E, 0x10, 0x80, 0xFC, 0x3E, 0x1F, 0x80, 0xFC, 0x3F, 0x1F, 0x80, 0xF8, 10 | 0x42, 0x10, 0x80, 0xFC, 0x7F, 0x1F, 0x80, 0xFC, 0x7E, 0x1F, 0x80, 0x90, 11 | 0xB0, 0x2A, 0x22, 0xF0, 0xF0, 0x88, 0xA8, 0xF8, 0x4E, 0x02, 0x00, 0xFD, 12 | 0x6F, 0x0F, 0x80, 0xFC, 0x7F, 0x18, 0x80, 0xF4, 0x7D, 0x1F, 0x00, 0xFC, 13 | 0x21, 0x0F, 0x80, 0xF4, 0x63, 0x1F, 0x00, 0xFC, 0x3F, 0x0F, 0x80, 0xFC, 14 | 0x3F, 0x08, 0x00, 0xFC, 0x2F, 0x1F, 0x80, 0x8C, 0x7F, 0x18, 0x80, 0xF9, 15 | 0x08, 0x4F, 0x80, 0x78, 0x85, 0x2F, 0x80, 0x8D, 0xB1, 0x68, 0x80, 0x84, 16 | 0x21, 0x0F, 0x80, 0xFD, 0x6B, 0x5A, 0x80, 0xFC, 0x63, 0x18, 0x80, 0xFC, 17 | 0x63, 0x1F, 0x80, 0xFC, 0x7F, 0x08, 0x00, 0xFC, 0x63, 0x3F, 0x80, 0xFC, 18 | 0x7F, 0x29, 0x00, 0xFC, 0x3E, 0x1F, 0x80, 0xF9, 0x08, 0x42, 0x00, 0x8C, 19 | 0x63, 0x1F, 0x80, 0x8C, 0x62, 0xA2, 0x00, 0xAD, 0x6B, 0x5F, 0x80, 0x8A, 20 | 0x88, 0xA8, 0x80, 0x8C, 0x54, 0x42, 0x00, 0xF8, 0x7F, 0x0F, 0x80, 0xEA, 21 | 0xC0, 0x82, 0x08, 0x20, 0x80, 0xD5, 0xC0, 0x54, 0xF8, 0x80, 0xF1, 0xFF, 22 | 0x8F, 0x99, 0xF0, 0xF8, 0x8F, 0x1F, 0x99, 0xF0, 0xFF, 0x8F, 0x6B, 0xA4, 23 | 0xF9, 0x9F, 0x10, 0x8F, 0x99, 0x90, 0xF0, 0x55, 0xC0, 0x8A, 0xF9, 0x90, 24 | 0xF8, 0xFD, 0x63, 0x10, 0xF9, 0x99, 0xF9, 0x9F, 0xF9, 0x9F, 0x80, 0xF9, 25 | 0x9F, 0x20, 0xF8, 0x88, 0x47, 0x1F, 0x27, 0xC8, 0x42, 0x00, 0x99, 0x9F, 26 | 0x99, 0x97, 0x8C, 0x6B, 0xF0, 0x96, 0x69, 0x99, 0x9F, 0x10, 0x2E, 0x8F, 27 | 0x2B, 0x22, 0xF8, 0x89, 0xA8, 0x0F, 0xE0 }; 28 | 29 | const GFXglyph Org_01Glyphs[] PROGMEM = { 30 | { 0, 0, 0, 6, 0, 1 }, // 0x20 ' ' 31 | { 0, 1, 5, 2, 0, -4 }, // 0x21 '!' 32 | { 1, 3, 1, 4, 0, -4 }, // 0x22 '"' 33 | { 2, 5, 5, 6, 0, -4 }, // 0x23 '#' 34 | { 6, 5, 5, 6, 0, -4 }, // 0x24 '$' 35 | { 10, 5, 5, 6, 0, -4 }, // 0x25 '%' 36 | { 14, 5, 5, 6, 0, -4 }, // 0x26 '&' 37 | { 18, 1, 1, 2, 0, -4 }, // 0x27 ''' 38 | { 19, 2, 5, 3, 0, -4 }, // 0x28 '(' 39 | { 21, 2, 5, 3, 0, -4 }, // 0x29 ')' 40 | { 23, 3, 3, 4, 0, -3 }, // 0x2A '*' 41 | { 25, 3, 3, 4, 0, -3 }, // 0x2B '+' 42 | { 27, 1, 2, 2, 0, 0 }, // 0x2C ',' 43 | { 28, 4, 1, 5, 0, -2 }, // 0x2D '-' 44 | { 29, 1, 1, 2, 0, 0 }, // 0x2E '.' 45 | { 30, 5, 5, 6, 0, -4 }, // 0x2F '/' 46 | { 34, 5, 5, 6, 0, -4 }, // 0x30 '0' 47 | { 38, 1, 5, 2, 0, -4 }, // 0x31 '1' 48 | { 39, 5, 5, 6, 0, -4 }, // 0x32 '2' 49 | { 43, 5, 5, 6, 0, -4 }, // 0x33 '3' 50 | { 47, 5, 5, 6, 0, -4 }, // 0x34 '4' 51 | { 51, 5, 5, 6, 0, -4 }, // 0x35 '5' 52 | { 55, 5, 5, 6, 0, -4 }, // 0x36 '6' 53 | { 59, 5, 5, 6, 0, -4 }, // 0x37 '7' 54 | { 63, 5, 5, 6, 0, -4 }, // 0x38 '8' 55 | { 67, 5, 5, 6, 0, -4 }, // 0x39 '9' 56 | { 71, 1, 4, 2, 0, -3 }, // 0x3A ':' 57 | { 72, 1, 4, 2, 0, -3 }, // 0x3B ';' 58 | { 73, 3, 5, 4, 0, -4 }, // 0x3C '<' 59 | { 75, 4, 3, 5, 0, -3 }, // 0x3D '=' 60 | { 77, 3, 5, 4, 0, -4 }, // 0x3E '>' 61 | { 79, 5, 5, 6, 0, -4 }, // 0x3F '?' 62 | { 83, 5, 5, 6, 0, -4 }, // 0x40 '@' 63 | { 87, 5, 5, 6, 0, -4 }, // 0x41 'A' 64 | { 91, 5, 5, 6, 0, -4 }, // 0x42 'B' 65 | { 95, 5, 5, 6, 0, -4 }, // 0x43 'C' 66 | { 99, 5, 5, 6, 0, -4 }, // 0x44 'D' 67 | { 103, 5, 5, 6, 0, -4 }, // 0x45 'E' 68 | { 107, 5, 5, 6, 0, -4 }, // 0x46 'F' 69 | { 111, 5, 5, 6, 0, -4 }, // 0x47 'G' 70 | { 115, 5, 5, 6, 0, -4 }, // 0x48 'H' 71 | { 119, 5, 5, 6, 0, -4 }, // 0x49 'I' 72 | { 123, 5, 5, 6, 0, -4 }, // 0x4A 'J' 73 | { 127, 5, 5, 6, 0, -4 }, // 0x4B 'K' 74 | { 131, 5, 5, 6, 0, -4 }, // 0x4C 'L' 75 | { 135, 5, 5, 6, 0, -4 }, // 0x4D 'M' 76 | { 139, 5, 5, 6, 0, -4 }, // 0x4E 'N' 77 | { 143, 5, 5, 6, 0, -4 }, // 0x4F 'O' 78 | { 147, 5, 5, 6, 0, -4 }, // 0x50 'P' 79 | { 151, 5, 5, 6, 0, -4 }, // 0x51 'Q' 80 | { 155, 5, 5, 6, 0, -4 }, // 0x52 'R' 81 | { 159, 5, 5, 6, 0, -4 }, // 0x53 'S' 82 | { 163, 5, 5, 6, 0, -4 }, // 0x54 'T' 83 | { 167, 5, 5, 6, 0, -4 }, // 0x55 'U' 84 | { 171, 5, 5, 6, 0, -4 }, // 0x56 'V' 85 | { 175, 5, 5, 6, 0, -4 }, // 0x57 'W' 86 | { 179, 5, 5, 6, 0, -4 }, // 0x58 'X' 87 | { 183, 5, 5, 6, 0, -4 }, // 0x59 'Y' 88 | { 187, 5, 5, 6, 0, -4 }, // 0x5A 'Z' 89 | { 191, 2, 5, 3, 0, -4 }, // 0x5B '[' 90 | { 193, 5, 5, 6, 0, -4 }, // 0x5C '\' 91 | { 197, 2, 5, 3, 0, -4 }, // 0x5D ']' 92 | { 199, 3, 2, 4, 0, -4 }, // 0x5E '^' 93 | { 200, 5, 1, 6, 0, 1 }, // 0x5F '_' 94 | { 201, 1, 1, 2, 0, -4 }, // 0x60 '`' 95 | { 202, 4, 4, 5, 0, -3 }, // 0x61 'a' 96 | { 204, 4, 5, 5, 0, -4 }, // 0x62 'b' 97 | { 207, 4, 4, 5, 0, -3 }, // 0x63 'c' 98 | { 209, 4, 5, 5, 0, -4 }, // 0x64 'd' 99 | { 212, 4, 4, 5, 0, -3 }, // 0x65 'e' 100 | { 214, 3, 5, 4, 0, -4 }, // 0x66 'f' 101 | { 216, 4, 5, 5, 0, -3 }, // 0x67 'g' 102 | { 219, 4, 5, 5, 0, -4 }, // 0x68 'h' 103 | { 222, 1, 4, 2, 0, -3 }, // 0x69 'i' 104 | { 223, 2, 5, 3, 0, -3 }, // 0x6A 'j' 105 | { 225, 4, 5, 5, 0, -4 }, // 0x6B 'k' 106 | { 228, 1, 5, 2, 0, -4 }, // 0x6C 'l' 107 | { 229, 5, 4, 6, 0, -3 }, // 0x6D 'm' 108 | { 232, 4, 4, 5, 0, -3 }, // 0x6E 'n' 109 | { 234, 4, 4, 5, 0, -3 }, // 0x6F 'o' 110 | { 236, 4, 5, 5, 0, -3 }, // 0x70 'p' 111 | { 239, 4, 5, 5, 0, -3 }, // 0x71 'q' 112 | { 242, 4, 4, 5, 0, -3 }, // 0x72 'r' 113 | { 244, 4, 4, 5, 0, -3 }, // 0x73 's' 114 | { 246, 5, 5, 6, 0, -4 }, // 0x74 't' 115 | { 250, 4, 4, 5, 0, -3 }, // 0x75 'u' 116 | { 252, 4, 4, 5, 0, -3 }, // 0x76 'v' 117 | { 254, 5, 4, 6, 0, -3 }, // 0x77 'w' 118 | { 257, 4, 4, 5, 0, -3 }, // 0x78 'x' 119 | { 259, 4, 5, 5, 0, -3 }, // 0x79 'y' 120 | { 262, 4, 4, 5, 0, -3 }, // 0x7A 'z' 121 | { 264, 3, 5, 4, 0, -4 }, // 0x7B '{' 122 | { 266, 1, 5, 2, 0, -4 }, // 0x7C '|' 123 | { 267, 3, 5, 4, 0, -4 }, // 0x7D '}' 124 | { 269, 5, 3, 6, 0, -3 } }; // 0x7E '~' 125 | 126 | const GFXfont Org_01 PROGMEM = { 127 | (uint8_t *)Org_01Bitmaps, 128 | (GFXglyph *)Org_01Glyphs, 129 | 0x20, 0x7E, 7 }; 130 | 131 | // Approx. 943 bytes 132 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Adafruit_GFX.h: -------------------------------------------------------------------------------- 1 | #ifndef _ADAFRUIT_GFX_H 2 | #define _ADAFRUIT_GFX_H 3 | 4 | #if ARDUINO >= 100 5 | #include "Arduino.h" 6 | #include "Print.h" 7 | #else 8 | #include "WProgram.h" 9 | #endif 10 | #include "gfxfont.h" 11 | 12 | class Adafruit_GFX : public Print { 13 | 14 | public: 15 | 16 | Adafruit_GFX(int16_t w, int16_t h); // Constructor 17 | 18 | // This MUST be defined by the subclass: 19 | virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0; 20 | 21 | // TRANSACTION API / CORE DRAW API 22 | // These MAY be overridden by the subclass to provide device-specific 23 | // optimized code. Otherwise 'generic' versions are used. 24 | virtual void startWrite(void); 25 | virtual void writePixel(int16_t x, int16_t y, uint16_t color); 26 | virtual void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 27 | virtual void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color); 28 | virtual void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 29 | virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color); 30 | virtual void endWrite(void); 31 | 32 | // CONTROL API 33 | // These MAY be overridden by the subclass to provide device-specific 34 | // optimized code. Otherwise 'generic' versions are used. 35 | virtual void setRotation(uint8_t r); 36 | virtual void invertDisplay(boolean i); 37 | 38 | // BASIC DRAW API 39 | // These MAY be overridden by the subclass to provide device-specific 40 | // optimized code. Otherwise 'generic' versions are used. 41 | virtual void 42 | // It's good to implement those, even if using transaction API 43 | drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color), 44 | drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color), 45 | fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color), 46 | fillScreen(uint16_t color), 47 | // Optional and probably not necessary to change 48 | drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color), 49 | drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 50 | 51 | // These exist only with Adafruit_GFX (no subclass overrides) 52 | void 53 | drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color), 54 | drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, 55 | uint16_t color), 56 | fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color), 57 | fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, 58 | int16_t delta, uint16_t color), 59 | drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, 60 | int16_t x2, int16_t y2, uint16_t color), 61 | fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, 62 | int16_t x2, int16_t y2, uint16_t color), 63 | drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, 64 | int16_t radius, uint16_t color), 65 | fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, 66 | int16_t radius, uint16_t color), 67 | drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], 68 | int16_t w, int16_t h, uint16_t color), 69 | drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], 70 | int16_t w, int16_t h, uint16_t color, uint16_t bg), 71 | drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, 72 | int16_t w, int16_t h, uint16_t color), 73 | drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, 74 | int16_t w, int16_t h, uint16_t color, uint16_t bg), 75 | drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], 76 | int16_t w, int16_t h, uint16_t color), 77 | drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[], 78 | int16_t w, int16_t h), 79 | drawGrayscaleBitmap(int16_t x, int16_t y, uint8_t *bitmap, 80 | int16_t w, int16_t h), 81 | drawGrayscaleBitmap(int16_t x, int16_t y, 82 | const uint8_t bitmap[], const uint8_t mask[], 83 | int16_t w, int16_t h), 84 | drawGrayscaleBitmap(int16_t x, int16_t y, 85 | uint8_t *bitmap, uint8_t *mask, int16_t w, int16_t h), 86 | drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[], 87 | int16_t w, int16_t h), 88 | drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, 89 | int16_t w, int16_t h), 90 | drawRGBBitmap(int16_t x, int16_t y, 91 | const uint16_t bitmap[], const uint8_t mask[], 92 | int16_t w, int16_t h), 93 | drawRGBBitmap(int16_t x, int16_t y, 94 | uint16_t *bitmap, uint8_t *mask, int16_t w, int16_t h), 95 | drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, 96 | uint16_t bg, uint8_t size), 97 | setCursor(int16_t x, int16_t y), 98 | setTextColor(uint16_t c), 99 | setTextColor(uint16_t c, uint16_t bg), 100 | setTextSize(uint8_t s), 101 | setTextWrap(boolean w), 102 | cp437(boolean x=true), 103 | setFont(const GFXfont *f = NULL), 104 | getTextBounds(char *string, int16_t x, int16_t y, 105 | int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h), 106 | getTextBounds(const __FlashStringHelper *s, int16_t x, int16_t y, 107 | int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h); 108 | 109 | #if ARDUINO >= 100 110 | virtual size_t write(uint8_t); 111 | #else 112 | virtual void write(uint8_t); 113 | #endif 114 | 115 | int16_t height(void) const; 116 | int16_t width(void) const; 117 | 118 | uint8_t getRotation(void) const; 119 | 120 | // get current cursor position (get rotation safe maximum values, using: width() for x, height() for y) 121 | int16_t getCursorX(void) const; 122 | int16_t getCursorY(void) const; 123 | 124 | protected: 125 | void 126 | charBounds(char c, int16_t *x, int16_t *y, 127 | int16_t *minx, int16_t *miny, int16_t *maxx, int16_t *maxy); 128 | const int16_t 129 | WIDTH, HEIGHT; // This is the 'raw' display w/h - never changes 130 | int16_t 131 | _width, _height, // Display w/h as modified by current rotation 132 | cursor_x, cursor_y; 133 | uint16_t 134 | textcolor, textbgcolor; 135 | uint8_t 136 | textsize, 137 | rotation; 138 | boolean 139 | wrap, // If set, 'wrap' text at right edge of display 140 | _cp437; // If set, use correct CP437 charset (default is off) 141 | GFXfont 142 | *gfxFont; 143 | }; 144 | 145 | class Adafruit_GFX_Button { 146 | 147 | public: 148 | Adafruit_GFX_Button(void); 149 | // "Classic" initButton() uses center & size 150 | void initButton(Adafruit_GFX *gfx, int16_t x, int16_t y, 151 | uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, 152 | uint16_t textcolor, char *label, uint8_t textsize); 153 | // New/alt initButton() uses upper-left corner & size 154 | void initButtonUL(Adafruit_GFX *gfx, int16_t x1, int16_t y1, 155 | uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, 156 | uint16_t textcolor, char *label, uint8_t textsize); 157 | void drawButton(boolean inverted = false); 158 | boolean contains(int16_t x, int16_t y); 159 | 160 | void press(boolean p); 161 | boolean isPressed(); 162 | boolean justPressed(); 163 | boolean justReleased(); 164 | 165 | private: 166 | Adafruit_GFX *_gfx; 167 | int16_t _x1, _y1; // Coordinates of top-left corner 168 | uint16_t _w, _h; 169 | uint8_t _textsize; 170 | uint16_t _outlinecolor, _fillcolor, _textcolor; 171 | char _label[10]; 172 | 173 | boolean currstate, laststate; 174 | }; 175 | 176 | class GFXcanvas1 : public Adafruit_GFX { 177 | public: 178 | GFXcanvas1(uint16_t w, uint16_t h); 179 | ~GFXcanvas1(void); 180 | void drawPixel(int16_t x, int16_t y, uint16_t color), 181 | fillScreen(uint16_t color); 182 | uint8_t *getBuffer(void); 183 | private: 184 | uint8_t *buffer; 185 | }; 186 | 187 | class GFXcanvas8 : public Adafruit_GFX { 188 | public: 189 | GFXcanvas8(uint16_t w, uint16_t h); 190 | ~GFXcanvas8(void); 191 | void drawPixel(int16_t x, int16_t y, uint16_t color), 192 | fillScreen(uint16_t color), 193 | writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 194 | 195 | uint8_t *getBuffer(void); 196 | private: 197 | uint8_t *buffer; 198 | }; 199 | 200 | class GFXcanvas16 : public Adafruit_GFX { 201 | public: 202 | GFXcanvas16(uint16_t w, uint16_t h); 203 | ~GFXcanvas16(void); 204 | void drawPixel(int16_t x, int16_t y, uint16_t color), 205 | fillScreen(uint16_t color); 206 | uint16_t *getBuffer(void); 207 | private: 208 | uint16_t *buffer; 209 | }; 210 | 211 | #endif // _ADAFRUIT_GFX_H 212 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/glcdfont.c: -------------------------------------------------------------------------------- 1 | // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. 2 | // See gfxfont.h for newer custom bitmap font info. 3 | 4 | #ifndef FONT5X7_H 5 | #define FONT5X7_H 6 | 7 | #ifdef __AVR__ 8 | #include 9 | #include 10 | #elif defined(ESP8266) 11 | #include 12 | #else 13 | #define PROGMEM 14 | #endif 15 | 16 | // Standard ASCII 5x7 font 17 | 18 | static const unsigned char font[] PROGMEM = { 19 | 0x00, 0x00, 0x00, 0x00, 0x00, 20 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 21 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 22 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 23 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 24 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 25 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 26 | 0x00, 0x18, 0x3C, 0x18, 0x00, 27 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 28 | 0x00, 0x18, 0x24, 0x18, 0x00, 29 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 30 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 31 | 0x26, 0x29, 0x79, 0x29, 0x26, 32 | 0x40, 0x7F, 0x05, 0x05, 0x07, 33 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 34 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 35 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 36 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 37 | 0x14, 0x22, 0x7F, 0x22, 0x14, 38 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 39 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 40 | 0x00, 0x66, 0x89, 0x95, 0x6A, 41 | 0x60, 0x60, 0x60, 0x60, 0x60, 42 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 43 | 0x08, 0x04, 0x7E, 0x04, 0x08, 44 | 0x10, 0x20, 0x7E, 0x20, 0x10, 45 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 46 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 47 | 0x1E, 0x10, 0x10, 0x10, 0x10, 48 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 49 | 0x30, 0x38, 0x3E, 0x38, 0x30, 50 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x5F, 0x00, 0x00, 53 | 0x00, 0x07, 0x00, 0x07, 0x00, 54 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 55 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 56 | 0x23, 0x13, 0x08, 0x64, 0x62, 57 | 0x36, 0x49, 0x56, 0x20, 0x50, 58 | 0x00, 0x08, 0x07, 0x03, 0x00, 59 | 0x00, 0x1C, 0x22, 0x41, 0x00, 60 | 0x00, 0x41, 0x22, 0x1C, 0x00, 61 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 62 | 0x08, 0x08, 0x3E, 0x08, 0x08, 63 | 0x00, 0x80, 0x70, 0x30, 0x00, 64 | 0x08, 0x08, 0x08, 0x08, 0x08, 65 | 0x00, 0x00, 0x60, 0x60, 0x00, 66 | 0x20, 0x10, 0x08, 0x04, 0x02, 67 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 68 | 0x00, 0x42, 0x7F, 0x40, 0x00, 69 | 0x72, 0x49, 0x49, 0x49, 0x46, 70 | 0x21, 0x41, 0x49, 0x4D, 0x33, 71 | 0x18, 0x14, 0x12, 0x7F, 0x10, 72 | 0x27, 0x45, 0x45, 0x45, 0x39, 73 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 74 | 0x41, 0x21, 0x11, 0x09, 0x07, 75 | 0x36, 0x49, 0x49, 0x49, 0x36, 76 | 0x46, 0x49, 0x49, 0x29, 0x1E, 77 | 0x00, 0x00, 0x14, 0x00, 0x00, 78 | 0x00, 0x40, 0x34, 0x00, 0x00, 79 | 0x00, 0x08, 0x14, 0x22, 0x41, 80 | 0x14, 0x14, 0x14, 0x14, 0x14, 81 | 0x00, 0x41, 0x22, 0x14, 0x08, 82 | 0x02, 0x01, 0x59, 0x09, 0x06, 83 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 84 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 85 | 0x7F, 0x49, 0x49, 0x49, 0x36, 86 | 0x3E, 0x41, 0x41, 0x41, 0x22, 87 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 88 | 0x7F, 0x49, 0x49, 0x49, 0x41, 89 | 0x7F, 0x09, 0x09, 0x09, 0x01, 90 | 0x3E, 0x41, 0x41, 0x51, 0x73, 91 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 92 | 0x00, 0x41, 0x7F, 0x41, 0x00, 93 | 0x20, 0x40, 0x41, 0x3F, 0x01, 94 | 0x7F, 0x08, 0x14, 0x22, 0x41, 95 | 0x7F, 0x40, 0x40, 0x40, 0x40, 96 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 97 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 98 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 99 | 0x7F, 0x09, 0x09, 0x09, 0x06, 100 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 101 | 0x7F, 0x09, 0x19, 0x29, 0x46, 102 | 0x26, 0x49, 0x49, 0x49, 0x32, 103 | 0x03, 0x01, 0x7F, 0x01, 0x03, 104 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 105 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 106 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 107 | 0x63, 0x14, 0x08, 0x14, 0x63, 108 | 0x03, 0x04, 0x78, 0x04, 0x03, 109 | 0x61, 0x59, 0x49, 0x4D, 0x43, 110 | 0x00, 0x7F, 0x41, 0x41, 0x41, 111 | 0x02, 0x04, 0x08, 0x10, 0x20, 112 | 0x00, 0x41, 0x41, 0x41, 0x7F, 113 | 0x04, 0x02, 0x01, 0x02, 0x04, 114 | 0x40, 0x40, 0x40, 0x40, 0x40, 115 | 0x00, 0x03, 0x07, 0x08, 0x00, 116 | 0x20, 0x54, 0x54, 0x78, 0x40, 117 | 0x7F, 0x28, 0x44, 0x44, 0x38, 118 | 0x38, 0x44, 0x44, 0x44, 0x28, 119 | 0x38, 0x44, 0x44, 0x28, 0x7F, 120 | 0x38, 0x54, 0x54, 0x54, 0x18, 121 | 0x00, 0x08, 0x7E, 0x09, 0x02, 122 | 0x18, 0xA4, 0xA4, 0x9C, 0x78, 123 | 0x7F, 0x08, 0x04, 0x04, 0x78, 124 | 0x00, 0x44, 0x7D, 0x40, 0x00, 125 | 0x20, 0x40, 0x40, 0x3D, 0x00, 126 | 0x7F, 0x10, 0x28, 0x44, 0x00, 127 | 0x00, 0x41, 0x7F, 0x40, 0x00, 128 | 0x7C, 0x04, 0x78, 0x04, 0x78, 129 | 0x7C, 0x08, 0x04, 0x04, 0x78, 130 | 0x38, 0x44, 0x44, 0x44, 0x38, 131 | 0xFC, 0x18, 0x24, 0x24, 0x18, 132 | 0x18, 0x24, 0x24, 0x18, 0xFC, 133 | 0x7C, 0x08, 0x04, 0x04, 0x08, 134 | 0x48, 0x54, 0x54, 0x54, 0x24, 135 | 0x04, 0x04, 0x3F, 0x44, 0x24, 136 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 137 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 138 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 139 | 0x44, 0x28, 0x10, 0x28, 0x44, 140 | 0x4C, 0x90, 0x90, 0x90, 0x7C, 141 | 0x44, 0x64, 0x54, 0x4C, 0x44, 142 | 0x00, 0x08, 0x36, 0x41, 0x00, 143 | 0x00, 0x00, 0x77, 0x00, 0x00, 144 | 0x00, 0x41, 0x36, 0x08, 0x00, 145 | 0x02, 0x01, 0x02, 0x04, 0x02, 146 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 147 | 0x1E, 0xA1, 0xA1, 0x61, 0x12, 148 | 0x3A, 0x40, 0x40, 0x20, 0x7A, 149 | 0x38, 0x54, 0x54, 0x55, 0x59, 150 | 0x21, 0x55, 0x55, 0x79, 0x41, 151 | 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut 152 | 0x21, 0x55, 0x54, 0x78, 0x40, 153 | 0x20, 0x54, 0x55, 0x79, 0x40, 154 | 0x0C, 0x1E, 0x52, 0x72, 0x12, 155 | 0x39, 0x55, 0x55, 0x55, 0x59, 156 | 0x39, 0x54, 0x54, 0x54, 0x59, 157 | 0x39, 0x55, 0x54, 0x54, 0x58, 158 | 0x00, 0x00, 0x45, 0x7C, 0x41, 159 | 0x00, 0x02, 0x45, 0x7D, 0x42, 160 | 0x00, 0x01, 0x45, 0x7C, 0x40, 161 | 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut 162 | 0xF0, 0x28, 0x25, 0x28, 0xF0, 163 | 0x7C, 0x54, 0x55, 0x45, 0x00, 164 | 0x20, 0x54, 0x54, 0x7C, 0x54, 165 | 0x7C, 0x0A, 0x09, 0x7F, 0x49, 166 | 0x32, 0x49, 0x49, 0x49, 0x32, 167 | 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut 168 | 0x32, 0x4A, 0x48, 0x48, 0x30, 169 | 0x3A, 0x41, 0x41, 0x21, 0x7A, 170 | 0x3A, 0x42, 0x40, 0x20, 0x78, 171 | 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 172 | 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut 173 | 0x3D, 0x40, 0x40, 0x40, 0x3D, 174 | 0x3C, 0x24, 0xFF, 0x24, 0x24, 175 | 0x48, 0x7E, 0x49, 0x43, 0x66, 176 | 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 177 | 0xFF, 0x09, 0x29, 0xF6, 0x20, 178 | 0xC0, 0x88, 0x7E, 0x09, 0x03, 179 | 0x20, 0x54, 0x54, 0x79, 0x41, 180 | 0x00, 0x00, 0x44, 0x7D, 0x41, 181 | 0x30, 0x48, 0x48, 0x4A, 0x32, 182 | 0x38, 0x40, 0x40, 0x22, 0x7A, 183 | 0x00, 0x7A, 0x0A, 0x0A, 0x72, 184 | 0x7D, 0x0D, 0x19, 0x31, 0x7D, 185 | 0x26, 0x29, 0x29, 0x2F, 0x28, 186 | 0x26, 0x29, 0x29, 0x29, 0x26, 187 | 0x30, 0x48, 0x4D, 0x40, 0x20, 188 | 0x38, 0x08, 0x08, 0x08, 0x08, 189 | 0x08, 0x08, 0x08, 0x08, 0x38, 190 | 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 191 | 0x2F, 0x10, 0x28, 0x34, 0xFA, 192 | 0x00, 0x00, 0x7B, 0x00, 0x00, 193 | 0x08, 0x14, 0x2A, 0x14, 0x22, 194 | 0x22, 0x14, 0x2A, 0x14, 0x08, 195 | 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code 196 | 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block 197 | 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block 198 | 0x00, 0x00, 0x00, 0xFF, 0x00, 199 | 0x10, 0x10, 0x10, 0xFF, 0x00, 200 | 0x14, 0x14, 0x14, 0xFF, 0x00, 201 | 0x10, 0x10, 0xFF, 0x00, 0xFF, 202 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 203 | 0x14, 0x14, 0x14, 0xFC, 0x00, 204 | 0x14, 0x14, 0xF7, 0x00, 0xFF, 205 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 206 | 0x14, 0x14, 0xF4, 0x04, 0xFC, 207 | 0x14, 0x14, 0x17, 0x10, 0x1F, 208 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 209 | 0x14, 0x14, 0x14, 0x1F, 0x00, 210 | 0x10, 0x10, 0x10, 0xF0, 0x00, 211 | 0x00, 0x00, 0x00, 0x1F, 0x10, 212 | 0x10, 0x10, 0x10, 0x1F, 0x10, 213 | 0x10, 0x10, 0x10, 0xF0, 0x10, 214 | 0x00, 0x00, 0x00, 0xFF, 0x10, 215 | 0x10, 0x10, 0x10, 0x10, 0x10, 216 | 0x10, 0x10, 0x10, 0xFF, 0x10, 217 | 0x00, 0x00, 0x00, 0xFF, 0x14, 218 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 219 | 0x00, 0x00, 0x1F, 0x10, 0x17, 220 | 0x00, 0x00, 0xFC, 0x04, 0xF4, 221 | 0x14, 0x14, 0x17, 0x10, 0x17, 222 | 0x14, 0x14, 0xF4, 0x04, 0xF4, 223 | 0x00, 0x00, 0xFF, 0x00, 0xF7, 224 | 0x14, 0x14, 0x14, 0x14, 0x14, 225 | 0x14, 0x14, 0xF7, 0x00, 0xF7, 226 | 0x14, 0x14, 0x14, 0x17, 0x14, 227 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 228 | 0x14, 0x14, 0x14, 0xF4, 0x14, 229 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 230 | 0x00, 0x00, 0x1F, 0x10, 0x1F, 231 | 0x00, 0x00, 0x00, 0x1F, 0x14, 232 | 0x00, 0x00, 0x00, 0xFC, 0x14, 233 | 0x00, 0x00, 0xF0, 0x10, 0xF0, 234 | 0x10, 0x10, 0xFF, 0x10, 0xFF, 235 | 0x14, 0x14, 0x14, 0xFF, 0x14, 236 | 0x10, 0x10, 0x10, 0x1F, 0x00, 237 | 0x00, 0x00, 0x00, 0xF0, 0x10, 238 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 239 | 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 240 | 0xFF, 0xFF, 0xFF, 0x00, 0x00, 241 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 242 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 243 | 0x38, 0x44, 0x44, 0x38, 0x44, 244 | 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta 245 | 0x7E, 0x02, 0x02, 0x06, 0x06, 246 | 0x02, 0x7E, 0x02, 0x7E, 0x02, 247 | 0x63, 0x55, 0x49, 0x41, 0x63, 248 | 0x38, 0x44, 0x44, 0x3C, 0x04, 249 | 0x40, 0x7E, 0x20, 0x1E, 0x20, 250 | 0x06, 0x02, 0x7E, 0x02, 0x02, 251 | 0x99, 0xA5, 0xE7, 0xA5, 0x99, 252 | 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 253 | 0x4C, 0x72, 0x01, 0x72, 0x4C, 254 | 0x30, 0x4A, 0x4D, 0x4D, 0x30, 255 | 0x30, 0x48, 0x78, 0x48, 0x30, 256 | 0xBC, 0x62, 0x5A, 0x46, 0x3D, 257 | 0x3E, 0x49, 0x49, 0x49, 0x00, 258 | 0x7E, 0x01, 0x01, 0x01, 0x7E, 259 | 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 260 | 0x44, 0x44, 0x5F, 0x44, 0x44, 261 | 0x40, 0x51, 0x4A, 0x44, 0x40, 262 | 0x40, 0x44, 0x4A, 0x51, 0x40, 263 | 0x00, 0x00, 0xFF, 0x01, 0x03, 264 | 0xE0, 0x80, 0xFF, 0x00, 0x00, 265 | 0x08, 0x08, 0x6B, 0x6B, 0x08, 266 | 0x36, 0x12, 0x36, 0x24, 0x36, 267 | 0x06, 0x0F, 0x09, 0x0F, 0x06, 268 | 0x00, 0x00, 0x18, 0x18, 0x00, 269 | 0x00, 0x00, 0x10, 0x10, 0x00, 270 | 0x30, 0x40, 0xFF, 0x01, 0x01, 271 | 0x00, 0x1F, 0x01, 0x01, 0x1E, 272 | 0x00, 0x19, 0x1D, 0x17, 0x12, 273 | 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 274 | 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP 275 | }; 276 | #endif // FONT5X7_H 277 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Adafruit_SPITFT.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | This is our library for generic SPI TFT Displays with 3 | address windows and 16 bit color (e.g. ILI9341, HX8357D, ST7735...) 4 | 5 | Check out the links above for our tutorials and wiring diagrams 6 | These displays use SPI to communicate, 4 or 5 pins are required to 7 | interface (RST is optional) 8 | Adafruit invests time and resources providing this open source code, 9 | please support Adafruit and open-source hardware by purchasing 10 | products from Adafruit! 11 | 12 | Written by Limor Fried/Ladyada for Adafruit Industries. 13 | MIT license, all text above must be included in any redistribution 14 | ****************************************************/ 15 | 16 | #ifndef __AVR_ATtiny85__ // NOT A CHANCE of this stuff working on ATtiny! 17 | 18 | #include "Adafruit_SPITFT.h" 19 | #ifndef ARDUINO_STM32_FEATHER 20 | #include "pins_arduino.h" 21 | #ifndef RASPI 22 | #include "wiring_private.h" 23 | #endif 24 | #endif 25 | #include 26 | 27 | #include "Adafruit_SPITFT_Macros.h" 28 | 29 | 30 | 31 | // Pass 8-bit (each) R,G,B, get back 16-bit packed color 32 | uint16_t Adafruit_SPITFT::color565(uint8_t r, uint8_t g, uint8_t b) { 33 | return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3); 34 | } 35 | 36 | Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, 37 | int8_t cs, int8_t dc, int8_t mosi, 38 | int8_t sclk, int8_t rst, int8_t miso) 39 | : Adafruit_GFX(w, h) { 40 | _cs = cs; 41 | _dc = dc; 42 | _rst = rst; 43 | _sclk = sclk; 44 | _mosi = mosi; 45 | _miso = miso; 46 | _freq = 0; 47 | #ifdef USE_FAST_PINIO 48 | csport = portOutputRegister(digitalPinToPort(_cs)); 49 | cspinmask = digitalPinToBitMask(_cs); 50 | dcport = portOutputRegister(digitalPinToPort(_dc)); 51 | dcpinmask = digitalPinToBitMask(_dc); 52 | clkport = portOutputRegister(digitalPinToPort(_sclk)); 53 | clkpinmask = digitalPinToBitMask(_sclk); 54 | mosiport = portOutputRegister(digitalPinToPort(_mosi)); 55 | mosipinmask = digitalPinToBitMask(_mosi); 56 | if(miso >= 0){ 57 | misoport = portInputRegister(digitalPinToPort(_miso)); 58 | misopinmask = digitalPinToBitMask(_miso); 59 | } else { 60 | misoport = 0; 61 | misopinmask = 0; 62 | } 63 | #endif 64 | } 65 | 66 | Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, 67 | int8_t cs, int8_t dc, int8_t rst) 68 | : Adafruit_GFX(w, h) { 69 | _cs = cs; 70 | _dc = dc; 71 | _rst = rst; 72 | _sclk = -1; 73 | _mosi = -1; 74 | _miso = -1; 75 | _freq = 0; 76 | #ifdef USE_FAST_PINIO 77 | csport = portOutputRegister(digitalPinToPort(_cs)); 78 | cspinmask = digitalPinToBitMask(_cs); 79 | dcport = portOutputRegister(digitalPinToPort(_dc)); 80 | dcpinmask = digitalPinToBitMask(_dc); 81 | clkport = 0; 82 | clkpinmask = 0; 83 | mosiport = 0; 84 | mosipinmask = 0; 85 | misoport = 0; 86 | misopinmask = 0; 87 | #endif 88 | } 89 | 90 | 91 | void Adafruit_SPITFT::initSPI(uint32_t freq) 92 | { 93 | _freq = freq; 94 | 95 | // Control Pins 96 | pinMode(_dc, OUTPUT); 97 | digitalWrite(_dc, LOW); 98 | pinMode(_cs, OUTPUT); 99 | digitalWrite(_cs, HIGH); 100 | 101 | // Software SPI 102 | if(_sclk >= 0){ 103 | pinMode(_mosi, OUTPUT); 104 | digitalWrite(_mosi, LOW); 105 | pinMode(_sclk, OUTPUT); 106 | digitalWrite(_sclk, HIGH); 107 | if(_miso >= 0){ 108 | pinMode(_miso, INPUT); 109 | } 110 | } 111 | 112 | // Hardware SPI 113 | SPI_BEGIN(); 114 | 115 | // toggle RST low to reset 116 | if (_rst >= 0) { 117 | pinMode(_rst, OUTPUT); 118 | digitalWrite(_rst, HIGH); 119 | delay(100); 120 | digitalWrite(_rst, LOW); 121 | delay(100); 122 | digitalWrite(_rst, HIGH); 123 | delay(200); 124 | } 125 | } 126 | 127 | uint8_t Adafruit_SPITFT::spiRead() { 128 | if(_sclk < 0){ 129 | return HSPI_READ(); 130 | } 131 | if(_miso < 0){ 132 | return 0; 133 | } 134 | uint8_t r = 0; 135 | for (uint8_t i=0; i<8; i++) { 136 | SSPI_SCK_LOW(); 137 | SSPI_SCK_HIGH(); 138 | r <<= 1; 139 | if (SSPI_MISO_READ()){ 140 | r |= 0x1; 141 | } 142 | } 143 | return r; 144 | } 145 | 146 | void Adafruit_SPITFT::spiWrite(uint8_t b) { 147 | if(_sclk < 0){ 148 | HSPI_WRITE(b); 149 | return; 150 | } 151 | for(uint8_t bit = 0x80; bit; bit >>= 1){ 152 | if((b) & bit){ 153 | SSPI_MOSI_HIGH(); 154 | } else { 155 | SSPI_MOSI_LOW(); 156 | } 157 | SSPI_SCK_LOW(); 158 | SSPI_SCK_HIGH(); 159 | } 160 | } 161 | 162 | 163 | /* 164 | * Transaction API 165 | * */ 166 | 167 | void Adafruit_SPITFT::startWrite(void){ 168 | SPI_BEGIN_TRANSACTION(); 169 | SPI_CS_LOW(); 170 | } 171 | 172 | void Adafruit_SPITFT::endWrite(void){ 173 | SPI_CS_HIGH(); 174 | SPI_END_TRANSACTION(); 175 | } 176 | 177 | void Adafruit_SPITFT::writeCommand(uint8_t cmd){ 178 | SPI_DC_LOW(); 179 | spiWrite(cmd); 180 | SPI_DC_HIGH(); 181 | } 182 | 183 | void Adafruit_SPITFT::pushColor(uint16_t color) { 184 | startWrite(); 185 | SPI_WRITE16(color); 186 | endWrite(); 187 | } 188 | 189 | 190 | void Adafruit_SPITFT::writePixel(uint16_t color){ 191 | SPI_WRITE16(color); 192 | } 193 | 194 | void Adafruit_SPITFT::writePixels(uint16_t * colors, uint32_t len){ 195 | SPI_WRITE_PIXELS((uint8_t*)colors , len * 2); 196 | } 197 | 198 | void Adafruit_SPITFT::writeColor(uint16_t color, uint32_t len){ 199 | #ifdef SPI_HAS_WRITE_PIXELS 200 | if(_sclk >= 0){ 201 | for (uint32_t t=0; t SPI_MAX_PIXELS_AT_ONCE)?SPI_MAX_PIXELS_AT_ONCE:len; 208 | uint16_t tlen = 0; 209 | 210 | for (uint32_t t=0; tblen)?blen:len; 216 | writePixels(temp, tlen); 217 | len -= tlen; 218 | } 219 | #else 220 | uint8_t hi = color >> 8, lo = color; 221 | if(_sclk < 0){ //AVR Optimization 222 | for (uint32_t t=len; t; t--){ 223 | HSPI_WRITE(hi); 224 | HSPI_WRITE(lo); 225 | } 226 | return; 227 | } 228 | for (uint32_t t=len; t; t--){ 229 | spiWrite(hi); 230 | spiWrite(lo); 231 | } 232 | #endif 233 | } 234 | 235 | void Adafruit_SPITFT::writePixel(int16_t x, int16_t y, uint16_t color) { 236 | if((x < 0) ||(x >= _width) || (y < 0) || (y >= _height)) return; 237 | setAddrWindow(x,y,1,1); 238 | writePixel(color); 239 | } 240 | 241 | void Adafruit_SPITFT::writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color){ 242 | if((x >= _width) || (y >= _height)) return; 243 | int16_t x2 = x + w - 1, y2 = y + h - 1; 244 | if((x2 < 0) || (y2 < 0)) return; 245 | 246 | // Clip left/top 247 | if(x < 0) { 248 | x = 0; 249 | w = x2 + 1; 250 | } 251 | if(y < 0) { 252 | y = 0; 253 | h = y2 + 1; 254 | } 255 | 256 | // Clip right/bottom 257 | if(x2 >= _width) w = _width - x; 258 | if(y2 >= _height) h = _height - y; 259 | 260 | int32_t len = (int32_t)w * h; 261 | setAddrWindow(x, y, w, h); 262 | writeColor(color, len); 263 | } 264 | 265 | void Adafruit_SPITFT::writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color){ 266 | writeFillRect(x, y, 1, h, color); 267 | } 268 | 269 | void Adafruit_SPITFT::writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color){ 270 | writeFillRect(x, y, w, 1, color); 271 | } 272 | 273 | void Adafruit_SPITFT::drawPixel(int16_t x, int16_t y, uint16_t color){ 274 | startWrite(); 275 | writePixel(x, y, color); 276 | endWrite(); 277 | } 278 | 279 | void Adafruit_SPITFT::drawFastVLine(int16_t x, int16_t y, 280 | int16_t h, uint16_t color) { 281 | startWrite(); 282 | writeFastVLine(x, y, h, color); 283 | endWrite(); 284 | } 285 | 286 | void Adafruit_SPITFT::drawFastHLine(int16_t x, int16_t y, 287 | int16_t w, uint16_t color) { 288 | startWrite(); 289 | writeFastHLine(x, y, w, color); 290 | endWrite(); 291 | } 292 | 293 | void Adafruit_SPITFT::fillRect(int16_t x, int16_t y, int16_t w, int16_t h, 294 | uint16_t color) { 295 | startWrite(); 296 | writeFillRect(x,y,w,h,color); 297 | endWrite(); 298 | } 299 | 300 | // Adapted from https://github.com/PaulStoffregen/ILI9341_t3 301 | // by Marc MERLIN. See examples/pictureEmbed to use this. 302 | // 5/6/2017: function name and arguments have changed for compatibility 303 | // with current GFX library and to avoid naming problems in prior 304 | // implementation. Formerly drawBitmap() with arguments in different order. 305 | void Adafruit_SPITFT::drawRGBBitmap(int16_t x, int16_t y, 306 | uint16_t *pcolors, int16_t w, int16_t h) { 307 | 308 | int16_t x2, y2; // Lower-right coord 309 | if(( x >= _width ) || // Off-edge right 310 | ( y >= _height) || // " top 311 | ((x2 = (x+w-1)) < 0 ) || // " left 312 | ((y2 = (y+h-1)) < 0) ) return; // " bottom 313 | 314 | int16_t bx1=0, by1=0, // Clipped top-left within bitmap 315 | saveW=w; // Save original bitmap width value 316 | if(x < 0) { // Clip left 317 | w += x; 318 | bx1 = -x; 319 | x = 0; 320 | } 321 | if(y < 0) { // Clip top 322 | h += y; 323 | by1 = -y; 324 | y = 0; 325 | } 326 | if(x2 >= _width ) w = _width - x; // Clip right 327 | if(y2 >= _height) h = _height - y; // Clip bottom 328 | 329 | pcolors += by1 * saveW + bx1; // Offset bitmap ptr to clipped top-left 330 | startWrite(); 331 | setAddrWindow(x, y, w, h); // Clipped area 332 | while(h--) { // For each (clipped) scanline... 333 | writePixels(pcolors, w); // Push one (clipped) row 334 | pcolors += saveW; // Advance pointer by one full (unclipped) line 335 | } 336 | endWrite(); 337 | } 338 | 339 | #endif // !__AVR_ATtiny85__ 340 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/fontconvert/fontconvert.c: -------------------------------------------------------------------------------- 1 | /* 2 | TrueType to Adafruit_GFX font converter. Derived from Peter Jakobs' 3 | Adafruit_ftGFX fork & makefont tool, and Paul Kourany's Adafruit_mfGFX. 4 | 5 | NOT AN ARDUINO SKETCH. This is a command-line tool for preprocessing 6 | fonts to be used with the Adafruit_GFX Arduino library. 7 | 8 | For UNIX-like systems. Outputs to stdout; redirect to header file, e.g.: 9 | ./fontconvert ~/Library/Fonts/FreeSans.ttf 18 > FreeSans18pt7b.h 10 | 11 | REQUIRES FREETYPE LIBRARY. www.freetype.org 12 | 13 | Currently this only extracts the printable 7-bit ASCII chars of a font. 14 | Will eventually extend with some int'l chars a la ftGFX, not there yet. 15 | Keep 7-bit fonts around as an option in that case, more compact. 16 | 17 | See notes at end for glyph nomenclature & other tidbits. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include FT_GLYPH_H 25 | #include "../gfxfont.h" // Adafruit_GFX font structures 26 | 27 | #define DPI 141 // Approximate res. of Adafruit 2.8" TFT 28 | 29 | // Accumulate bits for output, with periodic hexadecimal byte write 30 | void enbit(uint8_t value) { 31 | static uint8_t row = 0, sum = 0, bit = 0x80, firstCall = 1; 32 | if(value) sum |= bit; // Set bit if needed 33 | if(!(bit >>= 1)) { // Advance to next bit, end of byte reached? 34 | if(!firstCall) { // Format output table nicely 35 | if(++row >= 12) { // Last entry on line? 36 | printf(",\n "); // Newline format output 37 | row = 0; // Reset row counter 38 | } else { // Not end of line 39 | printf(", "); // Simple comma delim 40 | } 41 | } 42 | printf("0x%02X", sum); // Write byte value 43 | sum = 0; // Clear for next byte 44 | bit = 0x80; // Reset bit counter 45 | firstCall = 0; // Formatting flag 46 | } 47 | } 48 | 49 | int main(int argc, char *argv[]) { 50 | int i, j, err, size, first=' ', last='~', 51 | bitmapOffset = 0, x, y, byte; 52 | char *fontName, c, *ptr; 53 | FT_Library library; 54 | FT_Face face; 55 | FT_Glyph glyph; 56 | FT_Bitmap *bitmap; 57 | FT_BitmapGlyphRec *g; 58 | GFXglyph *table; 59 | uint8_t bit; 60 | 61 | // Parse command line. Valid syntaxes are: 62 | // fontconvert [filename] [size] 63 | // fontconvert [filename] [size] [last char] 64 | // fontconvert [filename] [size] [first char] [last char] 65 | // Unless overridden, default first and last chars are 66 | // ' ' (space) and '~', respectively 67 | 68 | if(argc < 3) { 69 | fprintf(stderr, "Usage: %s fontfile size [first] [last]\n", 70 | argv[0]); 71 | return 1; 72 | } 73 | 74 | size = atoi(argv[2]); 75 | 76 | if(argc == 4) { 77 | last = atoi(argv[3]); 78 | } else if(argc == 5) { 79 | first = atoi(argv[3]); 80 | last = atoi(argv[4]); 81 | } 82 | 83 | if(last < first) { 84 | i = first; 85 | first = last; 86 | last = i; 87 | } 88 | 89 | ptr = strrchr(argv[1], '/'); // Find last slash in filename 90 | if(ptr) ptr++; // First character of filename (path stripped) 91 | else ptr = argv[1]; // No path; font in local dir. 92 | 93 | // Allocate space for font name and glyph table 94 | if((!(fontName = malloc(strlen(ptr) + 20))) || 95 | (!(table = (GFXglyph *)malloc((last - first + 1) * 96 | sizeof(GFXglyph))))) { 97 | fprintf(stderr, "Malloc error\n"); 98 | return 1; 99 | } 100 | 101 | // Derive font table names from filename. Period (filename 102 | // extension) is truncated and replaced with the font size & bits. 103 | strcpy(fontName, ptr); 104 | ptr = strrchr(fontName, '.'); // Find last period (file ext) 105 | if(!ptr) ptr = &fontName[strlen(fontName)]; // If none, append 106 | // Insert font size and 7/8 bit. fontName was alloc'd w/extra 107 | // space to allow this, we're not sprintfing into Forbidden Zone. 108 | sprintf(ptr, "%dpt%db", size, (last > 127) ? 8 : 7); 109 | // Space and punctuation chars in name replaced w/ underscores. 110 | for(i=0; (c=fontName[i]); i++) { 111 | if(isspace(c) || ispunct(c)) fontName[i] = '_'; 112 | } 113 | 114 | // Init FreeType lib, load font 115 | if((err = FT_Init_FreeType(&library))) { 116 | fprintf(stderr, "FreeType init error: %d", err); 117 | return err; 118 | } 119 | if((err = FT_New_Face(library, argv[1], 0, &face))) { 120 | fprintf(stderr, "Font load error: %d", err); 121 | FT_Done_FreeType(library); 122 | return err; 123 | } 124 | 125 | // << 6 because '26dot6' fixed-point format 126 | FT_Set_Char_Size(face, size << 6, 0, DPI, 0); 127 | 128 | // Currently all symbols from 'first' to 'last' are processed. 129 | // Fonts may contain WAY more glyphs than that, but this code 130 | // will need to handle encoding stuff to deal with extracting 131 | // the right symbols, and that's not done yet. 132 | // fprintf(stderr, "%ld glyphs\n", face->num_glyphs); 133 | 134 | printf("const uint8_t %sBitmaps[] PROGMEM = {\n ", fontName); 135 | 136 | // Process glyphs and output huge bitmap data array 137 | for(i=first, j=0; i<=last; i++, j++) { 138 | // MONO renderer provides clean image with perfect crop 139 | // (no wasted pixels) via bitmap struct. 140 | if((err = FT_Load_Char(face, i, FT_LOAD_TARGET_MONO))) { 141 | fprintf(stderr, "Error %d loading char '%c'\n", 142 | err, i); 143 | continue; 144 | } 145 | 146 | if((err = FT_Render_Glyph(face->glyph, 147 | FT_RENDER_MODE_MONO))) { 148 | fprintf(stderr, "Error %d rendering char '%c'\n", 149 | err, i); 150 | continue; 151 | } 152 | 153 | if((err = FT_Get_Glyph(face->glyph, &glyph))) { 154 | fprintf(stderr, "Error %d getting glyph '%c'\n", 155 | err, i); 156 | continue; 157 | } 158 | 159 | bitmap = &face->glyph->bitmap; 160 | g = (FT_BitmapGlyphRec *)glyph; 161 | 162 | // Minimal font and per-glyph information is stored to 163 | // reduce flash space requirements. Glyph bitmaps are 164 | // fully bit-packed; no per-scanline pad, though end of 165 | // each character may be padded to next byte boundary 166 | // when needed. 16-bit offset means 64K max for bitmaps, 167 | // code currently doesn't check for overflow. (Doesn't 168 | // check that size & offsets are within bounds either for 169 | // that matter...please convert fonts responsibly.) 170 | table[j].bitmapOffset = bitmapOffset; 171 | table[j].width = bitmap->width; 172 | table[j].height = bitmap->rows; 173 | table[j].xAdvance = face->glyph->advance.x >> 6; 174 | table[j].xOffset = g->left; 175 | table[j].yOffset = 1 - g->top; 176 | 177 | for(y=0; y < bitmap->rows; y++) { 178 | for(x=0;x < bitmap->width; x++) { 179 | byte = x / 8; 180 | bit = 0x80 >> (x & 7); 181 | enbit(bitmap->buffer[ 182 | y * bitmap->pitch + byte] & bit); 183 | } 184 | } 185 | 186 | // Pad end of char bitmap to next byte boundary if needed 187 | int n = (bitmap->width * bitmap->rows) & 7; 188 | if(n) { // Pixel count not an even multiple of 8? 189 | n = 8 - n; // # bits to next multiple 190 | while(n--) enbit(0); 191 | } 192 | bitmapOffset += (bitmap->width * bitmap->rows + 7) / 8; 193 | 194 | FT_Done_Glyph(glyph); 195 | } 196 | 197 | printf(" };\n\n"); // End bitmap array 198 | 199 | // Output glyph attributes table (one per character) 200 | printf("const GFXglyph %sGlyphs[] PROGMEM = {\n", fontName); 201 | for(i=first, j=0; i<=last; i++, j++) { 202 | printf(" { %5d, %3d, %3d, %3d, %4d, %4d }", 203 | table[j].bitmapOffset, 204 | table[j].width, 205 | table[j].height, 206 | table[j].xAdvance, 207 | table[j].xOffset, 208 | table[j].yOffset); 209 | if(i < last) { 210 | printf(", // 0x%02X", i); 211 | if((i >= ' ') && (i <= '~')) { 212 | printf(" '%c'", i); 213 | } 214 | putchar('\n'); 215 | } 216 | } 217 | printf(" }; // 0x%02X", last); 218 | if((last >= ' ') && (last <= '~')) printf(" '%c'", last); 219 | printf("\n\n"); 220 | 221 | // Output font structure 222 | printf("const GFXfont %s PROGMEM = {\n", fontName); 223 | printf(" (uint8_t *)%sBitmaps,\n", fontName); 224 | printf(" (GFXglyph *)%sGlyphs,\n", fontName); 225 | if (face->size->metrics.height == 0) { 226 | // No face height info, assume fixed width and get from a glyph. 227 | printf(" 0x%02X, 0x%02X, %d };\n\n", 228 | first, last, table[0].height); 229 | } else { 230 | printf(" 0x%02X, 0x%02X, %ld };\n\n", 231 | first, last, face->size->metrics.height >> 6); 232 | } 233 | printf("// Approx. %d bytes\n", 234 | bitmapOffset + (last - first + 1) * 7 + 7); 235 | // Size estimate is based on AVR struct and pointer sizes; 236 | // actual size may vary. 237 | 238 | FT_Done_FreeType(library); 239 | 240 | return 0; 241 | } 242 | 243 | /* ------------------------------------------------------------------------- 244 | 245 | Character metrics are slightly different from classic GFX & ftGFX. 246 | In classic GFX: cursor position is the upper-left pixel of each 5x7 247 | character; lower extent of most glyphs (except those w/descenders) 248 | is +6 pixels in Y direction. 249 | W/new GFX fonts: cursor position is on baseline, where baseline is 250 | 'inclusive' (containing the bottom-most row of pixels in most symbols, 251 | except those with descenders; ftGFX is one pixel lower). 252 | 253 | Cursor Y will be moved automatically when switching between classic 254 | and new fonts. If you switch fonts, any print() calls will continue 255 | along the same baseline. 256 | 257 | ...........#####.. -- yOffset 258 | ..........######.. 259 | ..........######.. 260 | .........#######.. 261 | ........#########. 262 | * = Cursor pos. ........#########. 263 | .......##########. 264 | ......#####..####. 265 | ......#####..####. 266 | *.#.. .....#####...####. 267 | .#.#. ....############## 268 | #...# ...############### 269 | #...# ...############### 270 | ##### ..#####......##### 271 | #...# .#####.......##### 272 | ====== #...# ====== #*###.........#### ======= Baseline 273 | || xOffset 274 | 275 | glyph->xOffset and yOffset are pixel offsets, in GFX coordinate space 276 | (+Y is down), from the cursor position to the top-left pixel of the 277 | glyph bitmap. i.e. yOffset is typically negative, xOffset is typically 278 | zero but a few glyphs will have other values (even negative xOffsets 279 | sometimes, totally normal). glyph->xAdvance is the distance to move 280 | the cursor on the X axis after drawing the corresponding symbol. 281 | 282 | There's also some changes with regard to 'background' color and new GFX 283 | fonts (classic fonts unchanged). See Adafruit_GFX.cpp for explanation. 284 | */ 285 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/FreeMono9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeMono9pt7bBitmaps[] PROGMEM = { 2 | 0xAA, 0xA8, 0x0C, 0xED, 0x24, 0x92, 0x48, 0x24, 0x48, 0x91, 0x2F, 0xE4, 3 | 0x89, 0x7F, 0x28, 0x51, 0x22, 0x40, 0x08, 0x3E, 0x62, 0x40, 0x30, 0x0E, 4 | 0x01, 0x81, 0xC3, 0xBE, 0x08, 0x08, 0x71, 0x12, 0x23, 0x80, 0x23, 0xB8, 5 | 0x0E, 0x22, 0x44, 0x70, 0x38, 0x81, 0x02, 0x06, 0x1A, 0x65, 0x46, 0xC8, 6 | 0xEC, 0xE9, 0x24, 0x5A, 0xAA, 0xA9, 0x40, 0xA9, 0x55, 0x5A, 0x80, 0x10, 7 | 0x22, 0x4B, 0xE3, 0x05, 0x11, 0x00, 0x10, 0x20, 0x47, 0xF1, 0x02, 0x04, 8 | 0x00, 0x6B, 0x48, 0xFF, 0x00, 0xF0, 0x02, 0x08, 0x10, 0x60, 0x81, 0x04, 9 | 0x08, 0x20, 0x41, 0x02, 0x08, 0x00, 0x38, 0x8A, 0x0C, 0x18, 0x30, 0x60, 10 | 0xC1, 0x82, 0x88, 0xE0, 0x27, 0x28, 0x42, 0x10, 0x84, 0x21, 0x3E, 0x38, 11 | 0x8A, 0x08, 0x10, 0x20, 0x82, 0x08, 0x61, 0x03, 0xF8, 0x7C, 0x06, 0x02, 12 | 0x02, 0x1C, 0x06, 0x01, 0x01, 0x01, 0x42, 0x3C, 0x18, 0xA2, 0x92, 0x8A, 13 | 0x28, 0xBF, 0x08, 0x21, 0xC0, 0x7C, 0x81, 0x03, 0xE4, 0x40, 0x40, 0x81, 14 | 0x03, 0x88, 0xE0, 0x1E, 0x41, 0x04, 0x0B, 0x98, 0xB0, 0xC1, 0xC2, 0x88, 15 | 0xE0, 0xFE, 0x04, 0x08, 0x20, 0x40, 0x82, 0x04, 0x08, 0x20, 0x40, 0x38, 16 | 0x8A, 0x0C, 0x14, 0x47, 0x11, 0x41, 0x83, 0x8C, 0xE0, 0x38, 0x8A, 0x1C, 17 | 0x18, 0x68, 0xCE, 0x81, 0x04, 0x13, 0xC0, 0xF0, 0x0F, 0x6C, 0x00, 0xD2, 18 | 0xD2, 0x00, 0x03, 0x04, 0x18, 0x60, 0x60, 0x18, 0x04, 0x03, 0xFF, 0x80, 19 | 0x00, 0x1F, 0xF0, 0x40, 0x18, 0x03, 0x00, 0x60, 0x20, 0x60, 0xC0, 0x80, 20 | 0x3D, 0x84, 0x08, 0x30, 0xC2, 0x00, 0x00, 0x00, 0x30, 0x3C, 0x46, 0x82, 21 | 0x8E, 0xB2, 0xA2, 0xA2, 0x9F, 0x80, 0x80, 0x40, 0x3C, 0x3C, 0x01, 0x40, 22 | 0x28, 0x09, 0x01, 0x10, 0x42, 0x0F, 0xC1, 0x04, 0x40, 0x9E, 0x3C, 0xFE, 23 | 0x21, 0x90, 0x48, 0x67, 0xE2, 0x09, 0x02, 0x81, 0x41, 0xFF, 0x80, 0x3E, 24 | 0xB0, 0xF0, 0x30, 0x08, 0x04, 0x02, 0x00, 0x80, 0x60, 0x8F, 0x80, 0xFE, 25 | 0x21, 0x90, 0x68, 0x14, 0x0A, 0x05, 0x02, 0x83, 0x43, 0x7F, 0x00, 0xFF, 26 | 0x20, 0x90, 0x08, 0x87, 0xC2, 0x21, 0x00, 0x81, 0x40, 0xFF, 0xC0, 0xFF, 27 | 0xA0, 0x50, 0x08, 0x87, 0xC2, 0x21, 0x00, 0x80, 0x40, 0x78, 0x00, 0x1E, 28 | 0x98, 0x6C, 0x0A, 0x00, 0x80, 0x20, 0xF8, 0x0B, 0x02, 0x60, 0x87, 0xC0, 29 | 0xE3, 0xA0, 0x90, 0x48, 0x27, 0xF2, 0x09, 0x04, 0x82, 0x41, 0x71, 0xC0, 30 | 0xF9, 0x08, 0x42, 0x10, 0x84, 0x27, 0xC0, 0x1F, 0x02, 0x02, 0x02, 0x02, 31 | 0x02, 0x82, 0x82, 0xC6, 0x78, 0xE3, 0xA1, 0x11, 0x09, 0x05, 0x83, 0x21, 32 | 0x08, 0x84, 0x41, 0x70, 0xC0, 0xE0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 33 | 0x41, 0x41, 0xFF, 0xE0, 0xEC, 0x19, 0x45, 0x28, 0xA4, 0xA4, 0x94, 0x91, 34 | 0x12, 0x02, 0x40, 0x5C, 0x1C, 0xC3, 0xB0, 0x94, 0x4A, 0x24, 0x92, 0x49, 35 | 0x14, 0x8A, 0x43, 0x70, 0x80, 0x1E, 0x31, 0x90, 0x50, 0x18, 0x0C, 0x06, 36 | 0x02, 0x82, 0x63, 0x0F, 0x00, 0xFE, 0x43, 0x41, 0x41, 0x42, 0x7C, 0x40, 37 | 0x40, 0x40, 0xF0, 0x1C, 0x31, 0x90, 0x50, 0x18, 0x0C, 0x06, 0x02, 0x82, 38 | 0x63, 0x1F, 0x04, 0x07, 0x92, 0x30, 0xFE, 0x21, 0x90, 0x48, 0x24, 0x23, 39 | 0xE1, 0x10, 0x84, 0x41, 0x70, 0xC0, 0x3A, 0xCD, 0x0A, 0x03, 0x01, 0x80, 40 | 0xC1, 0xC7, 0x78, 0xFF, 0xC4, 0x62, 0x21, 0x00, 0x80, 0x40, 0x20, 0x10, 41 | 0x08, 0x1F, 0x00, 0xE3, 0xA0, 0x90, 0x48, 0x24, 0x12, 0x09, 0x04, 0x82, 42 | 0x22, 0x0E, 0x00, 0xF1, 0xE8, 0x10, 0x82, 0x10, 0x42, 0x10, 0x22, 0x04, 43 | 0x80, 0x50, 0x0C, 0x00, 0x80, 0xF1, 0xE8, 0x09, 0x11, 0x25, 0x44, 0xA8, 44 | 0x55, 0x0C, 0xA1, 0x8C, 0x31, 0x84, 0x30, 0xE3, 0xA0, 0x88, 0x82, 0x80, 45 | 0x80, 0xC0, 0x90, 0x44, 0x41, 0x71, 0xC0, 0xE3, 0xA0, 0x88, 0x82, 0x81, 46 | 0x40, 0x40, 0x20, 0x10, 0x08, 0x1F, 0x00, 0xFD, 0x0A, 0x20, 0x81, 0x04, 47 | 0x10, 0x21, 0x83, 0xFC, 0xEA, 0xAA, 0xAA, 0xC0, 0x80, 0x81, 0x03, 0x02, 48 | 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0xD5, 0x55, 0x55, 0xC0, 49 | 0x10, 0x51, 0x22, 0x28, 0x20, 0xFF, 0xE0, 0x88, 0x80, 0x7E, 0x00, 0x80, 50 | 0x47, 0xEC, 0x14, 0x0A, 0x0C, 0xFB, 0xC0, 0x20, 0x10, 0x0B, 0xC6, 0x12, 51 | 0x05, 0x02, 0x81, 0x40, 0xB0, 0xB7, 0x80, 0x3A, 0x8E, 0x0C, 0x08, 0x10, 52 | 0x10, 0x9E, 0x03, 0x00, 0x80, 0x47, 0xA4, 0x34, 0x0A, 0x05, 0x02, 0x81, 53 | 0x21, 0x8F, 0x60, 0x3C, 0x43, 0x81, 0xFF, 0x80, 0x80, 0x61, 0x3E, 0x3D, 54 | 0x04, 0x3E, 0x41, 0x04, 0x10, 0x41, 0x0F, 0x80, 0x3D, 0xA1, 0xA0, 0x50, 55 | 0x28, 0x14, 0x09, 0x0C, 0x7A, 0x01, 0x01, 0x87, 0x80, 0xC0, 0x20, 0x10, 56 | 0x0B, 0xC6, 0x32, 0x09, 0x04, 0x82, 0x41, 0x20, 0xB8, 0xE0, 0x10, 0x01, 57 | 0xC0, 0x81, 0x02, 0x04, 0x08, 0x11, 0xFC, 0x10, 0x3E, 0x10, 0x84, 0x21, 58 | 0x08, 0x42, 0x3F, 0x00, 0xC0, 0x40, 0x40, 0x4F, 0x44, 0x58, 0x70, 0x48, 59 | 0x44, 0x42, 0xC7, 0x70, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10, 0x23, 60 | 0xF8, 0xB7, 0x64, 0x62, 0x31, 0x18, 0x8C, 0x46, 0x23, 0x91, 0x5E, 0x31, 61 | 0x90, 0x48, 0x24, 0x12, 0x09, 0x05, 0xC7, 0x3E, 0x31, 0xA0, 0x30, 0x18, 62 | 0x0C, 0x05, 0x8C, 0x7C, 0xDE, 0x30, 0x90, 0x28, 0x14, 0x0A, 0x05, 0x84, 63 | 0xBC, 0x40, 0x20, 0x38, 0x00, 0x3D, 0xA1, 0xA0, 0x50, 0x28, 0x14, 0x09, 64 | 0x0C, 0x7A, 0x01, 0x00, 0x80, 0xE0, 0xCE, 0xA1, 0x82, 0x04, 0x08, 0x10, 65 | 0x7C, 0x3A, 0x8D, 0x0B, 0x80, 0xF0, 0x70, 0xDE, 0x40, 0x40, 0xFC, 0x40, 66 | 0x40, 0x40, 0x40, 0x40, 0x41, 0x3E, 0xC3, 0x41, 0x41, 0x41, 0x41, 0x41, 67 | 0x43, 0x3D, 0xE3, 0xA0, 0x90, 0x84, 0x42, 0x20, 0xA0, 0x50, 0x10, 0xE3, 68 | 0xC0, 0x92, 0x4B, 0x25, 0x92, 0xA9, 0x98, 0x44, 0xE3, 0x31, 0x05, 0x01, 69 | 0x01, 0x41, 0x11, 0x05, 0xC7, 0xE3, 0xA0, 0x90, 0x84, 0x42, 0x40, 0xA0, 70 | 0x60, 0x10, 0x10, 0x08, 0x3E, 0x00, 0xFD, 0x08, 0x20, 0x82, 0x08, 0x10, 71 | 0xBF, 0x29, 0x24, 0xA2, 0x49, 0x26, 0xFF, 0xF8, 0x89, 0x24, 0x8A, 0x49, 72 | 0x2C, 0x61, 0x24, 0x30 }; 73 | 74 | const GFXglyph FreeMono9pt7bGlyphs[] PROGMEM = { 75 | { 0, 0, 0, 11, 0, 1 }, // 0x20 ' ' 76 | { 0, 2, 11, 11, 4, -10 }, // 0x21 '!' 77 | { 3, 6, 5, 11, 2, -10 }, // 0x22 '"' 78 | { 7, 7, 12, 11, 2, -10 }, // 0x23 '#' 79 | { 18, 8, 12, 11, 1, -10 }, // 0x24 '$' 80 | { 30, 7, 11, 11, 2, -10 }, // 0x25 '%' 81 | { 40, 7, 10, 11, 2, -9 }, // 0x26 '&' 82 | { 49, 3, 5, 11, 4, -10 }, // 0x27 ''' 83 | { 51, 2, 13, 11, 5, -10 }, // 0x28 '(' 84 | { 55, 2, 13, 11, 4, -10 }, // 0x29 ')' 85 | { 59, 7, 7, 11, 2, -10 }, // 0x2A '*' 86 | { 66, 7, 7, 11, 2, -8 }, // 0x2B '+' 87 | { 73, 3, 5, 11, 2, -1 }, // 0x2C ',' 88 | { 75, 9, 1, 11, 1, -5 }, // 0x2D '-' 89 | { 77, 2, 2, 11, 4, -1 }, // 0x2E '.' 90 | { 78, 7, 13, 11, 2, -11 }, // 0x2F '/' 91 | { 90, 7, 11, 11, 2, -10 }, // 0x30 '0' 92 | { 100, 5, 11, 11, 3, -10 }, // 0x31 '1' 93 | { 107, 7, 11, 11, 2, -10 }, // 0x32 '2' 94 | { 117, 8, 11, 11, 1, -10 }, // 0x33 '3' 95 | { 128, 6, 11, 11, 3, -10 }, // 0x34 '4' 96 | { 137, 7, 11, 11, 2, -10 }, // 0x35 '5' 97 | { 147, 7, 11, 11, 2, -10 }, // 0x36 '6' 98 | { 157, 7, 11, 11, 2, -10 }, // 0x37 '7' 99 | { 167, 7, 11, 11, 2, -10 }, // 0x38 '8' 100 | { 177, 7, 11, 11, 2, -10 }, // 0x39 '9' 101 | { 187, 2, 8, 11, 4, -7 }, // 0x3A ':' 102 | { 189, 3, 11, 11, 3, -7 }, // 0x3B ';' 103 | { 194, 8, 8, 11, 1, -8 }, // 0x3C '<' 104 | { 202, 9, 4, 11, 1, -6 }, // 0x3D '=' 105 | { 207, 9, 8, 11, 1, -8 }, // 0x3E '>' 106 | { 216, 7, 10, 11, 2, -9 }, // 0x3F '?' 107 | { 225, 8, 12, 11, 2, -10 }, // 0x40 '@' 108 | { 237, 11, 10, 11, 0, -9 }, // 0x41 'A' 109 | { 251, 9, 10, 11, 1, -9 }, // 0x42 'B' 110 | { 263, 9, 10, 11, 1, -9 }, // 0x43 'C' 111 | { 275, 9, 10, 11, 1, -9 }, // 0x44 'D' 112 | { 287, 9, 10, 11, 1, -9 }, // 0x45 'E' 113 | { 299, 9, 10, 11, 1, -9 }, // 0x46 'F' 114 | { 311, 10, 10, 11, 1, -9 }, // 0x47 'G' 115 | { 324, 9, 10, 11, 1, -9 }, // 0x48 'H' 116 | { 336, 5, 10, 11, 3, -9 }, // 0x49 'I' 117 | { 343, 8, 10, 11, 2, -9 }, // 0x4A 'J' 118 | { 353, 9, 10, 11, 1, -9 }, // 0x4B 'K' 119 | { 365, 8, 10, 11, 2, -9 }, // 0x4C 'L' 120 | { 375, 11, 10, 11, 0, -9 }, // 0x4D 'M' 121 | { 389, 9, 10, 11, 1, -9 }, // 0x4E 'N' 122 | { 401, 9, 10, 11, 1, -9 }, // 0x4F 'O' 123 | { 413, 8, 10, 11, 1, -9 }, // 0x50 'P' 124 | { 423, 9, 13, 11, 1, -9 }, // 0x51 'Q' 125 | { 438, 9, 10, 11, 1, -9 }, // 0x52 'R' 126 | { 450, 7, 10, 11, 2, -9 }, // 0x53 'S' 127 | { 459, 9, 10, 11, 1, -9 }, // 0x54 'T' 128 | { 471, 9, 10, 11, 1, -9 }, // 0x55 'U' 129 | { 483, 11, 10, 11, 0, -9 }, // 0x56 'V' 130 | { 497, 11, 10, 11, 0, -9 }, // 0x57 'W' 131 | { 511, 9, 10, 11, 1, -9 }, // 0x58 'X' 132 | { 523, 9, 10, 11, 1, -9 }, // 0x59 'Y' 133 | { 535, 7, 10, 11, 2, -9 }, // 0x5A 'Z' 134 | { 544, 2, 13, 11, 5, -10 }, // 0x5B '[' 135 | { 548, 7, 13, 11, 2, -11 }, // 0x5C '\' 136 | { 560, 2, 13, 11, 4, -10 }, // 0x5D ']' 137 | { 564, 7, 5, 11, 2, -10 }, // 0x5E '^' 138 | { 569, 11, 1, 11, 0, 2 }, // 0x5F '_' 139 | { 571, 3, 3, 11, 3, -11 }, // 0x60 '`' 140 | { 573, 9, 8, 11, 1, -7 }, // 0x61 'a' 141 | { 582, 9, 11, 11, 1, -10 }, // 0x62 'b' 142 | { 595, 7, 8, 11, 2, -7 }, // 0x63 'c' 143 | { 602, 9, 11, 11, 1, -10 }, // 0x64 'd' 144 | { 615, 8, 8, 11, 1, -7 }, // 0x65 'e' 145 | { 623, 6, 11, 11, 3, -10 }, // 0x66 'f' 146 | { 632, 9, 11, 11, 1, -7 }, // 0x67 'g' 147 | { 645, 9, 11, 11, 1, -10 }, // 0x68 'h' 148 | { 658, 7, 10, 11, 2, -9 }, // 0x69 'i' 149 | { 667, 5, 13, 11, 3, -9 }, // 0x6A 'j' 150 | { 676, 8, 11, 11, 2, -10 }, // 0x6B 'k' 151 | { 687, 7, 11, 11, 2, -10 }, // 0x6C 'l' 152 | { 697, 9, 8, 11, 1, -7 }, // 0x6D 'm' 153 | { 706, 9, 8, 11, 1, -7 }, // 0x6E 'n' 154 | { 715, 9, 8, 11, 1, -7 }, // 0x6F 'o' 155 | { 724, 9, 11, 11, 1, -7 }, // 0x70 'p' 156 | { 737, 9, 11, 11, 1, -7 }, // 0x71 'q' 157 | { 750, 7, 8, 11, 3, -7 }, // 0x72 'r' 158 | { 757, 7, 8, 11, 2, -7 }, // 0x73 's' 159 | { 764, 8, 10, 11, 2, -9 }, // 0x74 't' 160 | { 774, 8, 8, 11, 1, -7 }, // 0x75 'u' 161 | { 782, 9, 8, 11, 1, -7 }, // 0x76 'v' 162 | { 791, 9, 8, 11, 1, -7 }, // 0x77 'w' 163 | { 800, 9, 8, 11, 1, -7 }, // 0x78 'x' 164 | { 809, 9, 11, 11, 1, -7 }, // 0x79 'y' 165 | { 822, 7, 8, 11, 2, -7 }, // 0x7A 'z' 166 | { 829, 3, 13, 11, 4, -10 }, // 0x7B '{' 167 | { 834, 1, 13, 11, 5, -10 }, // 0x7C '|' 168 | { 836, 3, 13, 11, 4, -10 }, // 0x7D '}' 169 | { 841, 7, 3, 11, 2, -6 } }; // 0x7E '~' 170 | 171 | const GFXfont FreeMono9pt7b PROGMEM = { 172 | (uint8_t *)FreeMono9pt7bBitmaps, 173 | (GFXglyph *)FreeMono9pt7bGlyphs, 174 | 0x20, 0x7E, 18 }; 175 | 176 | // Approx. 1516 bytes 177 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit_SSD1306/examples/ssd1306_128x64_spi/ssd1306_128x64_spi.ino: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | This is an example for our Monochrome OLEDs based on SSD1306 drivers 3 | 4 | Pick one up today in the adafruit shop! 5 | ------> http://www.adafruit.com/category/63_98 6 | 7 | This example is for a 128x64 size display using SPI to communicate 8 | 4 or 5 pins are required to interface 9 | 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | BSD license, check license.txt for more information 16 | All text above, and the splash screen must be included in any redistribution 17 | *********************************************************************/ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | // If using software SPI (the default case): 25 | #define OLED_MOSI 9 26 | #define OLED_CLK 10 27 | #define OLED_DC 11 28 | #define OLED_CS 12 29 | #define OLED_RESET 13 30 | Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS); 31 | 32 | /* Uncomment this block to use hardware SPI 33 | #define OLED_DC 6 34 | #define OLED_CS 7 35 | #define OLED_RESET 8 36 | Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS); 37 | */ 38 | 39 | #define NUMFLAKES 10 40 | #define XPOS 0 41 | #define YPOS 1 42 | #define DELTAY 2 43 | 44 | #define LOGO16_GLCD_HEIGHT 16 45 | #define LOGO16_GLCD_WIDTH 16 46 | static const unsigned char PROGMEM logo16_glcd_bmp[] = 47 | { B00000000, B11000000, 48 | B00000001, B11000000, 49 | B00000001, B11000000, 50 | B00000011, B11100000, 51 | B11110011, B11100000, 52 | B11111110, B11111000, 53 | B01111110, B11111111, 54 | B00110011, B10011111, 55 | B00011111, B11111100, 56 | B00001101, B01110000, 57 | B00011011, B10100000, 58 | B00111111, B11100000, 59 | B00111111, B11110000, 60 | B01111100, B11110000, 61 | B01110000, B01110000, 62 | B00000000, B00110000 }; 63 | 64 | #if (SSD1306_LCDHEIGHT != 64) 65 | #error("Height incorrect, please fix Adafruit_SSD1306.h!"); 66 | #endif 67 | 68 | void setup() { 69 | Serial.begin(9600); 70 | 71 | // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) 72 | display.begin(SSD1306_SWITCHCAPVCC); 73 | // init done 74 | 75 | // Show image buffer on the display hardware. 76 | // Since the buffer is intialized with an Adafruit splashscreen 77 | // internally, this will display the splashscreen. 78 | display.display(); 79 | delay(2000); 80 | 81 | // Clear the buffer. 82 | display.clearDisplay(); 83 | 84 | // draw a single pixel 85 | display.drawPixel(10, 10, WHITE); 86 | // Show the display buffer on the hardware. 87 | // NOTE: You _must_ call display after making any drawing commands 88 | // to make them visible on the display hardware! 89 | display.display(); 90 | delay(2000); 91 | display.clearDisplay(); 92 | 93 | // draw many lines 94 | testdrawline(); 95 | display.display(); 96 | delay(2000); 97 | display.clearDisplay(); 98 | 99 | // draw rectangles 100 | testdrawrect(); 101 | display.display(); 102 | delay(2000); 103 | display.clearDisplay(); 104 | 105 | // draw multiple rectangles 106 | testfillrect(); 107 | display.display(); 108 | delay(2000); 109 | display.clearDisplay(); 110 | 111 | // draw mulitple circles 112 | testdrawcircle(); 113 | display.display(); 114 | delay(2000); 115 | display.clearDisplay(); 116 | 117 | // draw a white circle, 10 pixel radius 118 | display.fillCircle(display.width()/2, display.height()/2, 10, WHITE); 119 | display.display(); 120 | delay(2000); 121 | display.clearDisplay(); 122 | 123 | testdrawroundrect(); 124 | delay(2000); 125 | display.clearDisplay(); 126 | 127 | testfillroundrect(); 128 | delay(2000); 129 | display.clearDisplay(); 130 | 131 | testdrawtriangle(); 132 | delay(2000); 133 | display.clearDisplay(); 134 | 135 | testfilltriangle(); 136 | delay(2000); 137 | display.clearDisplay(); 138 | 139 | // draw the first ~12 characters in the font 140 | testdrawchar(); 141 | display.display(); 142 | delay(2000); 143 | display.clearDisplay(); 144 | 145 | // draw scrolling text 146 | testscrolltext(); 147 | delay(2000); 148 | display.clearDisplay(); 149 | 150 | // text display tests 151 | display.setTextSize(1); 152 | display.setTextColor(WHITE); 153 | display.setCursor(0,0); 154 | display.println("Hello, world!"); 155 | display.setTextColor(BLACK, WHITE); // 'inverted' text 156 | display.println(3.141592); 157 | display.setTextSize(2); 158 | display.setTextColor(WHITE); 159 | display.print("0x"); display.println(0xDEADBEEF, HEX); 160 | display.display(); 161 | delay(2000); 162 | display.clearDisplay(); 163 | 164 | // miniature bitmap display 165 | display.drawBitmap(30, 16, logo16_glcd_bmp, 16, 16, 1); 166 | display.display(); 167 | 168 | // invert the display 169 | display.invertDisplay(true); 170 | delay(1000); 171 | display.invertDisplay(false); 172 | delay(1000); 173 | display.clearDisplay(); 174 | 175 | // draw a bitmap icon and 'animate' movement 176 | testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH); 177 | } 178 | 179 | 180 | void loop() { 181 | 182 | } 183 | 184 | 185 | void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) { 186 | uint8_t icons[NUMFLAKES][3]; 187 | 188 | // initialize 189 | for (uint8_t f=0; f< NUMFLAKES; f++) { 190 | icons[f][XPOS] = random(display.width()); 191 | icons[f][YPOS] = 0; 192 | icons[f][DELTAY] = random(5) + 1; 193 | 194 | Serial.print("x: "); 195 | Serial.print(icons[f][XPOS], DEC); 196 | Serial.print(" y: "); 197 | Serial.print(icons[f][YPOS], DEC); 198 | Serial.print(" dy: "); 199 | Serial.println(icons[f][DELTAY], DEC); 200 | } 201 | 202 | while (1) { 203 | // draw each icon 204 | for (uint8_t f=0; f< NUMFLAKES; f++) { 205 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE); 206 | } 207 | display.display(); 208 | delay(200); 209 | 210 | // then erase it + move it 211 | for (uint8_t f=0; f< NUMFLAKES; f++) { 212 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, BLACK); 213 | // move it 214 | icons[f][YPOS] += icons[f][DELTAY]; 215 | // if its gone, reinit 216 | if (icons[f][YPOS] > display.height()) { 217 | icons[f][XPOS] = random(display.width()); 218 | icons[f][YPOS] = 0; 219 | icons[f][DELTAY] = random(5) + 1; 220 | } 221 | } 222 | } 223 | } 224 | 225 | 226 | void testdrawchar(void) { 227 | display.setTextSize(1); 228 | display.setTextColor(WHITE); 229 | display.setCursor(0,0); 230 | 231 | for (uint8_t i=0; i < 168; i++) { 232 | if (i == '\n') continue; 233 | display.write(i); 234 | if ((i > 0) && (i % 21 == 0)) 235 | display.println(); 236 | } 237 | display.display(); 238 | } 239 | 240 | void testdrawcircle(void) { 241 | for (int16_t i=0; i0; i-=5) { 269 | display.fillTriangle(display.width()/2, display.height()/2-i, 270 | display.width()/2-i, display.height()/2+i, 271 | display.width()/2+i, display.height()/2+i, WHITE); 272 | if (color == WHITE) color = BLACK; 273 | else color = WHITE; 274 | display.display(); 275 | } 276 | } 277 | 278 | void testdrawroundrect(void) { 279 | for (int16_t i=0; i=0; i-=4) { 319 | display.drawLine(0, display.height()-1, display.width()-1, i, WHITE); 320 | display.display(); 321 | } 322 | delay(250); 323 | 324 | display.clearDisplay(); 325 | for (int16_t i=display.width()-1; i>=0; i-=4) { 326 | display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE); 327 | display.display(); 328 | } 329 | for (int16_t i=display.height()-1; i>=0; i-=4) { 330 | display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE); 331 | display.display(); 332 | } 333 | delay(250); 334 | 335 | display.clearDisplay(); 336 | for (int16_t i=0; i http://www.adafruit.com/category/63_98 6 | 7 | This example is for a 128x32 size display using SPI to communicate 8 | 4 or 5 pins are required to interface 9 | 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | BSD license, check license.txt for more information 16 | All text above, and the splash screen must be included in any redistribution 17 | *********************************************************************/ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | // If using software SPI (the default case): 25 | #define OLED_MOSI 9 26 | #define OLED_CLK 10 27 | #define OLED_DC 11 28 | #define OLED_CS 12 29 | #define OLED_RESET 13 30 | Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS); 31 | 32 | /* Uncomment this block to use hardware SPI 33 | #define OLED_DC 6 34 | #define OLED_CS 7 35 | #define OLED_RESET 8 36 | Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS); 37 | */ 38 | 39 | #define NUMFLAKES 10 40 | #define XPOS 0 41 | #define YPOS 1 42 | #define DELTAY 2 43 | 44 | #define LOGO16_GLCD_HEIGHT 16 45 | #define LOGO16_GLCD_WIDTH 16 46 | static const unsigned char PROGMEM logo16_glcd_bmp[] = 47 | { B00000000, B11000000, 48 | B00000001, B11000000, 49 | B00000001, B11000000, 50 | B00000011, B11100000, 51 | B11110011, B11100000, 52 | B11111110, B11111000, 53 | B01111110, B11111111, 54 | B00110011, B10011111, 55 | B00011111, B11111100, 56 | B00001101, B01110000, 57 | B00011011, B10100000, 58 | B00111111, B11100000, 59 | B00111111, B11110000, 60 | B01111100, B11110000, 61 | B01110000, B01110000, 62 | B00000000, B00110000 }; 63 | 64 | #if (SSD1306_LCDHEIGHT != 32) 65 | #error("Height incorrect, please fix Adafruit_SSD1306.h!"); 66 | #endif 67 | 68 | void setup() { 69 | Serial.begin(9600); 70 | 71 | // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) 72 | display.begin(SSD1306_SWITCHCAPVCC); 73 | // init done 74 | 75 | // Show image buffer on the display hardware. 76 | // Since the buffer is intialized with an Adafruit splashscreen 77 | // internally, this will display the splashscreen. 78 | display.display(); 79 | delay(2000); 80 | 81 | // Clear the buffer. 82 | display.clearDisplay(); 83 | 84 | // draw a single pixel 85 | display.drawPixel(10, 10, WHITE); 86 | // Show the display buffer on the hardware. 87 | // NOTE: You _must_ call display after making any drawing commands 88 | // to make them visible on the display hardware! 89 | display.display(); 90 | delay(2000); 91 | display.clearDisplay(); 92 | 93 | // draw many lines 94 | testdrawline(); 95 | display.display(); 96 | delay(2000); 97 | display.clearDisplay(); 98 | 99 | // draw rectangles 100 | testdrawrect(); 101 | display.display(); 102 | delay(2000); 103 | display.clearDisplay(); 104 | 105 | // draw multiple rectangles 106 | testfillrect(); 107 | display.display(); 108 | delay(2000); 109 | display.clearDisplay(); 110 | 111 | // draw mulitple circles 112 | testdrawcircle(); 113 | display.display(); 114 | delay(2000); 115 | display.clearDisplay(); 116 | 117 | // draw a white circle, 10 pixel radius 118 | display.fillCircle(display.width()/2, display.height()/2, 10, WHITE); 119 | display.display(); 120 | delay(2000); 121 | display.clearDisplay(); 122 | 123 | testdrawroundrect(); 124 | delay(2000); 125 | display.clearDisplay(); 126 | 127 | testfillroundrect(); 128 | delay(2000); 129 | display.clearDisplay(); 130 | 131 | testdrawtriangle(); 132 | delay(2000); 133 | display.clearDisplay(); 134 | 135 | testfilltriangle(); 136 | delay(2000); 137 | display.clearDisplay(); 138 | 139 | // draw the first ~12 characters in the font 140 | testdrawchar(); 141 | display.display(); 142 | delay(2000); 143 | display.clearDisplay(); 144 | 145 | // draw scrolling text 146 | testscrolltext(); 147 | delay(2000); 148 | display.clearDisplay(); 149 | 150 | // text display tests 151 | display.setTextSize(1); 152 | display.setTextColor(WHITE); 153 | display.setCursor(0,0); 154 | display.println("Hello, world!"); 155 | display.setTextColor(BLACK, WHITE); // 'inverted' text 156 | display.println(3.141592); 157 | display.setTextSize(2); 158 | display.setTextColor(WHITE); 159 | display.print("0x"); display.println(0xDEADBEEF, HEX); 160 | display.display(); 161 | delay(2000); 162 | display.clearDisplay(); 163 | 164 | // miniature bitmap display 165 | display.drawBitmap(30, 16, logo16_glcd_bmp, 16, 16, 1); 166 | display.display(); 167 | 168 | // invert the display 169 | display.invertDisplay(true); 170 | delay(1000); 171 | display.invertDisplay(false); 172 | delay(1000); 173 | display.clearDisplay(); 174 | 175 | // draw a bitmap icon and 'animate' movement 176 | testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH); 177 | } 178 | 179 | 180 | void loop() { 181 | 182 | } 183 | 184 | 185 | void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) { 186 | uint8_t icons[NUMFLAKES][3]; 187 | 188 | // initialize 189 | for (uint8_t f=0; f< NUMFLAKES; f++) { 190 | icons[f][XPOS] = random(display.width()); 191 | icons[f][YPOS] = 0; 192 | icons[f][DELTAY] = random(5) + 1; 193 | 194 | Serial.print("x: "); 195 | Serial.print(icons[f][XPOS], DEC); 196 | Serial.print(" y: "); 197 | Serial.print(icons[f][YPOS], DEC); 198 | Serial.print(" dy: "); 199 | Serial.println(icons[f][DELTAY], DEC); 200 | } 201 | 202 | while (1) { 203 | // draw each icon 204 | for (uint8_t f=0; f< NUMFLAKES; f++) { 205 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE); 206 | } 207 | display.display(); 208 | delay(200); 209 | 210 | // then erase it + move it 211 | for (uint8_t f=0; f< NUMFLAKES; f++) { 212 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, BLACK); 213 | // move it 214 | icons[f][YPOS] += icons[f][DELTAY]; 215 | // if its gone, reinit 216 | if (icons[f][YPOS] > display.height()) { 217 | icons[f][XPOS] = random(display.width()); 218 | icons[f][YPOS] = 0; 219 | icons[f][DELTAY] = random(5) + 1; 220 | } 221 | } 222 | } 223 | } 224 | 225 | 226 | void testdrawchar(void) { 227 | display.setTextSize(1); 228 | display.setTextColor(WHITE); 229 | display.setCursor(0,0); 230 | 231 | for (uint8_t i=0; i < 168; i++) { 232 | if (i == '\n') continue; 233 | display.write(i); 234 | if ((i > 0) && (i % 21 == 0)) 235 | display.println(); 236 | } 237 | display.display(); 238 | } 239 | 240 | void testdrawcircle(void) { 241 | for (int16_t i=0; i0; i-=5) { 269 | display.fillTriangle(display.width()/2, display.height()/2-i, 270 | display.width()/2-i, display.height()/2+i, 271 | display.width()/2+i, display.height()/2+i, WHITE); 272 | if (color == WHITE) color = BLACK; 273 | else color = WHITE; 274 | display.display(); 275 | } 276 | } 277 | 278 | void testdrawroundrect(void) { 279 | for (int16_t i=0; i=0; i-=4) { 319 | display.drawLine(0, display.height()-1, display.width()-1, i, WHITE); 320 | display.display(); 321 | } 322 | delay(250); 323 | 324 | display.clearDisplay(); 325 | for (int16_t i=display.width()-1; i>=0; i-=4) { 326 | display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE); 327 | display.display(); 328 | } 329 | for (int16_t i=display.height()-1; i>=0; i-=4) { 330 | display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE); 331 | display.display(); 332 | } 333 | delay(250); 334 | 335 | display.clearDisplay(); 336 | for (int16_t i=0; i http://www.adafruit.com/category/63_98 6 | 7 | This example is for a 128x32 size display using I2C to communicate 8 | 3 pins are required to interface (2 I2C and one reset) 9 | 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | BSD license, check license.txt for more information 16 | All text above, and the splash screen must be included in any redistribution 17 | *********************************************************************/ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define OLED_RESET 4 25 | Adafruit_SSD1306 display(OLED_RESET); 26 | 27 | #define NUMFLAKES 10 28 | #define XPOS 0 29 | #define YPOS 1 30 | #define DELTAY 2 31 | 32 | 33 | #define LOGO16_GLCD_HEIGHT 16 34 | #define LOGO16_GLCD_WIDTH 16 35 | static const unsigned char PROGMEM logo16_glcd_bmp[] = 36 | { B00000000, B11000000, 37 | B00000001, B11000000, 38 | B00000001, B11000000, 39 | B00000011, B11100000, 40 | B11110011, B11100000, 41 | B11111110, B11111000, 42 | B01111110, B11111111, 43 | B00110011, B10011111, 44 | B00011111, B11111100, 45 | B00001101, B01110000, 46 | B00011011, B10100000, 47 | B00111111, B11100000, 48 | B00111111, B11110000, 49 | B01111100, B11110000, 50 | B01110000, B01110000, 51 | B00000000, B00110000 }; 52 | 53 | #if (SSD1306_LCDHEIGHT != 32) 54 | #error("Height incorrect, please fix Adafruit_SSD1306.h!"); 55 | #endif 56 | 57 | void setup() { 58 | Serial.begin(9600); 59 | 60 | // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) 61 | display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x32) 62 | // init done 63 | 64 | // Show image buffer on the display hardware. 65 | // Since the buffer is intialized with an Adafruit splashscreen 66 | // internally, this will display the splashscreen. 67 | display.display(); 68 | delay(2000); 69 | 70 | // Clear the buffer. 71 | display.clearDisplay(); 72 | 73 | // draw a single pixel 74 | display.drawPixel(10, 10, WHITE); 75 | // Show the display buffer on the hardware. 76 | // NOTE: You _must_ call display after making any drawing commands 77 | // to make them visible on the display hardware! 78 | display.display(); 79 | delay(2000); 80 | display.clearDisplay(); 81 | 82 | // draw many lines 83 | testdrawline(); 84 | display.display(); 85 | delay(2000); 86 | display.clearDisplay(); 87 | 88 | // draw rectangles 89 | testdrawrect(); 90 | display.display(); 91 | delay(2000); 92 | display.clearDisplay(); 93 | 94 | // draw multiple rectangles 95 | testfillrect(); 96 | display.display(); 97 | delay(2000); 98 | display.clearDisplay(); 99 | 100 | // draw mulitple circles 101 | testdrawcircle(); 102 | display.display(); 103 | delay(2000); 104 | display.clearDisplay(); 105 | 106 | // draw a white circle, 10 pixel radius 107 | display.fillCircle(display.width()/2, display.height()/2, 10, WHITE); 108 | display.display(); 109 | delay(2000); 110 | display.clearDisplay(); 111 | 112 | testdrawroundrect(); 113 | delay(2000); 114 | display.clearDisplay(); 115 | 116 | testfillroundrect(); 117 | delay(2000); 118 | display.clearDisplay(); 119 | 120 | testdrawtriangle(); 121 | delay(2000); 122 | display.clearDisplay(); 123 | 124 | testfilltriangle(); 125 | delay(2000); 126 | display.clearDisplay(); 127 | 128 | // draw the first ~12 characters in the font 129 | testdrawchar(); 130 | display.display(); 131 | delay(2000); 132 | display.clearDisplay(); 133 | 134 | // draw scrolling text 135 | testscrolltext(); 136 | delay(2000); 137 | display.clearDisplay(); 138 | 139 | // text display tests 140 | display.setTextSize(1); 141 | display.setTextColor(WHITE); 142 | display.setCursor(0,0); 143 | display.println("Hello, world!"); 144 | display.setTextColor(BLACK, WHITE); // 'inverted' text 145 | display.println(3.141592); 146 | display.setTextSize(2); 147 | display.setTextColor(WHITE); 148 | display.print("0x"); display.println(0xDEADBEEF, HEX); 149 | display.display(); 150 | delay(2000); 151 | display.clearDisplay(); 152 | 153 | // miniature bitmap display 154 | display.drawBitmap(30, 16, logo16_glcd_bmp, 16, 16, 1); 155 | display.display(); 156 | delay(1); 157 | 158 | // invert the display 159 | display.invertDisplay(true); 160 | delay(1000); 161 | display.invertDisplay(false); 162 | delay(1000); 163 | display.clearDisplay(); 164 | 165 | // draw a bitmap icon and 'animate' movement 166 | testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH); 167 | } 168 | 169 | 170 | void loop() { 171 | 172 | } 173 | 174 | 175 | void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) { 176 | uint8_t icons[NUMFLAKES][3]; 177 | 178 | // initialize 179 | for (uint8_t f=0; f< NUMFLAKES; f++) { 180 | icons[f][XPOS] = random(display.width()); 181 | icons[f][YPOS] = 0; 182 | icons[f][DELTAY] = random(5) + 1; 183 | 184 | Serial.print("x: "); 185 | Serial.print(icons[f][XPOS], DEC); 186 | Serial.print(" y: "); 187 | Serial.print(icons[f][YPOS], DEC); 188 | Serial.print(" dy: "); 189 | Serial.println(icons[f][DELTAY], DEC); 190 | } 191 | 192 | while (1) { 193 | // draw each icon 194 | for (uint8_t f=0; f< NUMFLAKES; f++) { 195 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE); 196 | } 197 | display.display(); 198 | delay(200); 199 | 200 | // then erase it + move it 201 | for (uint8_t f=0; f< NUMFLAKES; f++) { 202 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, BLACK); 203 | // move it 204 | icons[f][YPOS] += icons[f][DELTAY]; 205 | // if its gone, reinit 206 | if (icons[f][YPOS] > display.height()) { 207 | icons[f][XPOS] = random(display.width()); 208 | icons[f][YPOS] = 0; 209 | icons[f][DELTAY] = random(5) + 1; 210 | } 211 | } 212 | } 213 | } 214 | 215 | 216 | void testdrawchar(void) { 217 | display.setTextSize(1); 218 | display.setTextColor(WHITE); 219 | display.setCursor(0,0); 220 | 221 | for (uint8_t i=0; i < 168; i++) { 222 | if (i == '\n') continue; 223 | display.write(i); 224 | if ((i > 0) && (i % 21 == 0)) 225 | display.println(); 226 | } 227 | display.display(); 228 | delay(1); 229 | } 230 | 231 | void testdrawcircle(void) { 232 | for (int16_t i=0; i0; i-=5) { 263 | display.fillTriangle(display.width()/2, display.height()/2-i, 264 | display.width()/2-i, display.height()/2+i, 265 | display.width()/2+i, display.height()/2+i, WHITE); 266 | if (color == WHITE) color = BLACK; 267 | else color = WHITE; 268 | display.display(); 269 | delay(1); 270 | } 271 | } 272 | 273 | void testdrawroundrect(void) { 274 | for (int16_t i=0; i=0; i-=4) { 320 | display.drawLine(0, display.height()-1, display.width()-1, i, WHITE); 321 | display.display(); 322 | delay(1); 323 | } 324 | delay(250); 325 | 326 | display.clearDisplay(); 327 | for (int16_t i=display.width()-1; i>=0; i-=4) { 328 | display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE); 329 | display.display(); 330 | delay(1); 331 | } 332 | for (int16_t i=display.height()-1; i>=0; i-=4) { 333 | display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE); 334 | display.display(); 335 | delay(1); 336 | } 337 | delay(250); 338 | 339 | display.clearDisplay(); 340 | for (int16_t i=0; i http://www.adafruit.com/category/63_98 6 | 7 | This example is for a 128x64 size display using I2C to communicate 8 | 3 pins are required to interface (2 I2C and one reset) 9 | 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | BSD license, check license.txt for more information 16 | All text above, and the splash screen must be included in any redistribution 17 | *********************************************************************/ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define OLED_RESET 4 25 | Adafruit_SSD1306 display(OLED_RESET); 26 | 27 | #define NUMFLAKES 10 28 | #define XPOS 0 29 | #define YPOS 1 30 | #define DELTAY 2 31 | 32 | 33 | #define LOGO16_GLCD_HEIGHT 16 34 | #define LOGO16_GLCD_WIDTH 16 35 | static const unsigned char PROGMEM logo16_glcd_bmp[] = 36 | { B00000000, B11000000, 37 | B00000001, B11000000, 38 | B00000001, B11000000, 39 | B00000011, B11100000, 40 | B11110011, B11100000, 41 | B11111110, B11111000, 42 | B01111110, B11111111, 43 | B00110011, B10011111, 44 | B00011111, B11111100, 45 | B00001101, B01110000, 46 | B00011011, B10100000, 47 | B00111111, B11100000, 48 | B00111111, B11110000, 49 | B01111100, B11110000, 50 | B01110000, B01110000, 51 | B00000000, B00110000 }; 52 | 53 | #if (SSD1306_LCDHEIGHT != 64) 54 | #error("Height incorrect, please fix Adafruit_SSD1306.h!"); 55 | #endif 56 | 57 | void setup() { 58 | Serial.begin(9600); 59 | 60 | // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) 61 | display.begin(SSD1306_SWITCHCAPVCC, 0x3D); // initialize with the I2C addr 0x3D (for the 128x64) 62 | // init done 63 | 64 | // Show image buffer on the display hardware. 65 | // Since the buffer is intialized with an Adafruit splashscreen 66 | // internally, this will display the splashscreen. 67 | display.display(); 68 | delay(2000); 69 | 70 | // Clear the buffer. 71 | display.clearDisplay(); 72 | 73 | // draw a single pixel 74 | display.drawPixel(10, 10, WHITE); 75 | // Show the display buffer on the hardware. 76 | // NOTE: You _must_ call display after making any drawing commands 77 | // to make them visible on the display hardware! 78 | display.display(); 79 | delay(2000); 80 | display.clearDisplay(); 81 | 82 | // draw many lines 83 | testdrawline(); 84 | display.display(); 85 | delay(2000); 86 | display.clearDisplay(); 87 | 88 | // draw rectangles 89 | testdrawrect(); 90 | display.display(); 91 | delay(2000); 92 | display.clearDisplay(); 93 | 94 | // draw multiple rectangles 95 | testfillrect(); 96 | display.display(); 97 | delay(2000); 98 | display.clearDisplay(); 99 | 100 | // draw mulitple circles 101 | testdrawcircle(); 102 | display.display(); 103 | delay(2000); 104 | display.clearDisplay(); 105 | 106 | // draw a white circle, 10 pixel radius 107 | display.fillCircle(display.width()/2, display.height()/2, 10, WHITE); 108 | display.display(); 109 | delay(2000); 110 | display.clearDisplay(); 111 | 112 | testdrawroundrect(); 113 | delay(2000); 114 | display.clearDisplay(); 115 | 116 | testfillroundrect(); 117 | delay(2000); 118 | display.clearDisplay(); 119 | 120 | testdrawtriangle(); 121 | delay(2000); 122 | display.clearDisplay(); 123 | 124 | testfilltriangle(); 125 | delay(2000); 126 | display.clearDisplay(); 127 | 128 | // draw the first ~12 characters in the font 129 | testdrawchar(); 130 | display.display(); 131 | delay(2000); 132 | display.clearDisplay(); 133 | 134 | // draw scrolling text 135 | testscrolltext(); 136 | delay(2000); 137 | display.clearDisplay(); 138 | 139 | // text display tests 140 | display.setTextSize(1); 141 | display.setTextColor(WHITE); 142 | display.setCursor(0,0); 143 | display.println("Hello, world!"); 144 | display.setTextColor(BLACK, WHITE); // 'inverted' text 145 | display.println(3.141592); 146 | display.setTextSize(2); 147 | display.setTextColor(WHITE); 148 | display.print("0x"); display.println(0xDEADBEEF, HEX); 149 | display.display(); 150 | delay(2000); 151 | display.clearDisplay(); 152 | 153 | // miniature bitmap display 154 | display.drawBitmap(30, 16, logo16_glcd_bmp, 16, 16, 1); 155 | display.display(); 156 | delay(1); 157 | 158 | // invert the display 159 | display.invertDisplay(true); 160 | delay(1000); 161 | display.invertDisplay(false); 162 | delay(1000); 163 | display.clearDisplay(); 164 | 165 | // draw a bitmap icon and 'animate' movement 166 | testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH); 167 | } 168 | 169 | 170 | void loop() { 171 | 172 | } 173 | 174 | 175 | void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) { 176 | uint8_t icons[NUMFLAKES][3]; 177 | 178 | // initialize 179 | for (uint8_t f=0; f< NUMFLAKES; f++) { 180 | icons[f][XPOS] = random(display.width()); 181 | icons[f][YPOS] = 0; 182 | icons[f][DELTAY] = random(5) + 1; 183 | 184 | Serial.print("x: "); 185 | Serial.print(icons[f][XPOS], DEC); 186 | Serial.print(" y: "); 187 | Serial.print(icons[f][YPOS], DEC); 188 | Serial.print(" dy: "); 189 | Serial.println(icons[f][DELTAY], DEC); 190 | } 191 | 192 | while (1) { 193 | // draw each icon 194 | for (uint8_t f=0; f< NUMFLAKES; f++) { 195 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE); 196 | } 197 | display.display(); 198 | delay(200); 199 | 200 | // then erase it + move it 201 | for (uint8_t f=0; f< NUMFLAKES; f++) { 202 | display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, BLACK); 203 | // move it 204 | icons[f][YPOS] += icons[f][DELTAY]; 205 | // if its gone, reinit 206 | if (icons[f][YPOS] > display.height()) { 207 | icons[f][XPOS] = random(display.width()); 208 | icons[f][YPOS] = 0; 209 | icons[f][DELTAY] = random(5) + 1; 210 | } 211 | } 212 | } 213 | } 214 | 215 | 216 | void testdrawchar(void) { 217 | display.setTextSize(1); 218 | display.setTextColor(WHITE); 219 | display.setCursor(0,0); 220 | 221 | for (uint8_t i=0; i < 168; i++) { 222 | if (i == '\n') continue; 223 | display.write(i); 224 | if ((i > 0) && (i % 21 == 0)) 225 | display.println(); 226 | } 227 | display.display(); 228 | delay(1); 229 | } 230 | 231 | void testdrawcircle(void) { 232 | for (int16_t i=0; i0; i-=5) { 263 | display.fillTriangle(display.width()/2, display.height()/2-i, 264 | display.width()/2-i, display.height()/2+i, 265 | display.width()/2+i, display.height()/2+i, WHITE); 266 | if (color == WHITE) color = BLACK; 267 | else color = WHITE; 268 | display.display(); 269 | delay(1); 270 | } 271 | } 272 | 273 | void testdrawroundrect(void) { 274 | for (int16_t i=0; i=0; i-=4) { 320 | display.drawLine(0, display.height()-1, display.width()-1, i, WHITE); 321 | display.display(); 322 | delay(1); 323 | } 324 | delay(250); 325 | 326 | display.clearDisplay(); 327 | for (int16_t i=display.width()-1; i>=0; i-=4) { 328 | display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE); 329 | display.display(); 330 | delay(1); 331 | } 332 | for (int16_t i=display.height()-1; i>=0; i-=4) { 333 | display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE); 334 | display.display(); 335 | delay(1); 336 | } 337 | delay(250); 338 | 339 | display.clearDisplay(); 340 | for (int16_t i=0; i' 117 | { 257, 7, 10, 11, 4, -9 }, // 0x3F '?' 118 | { 266, 7, 12, 11, 3, -10 }, // 0x40 '@' 119 | { 277, 11, 10, 11, 0, -9 }, // 0x41 'A' 120 | { 291, 10, 10, 11, 1, -9 }, // 0x42 'B' 121 | { 304, 9, 10, 11, 2, -9 }, // 0x43 'C' 122 | { 316, 10, 10, 11, 1, -9 }, // 0x44 'D' 123 | { 329, 10, 10, 11, 1, -9 }, // 0x45 'E' 124 | { 342, 11, 10, 11, 1, -9 }, // 0x46 'F' 125 | { 356, 9, 10, 11, 2, -9 }, // 0x47 'G' 126 | { 368, 11, 10, 11, 1, -9 }, // 0x48 'H' 127 | { 382, 9, 10, 11, 2, -9 }, // 0x49 'I' 128 | { 394, 11, 10, 11, 2, -9 }, // 0x4A 'J' 129 | { 408, 11, 10, 11, 1, -9 }, // 0x4B 'K' 130 | { 422, 10, 10, 11, 1, -9 }, // 0x4C 'L' 131 | { 435, 13, 10, 11, 0, -9 }, // 0x4D 'M' 132 | { 452, 11, 10, 11, 1, -9 }, // 0x4E 'N' 133 | { 466, 9, 10, 11, 2, -9 }, // 0x4F 'O' 134 | { 478, 10, 10, 11, 1, -9 }, // 0x50 'P' 135 | { 491, 9, 13, 11, 2, -9 }, // 0x51 'Q' 136 | { 506, 10, 10, 11, 1, -9 }, // 0x52 'R' 137 | { 519, 9, 10, 11, 2, -9 }, // 0x53 'S' 138 | { 531, 9, 10, 11, 3, -9 }, // 0x54 'T' 139 | { 543, 10, 10, 11, 2, -9 }, // 0x55 'U' 140 | { 556, 11, 10, 11, 2, -9 }, // 0x56 'V' 141 | { 570, 11, 10, 11, 2, -9 }, // 0x57 'W' 142 | { 584, 11, 10, 11, 1, -9 }, // 0x58 'X' 143 | { 598, 9, 10, 11, 3, -9 }, // 0x59 'Y' 144 | { 610, 9, 10, 11, 2, -9 }, // 0x5A 'Z' 145 | { 622, 5, 13, 11, 5, -10 }, // 0x5B '[' 146 | { 631, 4, 14, 11, 4, -11 }, // 0x5C '\' 147 | { 638, 5, 13, 11, 2, -10 }, // 0x5D ']' 148 | { 647, 7, 5, 11, 3, -10 }, // 0x5E '^' 149 | { 652, 11, 1, 11, 0, 2 }, // 0x5F '_' 150 | { 654, 2, 3, 11, 5, -11 }, // 0x60 '`' 151 | { 655, 9, 8, 11, 2, -7 }, // 0x61 'a' 152 | { 664, 11, 11, 11, 0, -10 }, // 0x62 'b' 153 | { 680, 10, 8, 11, 2, -7 }, // 0x63 'c' 154 | { 690, 9, 11, 11, 2, -10 }, // 0x64 'd' 155 | { 703, 9, 8, 11, 2, -7 }, // 0x65 'e' 156 | { 712, 10, 11, 11, 2, -10 }, // 0x66 'f' 157 | { 726, 10, 11, 11, 2, -7 }, // 0x67 'g' 158 | { 740, 10, 11, 11, 1, -10 }, // 0x68 'h' 159 | { 754, 8, 11, 11, 2, -10 }, // 0x69 'i' 160 | { 765, 9, 14, 11, 1, -10 }, // 0x6A 'j' 161 | { 781, 9, 11, 11, 1, -10 }, // 0x6B 'k' 162 | { 794, 8, 11, 11, 2, -10 }, // 0x6C 'l' 163 | { 805, 11, 8, 11, 0, -7 }, // 0x6D 'm' 164 | { 816, 9, 8, 11, 1, -7 }, // 0x6E 'n' 165 | { 825, 9, 8, 11, 2, -7 }, // 0x6F 'o' 166 | { 834, 11, 11, 11, 0, -7 }, // 0x70 'p' 167 | { 850, 10, 11, 11, 2, -7 }, // 0x71 'q' 168 | { 864, 9, 8, 11, 2, -7 }, // 0x72 'r' 169 | { 873, 8, 8, 11, 2, -7 }, // 0x73 's' 170 | { 881, 7, 10, 11, 2, -9 }, // 0x74 't' 171 | { 890, 9, 8, 11, 2, -7 }, // 0x75 'u' 172 | { 899, 10, 8, 11, 2, -7 }, // 0x76 'v' 173 | { 909, 10, 8, 11, 2, -7 }, // 0x77 'w' 174 | { 919, 10, 8, 11, 1, -7 }, // 0x78 'x' 175 | { 929, 12, 11, 11, 0, -7 }, // 0x79 'y' 176 | { 946, 8, 8, 11, 2, -7 }, // 0x7A 'z' 177 | { 954, 6, 13, 11, 4, -10 }, // 0x7B '{' 178 | { 964, 3, 12, 11, 5, -9 }, // 0x7C '|' 179 | { 969, 6, 13, 11, 3, -10 }, // 0x7D '}' 180 | { 979, 7, 3, 11, 3, -6 } }; // 0x7E '~' 181 | 182 | const GFXfont FreeMonoOblique9pt7b PROGMEM = { 183 | (uint8_t *)FreeMonoOblique9pt7bBitmaps, 184 | (GFXglyph *)FreeMonoOblique9pt7bGlyphs, 185 | 0x20, 0x7E, 18 }; 186 | 187 | // Approx. 1654 bytes 188 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/FreeMonoBold9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeMonoBold9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xFF, 0xD2, 0x1F, 0x80, 0xEC, 0x89, 0x12, 0x24, 0x40, 0x36, 0x36, 3 | 0x36, 0x7F, 0x7F, 0x36, 0xFF, 0xFF, 0x3C, 0x3C, 0x3C, 0x00, 0x18, 0xFF, 4 | 0xFE, 0x3C, 0x1F, 0x1F, 0x83, 0x46, 0x8D, 0xF0, 0xC1, 0x83, 0x00, 0x61, 5 | 0x22, 0x44, 0x86, 0x67, 0x37, 0x11, 0x22, 0x4C, 0x70, 0x3C, 0x7E, 0x60, 6 | 0x60, 0x30, 0x7B, 0xDF, 0xCE, 0xFF, 0x7F, 0xC9, 0x24, 0x37, 0x66, 0xCC, 7 | 0xCC, 0xCC, 0x66, 0x31, 0xCE, 0x66, 0x33, 0x33, 0x33, 0x66, 0xC8, 0x18, 8 | 0x18, 0xFF, 0xFF, 0x3C, 0x3C, 0x66, 0x18, 0x18, 0x18, 0xFF, 0xFF, 0x18, 9 | 0x18, 0x18, 0x18, 0x6B, 0x48, 0xFF, 0xFF, 0xC0, 0xF0, 0x02, 0x0C, 0x18, 10 | 0x60, 0xC3, 0x06, 0x0C, 0x30, 0x61, 0x83, 0x0C, 0x18, 0x20, 0x00, 0x38, 11 | 0xFB, 0xBE, 0x3C, 0x78, 0xF1, 0xE3, 0xC7, 0xDD, 0xF1, 0xC0, 0x38, 0xF3, 12 | 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0xFD, 0xF8, 0x3C, 0xFE, 0xC7, 0x03, 13 | 0x03, 0x06, 0x0C, 0x18, 0x70, 0xE3, 0xFF, 0xFF, 0x7C, 0xFE, 0x03, 0x03, 14 | 0x03, 0x1E, 0x1E, 0x07, 0x03, 0x03, 0xFE, 0x7C, 0x1C, 0x38, 0xB1, 0x64, 15 | 0xD9, 0xBF, 0xFF, 0x3E, 0x7C, 0x7E, 0x3F, 0x18, 0x0F, 0xC7, 0xF3, 0x1C, 16 | 0x06, 0x03, 0xC3, 0xFF, 0x9F, 0x80, 0x0F, 0x3F, 0x30, 0x60, 0x60, 0xDC, 17 | 0xFE, 0xE3, 0xC3, 0x63, 0x7E, 0x3C, 0xFF, 0xFF, 0xC3, 0x03, 0x06, 0x06, 18 | 0x06, 0x0C, 0x0C, 0x0C, 0x18, 0x38, 0xFB, 0x1E, 0x3C, 0x6F, 0x9F, 0x63, 19 | 0xC7, 0x8F, 0xF1, 0xC0, 0x3C, 0x7E, 0xE6, 0xC3, 0xC3, 0xE7, 0x7F, 0x3B, 20 | 0x06, 0x0E, 0xFC, 0xF0, 0xF0, 0x0F, 0x6C, 0x00, 0x1A, 0xD2, 0x00, 0x01, 21 | 0x83, 0x87, 0x0E, 0x0F, 0x80, 0xE0, 0x1C, 0x03, 0xFF, 0xFF, 0xC0, 0x00, 22 | 0x0F, 0xFF, 0xFC, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0xF9, 0xE3, 0xC1, 0x80, 23 | 0x7C, 0xFE, 0xC7, 0x03, 0x0E, 0x1C, 0x00, 0x00, 0x00, 0x30, 0x30, 0x1E, 24 | 0x1F, 0x1C, 0xDC, 0x6C, 0x76, 0x7B, 0x6D, 0xB6, 0xDB, 0x6F, 0xF3, 0xFC, 25 | 0x06, 0x33, 0xF8, 0x78, 0x3C, 0x07, 0xC0, 0x38, 0x05, 0x81, 0xB0, 0x36, 26 | 0x0F, 0xE1, 0xFC, 0x71, 0xDF, 0x7F, 0xEF, 0x80, 0xFF, 0x3F, 0xE6, 0x19, 27 | 0x86, 0x7F, 0x1F, 0xE6, 0x1D, 0x83, 0x60, 0xFF, 0xFF, 0xF0, 0x1F, 0xBF, 28 | 0xD8, 0xF8, 0x3C, 0x06, 0x03, 0x01, 0x80, 0x61, 0xBF, 0xC7, 0xC0, 0xFE, 29 | 0x3F, 0xE6, 0x19, 0x83, 0x60, 0xD8, 0x36, 0x0D, 0x83, 0x61, 0xBF, 0xEF, 30 | 0xE0, 0xFF, 0xFF, 0xD8, 0x6D, 0xB7, 0xC3, 0xE1, 0xB0, 0xC3, 0x61, 0xFF, 31 | 0xFF, 0xE0, 0xFF, 0xFF, 0xD8, 0x6D, 0xB7, 0xC3, 0xE1, 0xB0, 0xC0, 0x60, 32 | 0x7C, 0x3E, 0x00, 0x1F, 0x9F, 0xE6, 0x1B, 0x06, 0xC0, 0x30, 0x0C, 0x7F, 33 | 0x1F, 0xE1, 0x9F, 0xE3, 0xF0, 0xF7, 0xFB, 0xD8, 0xCC, 0x66, 0x33, 0xF9, 34 | 0xFC, 0xC6, 0x63, 0x7B, 0xFD, 0xE0, 0xFF, 0xF3, 0x0C, 0x30, 0xC3, 0x0C, 35 | 0x33, 0xFF, 0xC0, 0x1F, 0xC7, 0xF0, 0x30, 0x0C, 0x03, 0x00, 0xCC, 0x33, 36 | 0x0C, 0xC7, 0x3F, 0x87, 0xC0, 0xF7, 0xBD, 0xE6, 0x61, 0xB0, 0x78, 0x1F, 37 | 0x06, 0xE1, 0x98, 0x63, 0x3C, 0xFF, 0x3C, 0xFC, 0x7E, 0x0C, 0x06, 0x03, 38 | 0x01, 0x80, 0xC6, 0x63, 0x31, 0xFF, 0xFF, 0xE0, 0xE0, 0xFE, 0x3D, 0xC7, 39 | 0x3D, 0xE7, 0xBC, 0xD7, 0x9B, 0xB3, 0x76, 0x60, 0xDE, 0x3F, 0xC7, 0x80, 40 | 0xE1, 0xFE, 0x3D, 0xE3, 0x3C, 0x66, 0xCC, 0xDD, 0x99, 0xB3, 0x1E, 0x63, 41 | 0xDE, 0x3B, 0xC3, 0x00, 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 42 | 0xF0, 0x1F, 0x07, 0x71, 0xC7, 0xF0, 0x7C, 0x00, 0xFE, 0x7F, 0x98, 0x6C, 43 | 0x36, 0x1B, 0xF9, 0xF8, 0xC0, 0x60, 0x7C, 0x3E, 0x00, 0x1F, 0x07, 0xF1, 44 | 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1F, 0x07, 0x71, 0xC7, 0xF0, 0x7C, 45 | 0x0C, 0x33, 0xFE, 0x7F, 0x80, 0xFC, 0x7F, 0x18, 0xCC, 0x66, 0x73, 0xF1, 46 | 0xF0, 0xCC, 0x63, 0x7D, 0xFE, 0x60, 0x3F, 0xBF, 0xF0, 0x78, 0x0F, 0x03, 47 | 0xF8, 0x3F, 0x83, 0xC3, 0xFF, 0xBF, 0x80, 0xFF, 0xFF, 0xF6, 0x7B, 0x3D, 48 | 0x98, 0xC0, 0x60, 0x30, 0x18, 0x3F, 0x1F, 0x80, 0xF1, 0xFE, 0x3D, 0x83, 49 | 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x60, 0xC7, 0xF0, 0x7C, 0x00, 50 | 0xFB, 0xFF, 0x7D, 0xC3, 0x18, 0xC3, 0x18, 0x36, 0x06, 0xC0, 0x50, 0x0E, 51 | 0x01, 0xC0, 0x10, 0x00, 0xFB, 0xFE, 0xF6, 0x0D, 0x93, 0x6E, 0xDB, 0xB7, 52 | 0xAD, 0xEE, 0x7B, 0x8E, 0xE3, 0x18, 0xF3, 0xFC, 0xF7, 0x38, 0xFC, 0x1E, 53 | 0x03, 0x01, 0xE0, 0xCC, 0x73, 0xBC, 0xFF, 0x3C, 0xF3, 0xFC, 0xF7, 0x38, 54 | 0xCC, 0x1E, 0x07, 0x80, 0xC0, 0x30, 0x0C, 0x0F, 0xC3, 0xF0, 0xFE, 0xFE, 55 | 0xC6, 0xCC, 0x18, 0x18, 0x30, 0x63, 0xC3, 0xFF, 0xFF, 0xFF, 0xCC, 0xCC, 56 | 0xCC, 0xCC, 0xCC, 0xFF, 0x01, 0x03, 0x06, 0x06, 0x0C, 0x0C, 0x18, 0x18, 57 | 0x30, 0x30, 0x60, 0x60, 0xC0, 0x80, 0xFF, 0x33, 0x33, 0x33, 0x33, 0x33, 58 | 0xFF, 0x10, 0x71, 0xE3, 0x6C, 0x70, 0x40, 0xFF, 0xFF, 0xFC, 0x88, 0x80, 59 | 0x7E, 0x3F, 0x8F, 0xCF, 0xEE, 0x36, 0x1B, 0xFE, 0xFF, 0xE0, 0x38, 0x06, 60 | 0x01, 0xBC, 0x7F, 0x9C, 0x76, 0x0D, 0x83, 0x71, 0xFF, 0xEE, 0xF0, 0x3F, 61 | 0xBF, 0xF8, 0x78, 0x3C, 0x07, 0x05, 0xFE, 0x7E, 0x03, 0x80, 0xE0, 0x18, 62 | 0xF6, 0x7F, 0xB8, 0xEC, 0x1B, 0x06, 0xE3, 0x9F, 0xF3, 0xFC, 0x3E, 0x3F, 63 | 0xB0, 0xFF, 0xFF, 0xFE, 0x01, 0xFE, 0x7E, 0x1F, 0x3F, 0x30, 0x7E, 0x7E, 64 | 0x30, 0x30, 0x30, 0x30, 0xFE, 0xFE, 0x3F, 0xBF, 0xF9, 0xD8, 0x6C, 0x37, 65 | 0x39, 0xFC, 0x76, 0x03, 0x01, 0x8F, 0xC7, 0xC0, 0xE0, 0x70, 0x18, 0x0D, 66 | 0xC7, 0xF3, 0x99, 0x8C, 0xC6, 0x63, 0x7B, 0xFD, 0xE0, 0x18, 0x18, 0x00, 67 | 0x78, 0x78, 0x18, 0x18, 0x18, 0x18, 0xFF, 0xFF, 0x18, 0x60, 0x3F, 0xFC, 68 | 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0F, 0xFF, 0x80, 0xE0, 0x70, 0x18, 0x0D, 69 | 0xE6, 0xF3, 0xE1, 0xE0, 0xF8, 0x6E, 0x73, 0xF9, 0xE0, 0x78, 0x78, 0x18, 70 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0xFF, 0xFD, 0x9F, 0xF9, 0x9B, 71 | 0x33, 0x66, 0x6C, 0xCD, 0xBD, 0xFF, 0xBF, 0xEE, 0x7F, 0x98, 0xCC, 0x66, 72 | 0x33, 0x1B, 0xDF, 0xEF, 0x3E, 0x3F, 0xB8, 0xF8, 0x3C, 0x1F, 0x1D, 0xFC, 73 | 0x7C, 0xEF, 0x1F, 0xF9, 0xC3, 0xB0, 0x36, 0x06, 0xE1, 0xDF, 0xF3, 0x78, 74 | 0x60, 0x0C, 0x03, 0xE0, 0x7C, 0x00, 0x1E, 0xEF, 0xFF, 0x87, 0x60, 0x6C, 75 | 0x0D, 0xC3, 0x9F, 0xF0, 0xF6, 0x00, 0xC0, 0x18, 0x0F, 0x81, 0xF0, 0x77, 76 | 0xBF, 0xCF, 0x06, 0x03, 0x01, 0x83, 0xF9, 0xFC, 0x3F, 0xFF, 0xC3, 0xFC, 77 | 0x3F, 0xC3, 0xFF, 0xFC, 0x60, 0x60, 0x60, 0xFE, 0xFE, 0x60, 0x60, 0x60, 78 | 0x61, 0x7F, 0x3E, 0xE7, 0x73, 0x98, 0xCC, 0x66, 0x33, 0x19, 0xFE, 0x7F, 79 | 0xFB, 0xFF, 0x7C, 0xC6, 0x18, 0xC1, 0xB0, 0x36, 0x03, 0x80, 0x70, 0xF1, 80 | 0xFE, 0x3D, 0xBB, 0x37, 0x63, 0xF8, 0x77, 0x0E, 0xE1, 0x8C, 0xF7, 0xFB, 81 | 0xCD, 0x83, 0x83, 0xC3, 0xBB, 0xDF, 0xEF, 0xF3, 0xFC, 0xF6, 0x18, 0xCC, 82 | 0x33, 0x07, 0x81, 0xE0, 0x30, 0x0C, 0x06, 0x0F, 0xC3, 0xF0, 0xFF, 0xFF, 83 | 0x30, 0xC3, 0x0C, 0x7F, 0xFF, 0x37, 0x66, 0x66, 0xCC, 0x66, 0x66, 0x73, 84 | 0xFF, 0xFF, 0xFF, 0xF0, 0xCE, 0x66, 0x66, 0x33, 0x66, 0x66, 0xEC, 0x70, 85 | 0x7C, 0xF3, 0xC0, 0xC0 }; 86 | 87 | const GFXglyph FreeMonoBold9pt7bGlyphs[] PROGMEM = { 88 | { 0, 0, 0, 11, 0, 1 }, // 0x20 ' ' 89 | { 0, 3, 11, 11, 4, -10 }, // 0x21 '!' 90 | { 5, 7, 5, 11, 2, -10 }, // 0x22 '"' 91 | { 10, 8, 12, 11, 1, -10 }, // 0x23 '#' 92 | { 22, 7, 14, 11, 2, -11 }, // 0x24 '$' 93 | { 35, 7, 11, 11, 2, -10 }, // 0x25 '%' 94 | { 45, 8, 10, 11, 1, -9 }, // 0x26 '&' 95 | { 55, 3, 5, 11, 4, -10 }, // 0x27 ''' 96 | { 57, 4, 14, 11, 5, -10 }, // 0x28 '(' 97 | { 64, 4, 14, 11, 2, -10 }, // 0x29 ')' 98 | { 71, 8, 7, 11, 2, -10 }, // 0x2A '*' 99 | { 78, 8, 9, 11, 2, -8 }, // 0x2B '+' 100 | { 87, 3, 5, 11, 3, -1 }, // 0x2C ',' 101 | { 89, 9, 2, 11, 1, -5 }, // 0x2D '-' 102 | { 92, 2, 2, 11, 4, -1 }, // 0x2E '.' 103 | { 93, 7, 15, 11, 2, -12 }, // 0x2F '/' 104 | { 107, 7, 12, 11, 2, -11 }, // 0x30 '0' 105 | { 118, 7, 11, 11, 2, -10 }, // 0x31 '1' 106 | { 128, 8, 12, 11, 1, -11 }, // 0x32 '2' 107 | { 140, 8, 12, 11, 2, -11 }, // 0x33 '3' 108 | { 152, 7, 10, 11, 2, -9 }, // 0x34 '4' 109 | { 161, 9, 11, 11, 1, -10 }, // 0x35 '5' 110 | { 174, 8, 12, 11, 2, -11 }, // 0x36 '6' 111 | { 186, 8, 11, 11, 1, -10 }, // 0x37 '7' 112 | { 197, 7, 12, 11, 2, -11 }, // 0x38 '8' 113 | { 208, 8, 12, 11, 2, -11 }, // 0x39 '9' 114 | { 220, 2, 8, 11, 4, -7 }, // 0x3A ':' 115 | { 222, 3, 11, 11, 3, -7 }, // 0x3B ';' 116 | { 227, 9, 8, 11, 1, -8 }, // 0x3C '<' 117 | { 236, 9, 6, 11, 1, -7 }, // 0x3D '=' 118 | { 243, 9, 8, 11, 1, -8 }, // 0x3E '>' 119 | { 252, 8, 11, 11, 2, -10 }, // 0x3F '?' 120 | { 263, 9, 15, 11, 1, -11 }, // 0x40 '@' 121 | { 280, 11, 11, 11, 0, -10 }, // 0x41 'A' 122 | { 296, 10, 11, 11, 1, -10 }, // 0x42 'B' 123 | { 310, 9, 11, 11, 1, -10 }, // 0x43 'C' 124 | { 323, 10, 11, 11, 0, -10 }, // 0x44 'D' 125 | { 337, 9, 11, 11, 1, -10 }, // 0x45 'E' 126 | { 350, 9, 11, 11, 1, -10 }, // 0x46 'F' 127 | { 363, 10, 11, 11, 1, -10 }, // 0x47 'G' 128 | { 377, 9, 11, 11, 1, -10 }, // 0x48 'H' 129 | { 390, 6, 11, 11, 3, -10 }, // 0x49 'I' 130 | { 399, 10, 11, 11, 1, -10 }, // 0x4A 'J' 131 | { 413, 10, 11, 11, 1, -10 }, // 0x4B 'K' 132 | { 427, 9, 11, 11, 1, -10 }, // 0x4C 'L' 133 | { 440, 11, 11, 11, 0, -10 }, // 0x4D 'M' 134 | { 456, 11, 11, 11, 0, -10 }, // 0x4E 'N' 135 | { 472, 11, 11, 11, 0, -10 }, // 0x4F 'O' 136 | { 488, 9, 11, 11, 1, -10 }, // 0x50 'P' 137 | { 501, 11, 14, 11, 0, -10 }, // 0x51 'Q' 138 | { 521, 9, 11, 11, 1, -10 }, // 0x52 'R' 139 | { 534, 9, 11, 11, 1, -10 }, // 0x53 'S' 140 | { 547, 9, 11, 11, 1, -10 }, // 0x54 'T' 141 | { 560, 11, 11, 11, 0, -10 }, // 0x55 'U' 142 | { 576, 11, 11, 11, 0, -10 }, // 0x56 'V' 143 | { 592, 10, 11, 11, 0, -10 }, // 0x57 'W' 144 | { 606, 10, 11, 11, 0, -10 }, // 0x58 'X' 145 | { 620, 10, 11, 11, 0, -10 }, // 0x59 'Y' 146 | { 634, 8, 11, 11, 2, -10 }, // 0x5A 'Z' 147 | { 645, 4, 14, 11, 5, -10 }, // 0x5B '[' 148 | { 652, 7, 15, 11, 2, -12 }, // 0x5C '\' 149 | { 666, 4, 14, 11, 2, -10 }, // 0x5D ']' 150 | { 673, 7, 6, 11, 2, -11 }, // 0x5E '^' 151 | { 679, 11, 2, 11, 0, 3 }, // 0x5F '_' 152 | { 682, 3, 3, 11, 3, -11 }, // 0x60 '`' 153 | { 684, 9, 8, 11, 1, -7 }, // 0x61 'a' 154 | { 693, 10, 11, 11, 0, -10 }, // 0x62 'b' 155 | { 707, 9, 8, 11, 1, -7 }, // 0x63 'c' 156 | { 716, 10, 11, 11, 1, -10 }, // 0x64 'd' 157 | { 730, 9, 8, 11, 1, -7 }, // 0x65 'e' 158 | { 739, 8, 11, 11, 2, -10 }, // 0x66 'f' 159 | { 750, 9, 12, 11, 1, -7 }, // 0x67 'g' 160 | { 764, 9, 11, 11, 1, -10 }, // 0x68 'h' 161 | { 777, 8, 11, 11, 2, -10 }, // 0x69 'i' 162 | { 788, 6, 15, 11, 2, -10 }, // 0x6A 'j' 163 | { 800, 9, 11, 11, 1, -10 }, // 0x6B 'k' 164 | { 813, 8, 11, 11, 2, -10 }, // 0x6C 'l' 165 | { 824, 11, 8, 11, 0, -7 }, // 0x6D 'm' 166 | { 835, 9, 8, 11, 1, -7 }, // 0x6E 'n' 167 | { 844, 9, 8, 11, 1, -7 }, // 0x6F 'o' 168 | { 853, 11, 12, 11, 0, -7 }, // 0x70 'p' 169 | { 870, 11, 12, 11, 0, -7 }, // 0x71 'q' 170 | { 887, 9, 8, 11, 1, -7 }, // 0x72 'r' 171 | { 896, 8, 8, 11, 2, -7 }, // 0x73 's' 172 | { 904, 8, 11, 11, 1, -10 }, // 0x74 't' 173 | { 915, 9, 8, 11, 1, -7 }, // 0x75 'u' 174 | { 924, 11, 8, 11, 0, -7 }, // 0x76 'v' 175 | { 935, 11, 8, 11, 0, -7 }, // 0x77 'w' 176 | { 946, 9, 8, 11, 1, -7 }, // 0x78 'x' 177 | { 955, 10, 12, 11, 0, -7 }, // 0x79 'y' 178 | { 970, 7, 8, 11, 2, -7 }, // 0x7A 'z' 179 | { 977, 4, 14, 11, 3, -10 }, // 0x7B '{' 180 | { 984, 2, 14, 11, 5, -10 }, // 0x7C '|' 181 | { 988, 4, 14, 11, 4, -10 }, // 0x7D '}' 182 | { 995, 9, 4, 11, 1, -6 } }; // 0x7E '~' 183 | 184 | const GFXfont FreeMonoBold9pt7b PROGMEM = { 185 | (uint8_t *)FreeMonoBold9pt7bBitmaps, 186 | (GFXglyph *)FreeMonoBold9pt7bGlyphs, 187 | 0x20, 0x7E, 18 }; 188 | 189 | // Approx. 1672 bytes 190 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/FreeSerif9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeSerif9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xEA, 0x03, 0xDE, 0xF7, 0x20, 0x11, 0x09, 0x04, 0x82, 0x4F, 0xF9, 3 | 0x10, 0x89, 0xFF, 0x24, 0x12, 0x09, 0x0C, 0x80, 0x10, 0x7C, 0xD6, 0xD2, 4 | 0xD0, 0xF0, 0x38, 0x1E, 0x17, 0x93, 0x93, 0xD6, 0x7C, 0x10, 0x38, 0x43, 5 | 0x3C, 0x39, 0x21, 0x8A, 0x0C, 0x50, 0x65, 0x39, 0xCB, 0x20, 0xB9, 0x05, 6 | 0x88, 0x4C, 0x44, 0x64, 0x21, 0xC0, 0x0E, 0x00, 0xC8, 0x06, 0x40, 0x32, 7 | 0x01, 0xA0, 0x07, 0x78, 0x31, 0x87, 0x88, 0x46, 0x86, 0x34, 0x30, 0xC1, 8 | 0xC7, 0x17, 0xCF, 0x00, 0xFE, 0x08, 0x88, 0x84, 0x63, 0x18, 0xC6, 0x10, 9 | 0x82, 0x08, 0x20, 0x82, 0x08, 0x21, 0x0C, 0x63, 0x18, 0xC4, 0x22, 0x22, 10 | 0x00, 0x63, 0x9A, 0xDC, 0x72, 0xB6, 0x08, 0x08, 0x04, 0x02, 0x01, 0x0F, 11 | 0xF8, 0x40, 0x20, 0x10, 0x08, 0x00, 0xD8, 0xF0, 0xF0, 0x08, 0x84, 0x22, 12 | 0x10, 0x8C, 0x42, 0x31, 0x00, 0x1C, 0x31, 0x98, 0xD8, 0x3C, 0x1E, 0x0F, 13 | 0x07, 0x83, 0xC1, 0xE0, 0xD8, 0xC4, 0x61, 0xC0, 0x13, 0x8C, 0x63, 0x18, 14 | 0xC6, 0x31, 0x8C, 0x67, 0x80, 0x3C, 0x4E, 0x86, 0x06, 0x06, 0x04, 0x0C, 15 | 0x08, 0x10, 0x20, 0x41, 0xFE, 0x3C, 0xC6, 0x06, 0x04, 0x1C, 0x3E, 0x07, 16 | 0x03, 0x03, 0x03, 0x06, 0xF8, 0x04, 0x18, 0x71, 0x64, 0xC9, 0xA3, 0x46, 17 | 0xFE, 0x18, 0x30, 0x60, 0x0F, 0x10, 0x20, 0x3C, 0x0E, 0x07, 0x03, 0x03, 18 | 0x03, 0x02, 0x04, 0xF8, 0x07, 0x1C, 0x30, 0x60, 0x60, 0xDC, 0xE6, 0xC3, 19 | 0xC3, 0xC3, 0x43, 0x66, 0x3C, 0x7F, 0x82, 0x02, 0x02, 0x04, 0x04, 0x04, 20 | 0x08, 0x08, 0x08, 0x10, 0x10, 0x3C, 0x8F, 0x1E, 0x3E, 0x4F, 0x06, 0x36, 21 | 0xC7, 0x8F, 0x1B, 0x33, 0xC0, 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0xC3, 22 | 0x63, 0x3F, 0x06, 0x06, 0x0C, 0x38, 0x60, 0xF0, 0x0F, 0xD8, 0x00, 0x03, 23 | 0x28, 0x01, 0x87, 0x0E, 0x1C, 0x0C, 0x03, 0x80, 0x70, 0x0E, 0x00, 0x80, 24 | 0xFF, 0x80, 0x00, 0x00, 0x0F, 0xF8, 0x80, 0x1C, 0x01, 0xC0, 0x1C, 0x01, 25 | 0xC0, 0xE0, 0xE0, 0xE0, 0xC0, 0x00, 0x79, 0x1A, 0x18, 0x30, 0x60, 0x83, 26 | 0x04, 0x10, 0x20, 0x40, 0x03, 0x00, 0x0F, 0x83, 0x8C, 0x60, 0x26, 0x02, 27 | 0xC7, 0x9C, 0xC9, 0xD8, 0x9D, 0x99, 0xD9, 0x26, 0xEC, 0x60, 0x03, 0x04, 28 | 0x0F, 0x80, 0x02, 0x00, 0x10, 0x01, 0xC0, 0x16, 0x00, 0x98, 0x04, 0xC0, 29 | 0x43, 0x03, 0xF8, 0x20, 0x61, 0x03, 0x18, 0x1D, 0xE1, 0xF0, 0xFF, 0x86, 30 | 0x1C, 0xC1, 0x98, 0x33, 0x0C, 0x7E, 0x0C, 0x31, 0x83, 0x30, 0x66, 0x0C, 31 | 0xC3, 0x7F, 0xC0, 0x1F, 0x26, 0x1D, 0x81, 0xE0, 0x1C, 0x01, 0x80, 0x30, 32 | 0x06, 0x00, 0xC0, 0x0C, 0x00, 0xC1, 0x8F, 0xC0, 0xFF, 0x03, 0x1C, 0x30, 33 | 0x63, 0x07, 0x30, 0x33, 0x03, 0x30, 0x33, 0x03, 0x30, 0x33, 0x06, 0x30, 34 | 0xCF, 0xF0, 0xFF, 0x98, 0x26, 0x01, 0x80, 0x61, 0x1F, 0xC6, 0x11, 0x80, 35 | 0x60, 0x18, 0x16, 0x0F, 0xFE, 0xFF, 0xB0, 0x58, 0x0C, 0x06, 0x13, 0xF9, 36 | 0x84, 0xC0, 0x60, 0x30, 0x18, 0x1E, 0x00, 0x1F, 0x23, 0x0E, 0x60, 0x26, 37 | 0x00, 0xC0, 0x0C, 0x0F, 0xC0, 0x6C, 0x06, 0xC0, 0x66, 0x06, 0x30, 0x60, 38 | 0xF8, 0xF1, 0xEC, 0x19, 0x83, 0x30, 0x66, 0x0C, 0xFF, 0x98, 0x33, 0x06, 39 | 0x60, 0xCC, 0x19, 0x83, 0x78, 0xF0, 0xF6, 0x66, 0x66, 0x66, 0x66, 0x6F, 40 | 0x3C, 0x61, 0x86, 0x18, 0x61, 0x86, 0x18, 0x6D, 0xBC, 0xF3, 0xE6, 0x08, 41 | 0x61, 0x06, 0x20, 0x64, 0x07, 0x80, 0x6C, 0x06, 0x60, 0x63, 0x06, 0x18, 42 | 0x60, 0xCF, 0x3F, 0xF0, 0x18, 0x06, 0x01, 0x80, 0x60, 0x18, 0x06, 0x01, 43 | 0x80, 0x60, 0x18, 0x16, 0x0B, 0xFE, 0xF0, 0x0E, 0x70, 0x38, 0xE0, 0x71, 44 | 0xE1, 0x62, 0xC2, 0xC5, 0xC9, 0x89, 0x93, 0x13, 0x26, 0x23, 0x8C, 0x47, 45 | 0x18, 0x84, 0x33, 0x88, 0xF0, 0xE0, 0xEE, 0x09, 0xC1, 0x2C, 0x25, 0xC4, 46 | 0x9C, 0x91, 0x92, 0x1A, 0x41, 0xC8, 0x19, 0x03, 0x70, 0x20, 0x1F, 0x06, 47 | 0x31, 0x83, 0x20, 0x2C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x68, 0x09, 48 | 0x83, 0x18, 0xC1, 0xF0, 0xFE, 0x31, 0x98, 0x6C, 0x36, 0x1B, 0x19, 0xF8, 49 | 0xC0, 0x60, 0x30, 0x18, 0x1E, 0x00, 0x1F, 0x06, 0x31, 0x83, 0x20, 0x2C, 50 | 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x68, 0x19, 0x83, 0x18, 0xC0, 0xE0, 51 | 0x0E, 0x00, 0xE0, 0x07, 0xFE, 0x0C, 0x61, 0x86, 0x30, 0xC6, 0x18, 0xC6, 52 | 0x1F, 0x83, 0x70, 0x67, 0x0C, 0x71, 0x87, 0x78, 0x70, 0x1D, 0x31, 0x98, 53 | 0x4C, 0x07, 0x80, 0xE0, 0x1C, 0x07, 0x01, 0xA0, 0xD8, 0xCB, 0xC0, 0xFF, 54 | 0xF8, 0xCE, 0x18, 0x83, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 55 | 0xC0, 0x18, 0x07, 0x80, 0xF0, 0xEC, 0x09, 0x81, 0x30, 0x26, 0x04, 0xC0, 56 | 0x98, 0x13, 0x02, 0x60, 0x4C, 0x08, 0xC2, 0x0F, 0x80, 0xF8, 0x77, 0x02, 57 | 0x30, 0x23, 0x04, 0x18, 0x41, 0x84, 0x0C, 0x80, 0xC8, 0x07, 0x00, 0x70, 58 | 0x02, 0x00, 0x20, 0xFB, 0xE7, 0xB0, 0xC0, 0x8C, 0x20, 0x86, 0x18, 0x41, 59 | 0x8C, 0x40, 0xCB, 0x20, 0x65, 0x90, 0x1A, 0x70, 0x0E, 0x38, 0x03, 0x1C, 60 | 0x01, 0x04, 0x00, 0x82, 0x00, 0xFC, 0xF9, 0x83, 0x06, 0x10, 0x19, 0x00, 61 | 0xD0, 0x03, 0x00, 0x1C, 0x01, 0x30, 0x11, 0xC1, 0x86, 0x08, 0x19, 0xE3, 62 | 0xF0, 0xF8, 0xF6, 0x06, 0x30, 0x41, 0x88, 0x1D, 0x00, 0xD0, 0x06, 0x00, 63 | 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0xF0, 0x3F, 0xCC, 0x11, 0x06, 0x01, 64 | 0x80, 0x70, 0x0C, 0x03, 0x00, 0xE0, 0x38, 0x06, 0x05, 0xC1, 0x7F, 0xE0, 65 | 0xFB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB8, 0x82, 0x10, 0x82, 0x10, 0x86, 0x10, 66 | 0x86, 0x10, 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xF8, 0x18, 0x1C, 0x34, 0x26, 67 | 0x62, 0x42, 0xC1, 0xFF, 0x80, 0x84, 0x20, 0x79, 0x98, 0x30, 0xE6, 0xD9, 68 | 0xB3, 0x3F, 0x20, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x71, 0xCC, 0xC3, 0x61, 69 | 0xB0, 0xD8, 0x6C, 0x63, 0xE0, 0x3C, 0xCF, 0x06, 0x0C, 0x18, 0x18, 0x9E, 70 | 0x01, 0x03, 0x80, 0xC0, 0x60, 0x31, 0xD9, 0x9D, 0x86, 0xC3, 0x61, 0xB0, 71 | 0xCC, 0x63, 0xF0, 0x3C, 0x46, 0xFE, 0xC0, 0xC0, 0xE1, 0x62, 0x3C, 0x1E, 72 | 0x41, 0x83, 0x06, 0x1E, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x0F, 0x00, 0x3C, 73 | 0x19, 0xF6, 0x31, 0x8C, 0x1E, 0x08, 0x04, 0x01, 0xFC, 0x40, 0xB0, 0x2E, 74 | 0x11, 0xF8, 0x20, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x71, 0xCC, 0xC6, 0x63, 75 | 0x31, 0x98, 0xCC, 0x6F, 0x78, 0x60, 0x02, 0xE6, 0x66, 0x66, 0xF0, 0x18, 76 | 0x00, 0x33, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8B, 0x80, 0x20, 0x70, 0x18, 77 | 0x0C, 0x06, 0x03, 0x3D, 0x88, 0xD8, 0x78, 0x36, 0x19, 0x8C, 0x6F, 0x78, 78 | 0x2E, 0x66, 0x66, 0x66, 0x66, 0x66, 0xF0, 0xEE, 0x71, 0xCE, 0x66, 0x31, 79 | 0x98, 0xC6, 0x63, 0x19, 0x8C, 0x66, 0x31, 0xBD, 0xEF, 0xEE, 0x39, 0x98, 80 | 0xCC, 0x66, 0x33, 0x19, 0x8D, 0xEF, 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1E, 81 | 0x0D, 0x8C, 0x7C, 0xEE, 0x39, 0x98, 0x6C, 0x36, 0x1B, 0x0D, 0x8C, 0xFC, 82 | 0x60, 0x30, 0x18, 0x1E, 0x00, 0x3D, 0x31, 0xB0, 0xD8, 0x6C, 0x36, 0x1B, 83 | 0x8C, 0xFE, 0x03, 0x01, 0x80, 0xC0, 0xF0, 0x6D, 0xC6, 0x18, 0x61, 0x86, 84 | 0x3C, 0x76, 0x38, 0x58, 0x3E, 0x38, 0xFE, 0x27, 0x98, 0xC6, 0x31, 0x8C, 85 | 0x38, 0xE7, 0x31, 0x98, 0xCC, 0x66, 0x33, 0x19, 0x8C, 0x7F, 0xF3, 0x61, 86 | 0x22, 0x32, 0x14, 0x1C, 0x08, 0x08, 0xEF, 0x36, 0x61, 0x62, 0x22, 0x32, 87 | 0x35, 0x41, 0x9C, 0x18, 0x81, 0x08, 0xF7, 0x12, 0x0E, 0x03, 0x01, 0xC1, 88 | 0x21, 0x09, 0xCF, 0xF3, 0x61, 0x62, 0x32, 0x34, 0x14, 0x1C, 0x08, 0x08, 89 | 0x08, 0x10, 0xE0, 0xFD, 0x18, 0x60, 0x83, 0x0C, 0x70, 0xFE, 0x19, 0x8C, 90 | 0x63, 0x18, 0xC4, 0x61, 0x8C, 0x63, 0x18, 0xC3, 0xFF, 0xF0, 0xC3, 0x18, 91 | 0xC6, 0x31, 0x84, 0x33, 0x18, 0xC6, 0x31, 0x98, 0x70, 0x24, 0xC1, 0xC0 }; 92 | 93 | const GFXglyph FreeSerif9pt7bGlyphs[] PROGMEM = { 94 | { 0, 0, 0, 5, 0, 1 }, // 0x20 ' ' 95 | { 0, 2, 12, 6, 2, -11 }, // 0x21 '!' 96 | { 3, 5, 4, 7, 1, -11 }, // 0x22 '"' 97 | { 6, 9, 12, 9, 0, -11 }, // 0x23 '#' 98 | { 20, 8, 14, 9, 1, -12 }, // 0x24 '$' 99 | { 34, 13, 12, 15, 1, -11 }, // 0x25 '%' 100 | { 54, 13, 13, 14, 1, -12 }, // 0x26 '&' 101 | { 76, 2, 4, 4, 1, -11 }, // 0x27 ''' 102 | { 77, 5, 15, 6, 1, -11 }, // 0x28 '(' 103 | { 87, 5, 15, 6, 0, -11 }, // 0x29 ')' 104 | { 97, 6, 8, 9, 3, -11 }, // 0x2A '*' 105 | { 103, 9, 9, 10, 0, -8 }, // 0x2B '+' 106 | { 114, 2, 3, 4, 2, 0 }, // 0x2C ',' 107 | { 115, 4, 1, 6, 1, -3 }, // 0x2D '-' 108 | { 116, 2, 2, 5, 1, -1 }, // 0x2E '.' 109 | { 117, 5, 12, 5, 0, -11 }, // 0x2F '/' 110 | { 125, 9, 13, 9, 0, -12 }, // 0x30 '0' 111 | { 140, 5, 13, 9, 2, -12 }, // 0x31 '1' 112 | { 149, 8, 12, 9, 1, -11 }, // 0x32 '2' 113 | { 161, 8, 12, 9, 0, -11 }, // 0x33 '3' 114 | { 173, 7, 12, 9, 1, -11 }, // 0x34 '4' 115 | { 184, 8, 12, 9, 0, -11 }, // 0x35 '5' 116 | { 196, 8, 13, 9, 1, -12 }, // 0x36 '6' 117 | { 209, 8, 12, 9, 0, -11 }, // 0x37 '7' 118 | { 221, 7, 13, 9, 1, -12 }, // 0x38 '8' 119 | { 233, 8, 14, 9, 1, -12 }, // 0x39 '9' 120 | { 247, 2, 8, 5, 1, -7 }, // 0x3A ':' 121 | { 249, 3, 10, 5, 1, -7 }, // 0x3B ';' 122 | { 253, 9, 9, 10, 1, -8 }, // 0x3C '<' 123 | { 264, 9, 5, 10, 1, -6 }, // 0x3D '=' 124 | { 270, 10, 9, 10, 0, -8 }, // 0x3E '>' 125 | { 282, 7, 13, 8, 1, -12 }, // 0x3F '?' 126 | { 294, 12, 13, 16, 2, -12 }, // 0x40 '@' 127 | { 314, 13, 12, 13, 0, -11 }, // 0x41 'A' 128 | { 334, 11, 12, 11, 0, -11 }, // 0x42 'B' 129 | { 351, 11, 12, 12, 1, -11 }, // 0x43 'C' 130 | { 368, 12, 12, 13, 0, -11 }, // 0x44 'D' 131 | { 386, 10, 12, 11, 1, -11 }, // 0x45 'E' 132 | { 401, 9, 12, 10, 1, -11 }, // 0x46 'F' 133 | { 415, 12, 12, 13, 1, -11 }, // 0x47 'G' 134 | { 433, 11, 12, 13, 1, -11 }, // 0x48 'H' 135 | { 450, 4, 12, 6, 1, -11 }, // 0x49 'I' 136 | { 456, 6, 12, 7, 0, -11 }, // 0x4A 'J' 137 | { 465, 12, 12, 13, 1, -11 }, // 0x4B 'K' 138 | { 483, 10, 12, 11, 1, -11 }, // 0x4C 'L' 139 | { 498, 15, 12, 16, 0, -11 }, // 0x4D 'M' 140 | { 521, 11, 12, 13, 1, -11 }, // 0x4E 'N' 141 | { 538, 11, 13, 13, 1, -12 }, // 0x4F 'O' 142 | { 556, 9, 12, 10, 1, -11 }, // 0x50 'P' 143 | { 570, 11, 16, 13, 1, -12 }, // 0x51 'Q' 144 | { 592, 11, 12, 12, 1, -11 }, // 0x52 'R' 145 | { 609, 9, 12, 10, 0, -11 }, // 0x53 'S' 146 | { 623, 11, 12, 11, 0, -11 }, // 0x54 'T' 147 | { 640, 11, 12, 13, 1, -11 }, // 0x55 'U' 148 | { 657, 12, 12, 13, 0, -11 }, // 0x56 'V' 149 | { 675, 17, 12, 17, 0, -11 }, // 0x57 'W' 150 | { 701, 13, 12, 13, 0, -11 }, // 0x58 'X' 151 | { 721, 12, 12, 13, 0, -11 }, // 0x59 'Y' 152 | { 739, 11, 12, 11, 0, -11 }, // 0x5A 'Z' 153 | { 756, 3, 15, 6, 2, -11 }, // 0x5B '[' 154 | { 762, 5, 12, 5, 0, -11 }, // 0x5C '\' 155 | { 770, 3, 15, 6, 1, -11 }, // 0x5D ']' 156 | { 776, 8, 7, 8, 0, -11 }, // 0x5E '^' 157 | { 783, 9, 1, 9, 0, 2 }, // 0x5F '_' 158 | { 785, 4, 3, 5, 0, -11 }, // 0x60 '`' 159 | { 787, 7, 8, 8, 1, -7 }, // 0x61 'a' 160 | { 794, 9, 13, 9, 0, -12 }, // 0x62 'b' 161 | { 809, 7, 8, 8, 0, -7 }, // 0x63 'c' 162 | { 816, 9, 13, 9, 0, -12 }, // 0x64 'd' 163 | { 831, 8, 8, 8, 0, -7 }, // 0x65 'e' 164 | { 839, 7, 13, 7, 1, -12 }, // 0x66 'f' 165 | { 851, 10, 12, 8, 0, -7 }, // 0x67 'g' 166 | { 866, 9, 13, 9, 0, -12 }, // 0x68 'h' 167 | { 881, 4, 11, 5, 1, -10 }, // 0x69 'i' 168 | { 887, 5, 15, 6, 0, -10 }, // 0x6A 'j' 169 | { 897, 9, 13, 9, 1, -12 }, // 0x6B 'k' 170 | { 912, 4, 13, 5, 1, -12 }, // 0x6C 'l' 171 | { 919, 14, 8, 14, 0, -7 }, // 0x6D 'm' 172 | { 933, 9, 8, 9, 0, -7 }, // 0x6E 'n' 173 | { 942, 9, 8, 9, 0, -7 }, // 0x6F 'o' 174 | { 951, 9, 12, 9, 0, -7 }, // 0x70 'p' 175 | { 965, 9, 12, 9, 0, -7 }, // 0x71 'q' 176 | { 979, 6, 8, 6, 0, -7 }, // 0x72 'r' 177 | { 985, 6, 8, 7, 1, -7 }, // 0x73 's' 178 | { 991, 5, 9, 5, 0, -8 }, // 0x74 't' 179 | { 997, 9, 8, 9, 0, -7 }, // 0x75 'u' 180 | { 1006, 8, 8, 8, 0, -7 }, // 0x76 'v' 181 | { 1014, 12, 8, 12, 0, -7 }, // 0x77 'w' 182 | { 1026, 9, 8, 9, 0, -7 }, // 0x78 'x' 183 | { 1035, 8, 12, 8, 0, -7 }, // 0x79 'y' 184 | { 1047, 7, 8, 7, 1, -7 }, // 0x7A 'z' 185 | { 1054, 5, 16, 9, 1, -12 }, // 0x7B '{' 186 | { 1064, 1, 12, 4, 1, -11 }, // 0x7C '|' 187 | { 1066, 5, 16, 9, 3, -11 }, // 0x7D '}' 188 | { 1076, 9, 3, 9, 0, -5 } }; // 0x7E '~' 189 | 190 | const GFXfont FreeSerif9pt7b PROGMEM = { 191 | (uint8_t *)FreeSerif9pt7bBitmaps, 192 | (GFXglyph *)FreeSerif9pt7bGlyphs, 193 | 0x20, 0x7E, 22 }; 194 | 195 | // Approx. 1752 bytes 196 | -------------------------------------------------------------------------------- /Библиотеки/Adafruit-GFX-Library-master/Fonts/FreeSans9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeSans9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xFF, 0xF8, 0xC0, 0xDE, 0xF7, 0x20, 0x09, 0x86, 0x41, 0x91, 0xFF, 3 | 0x13, 0x04, 0xC3, 0x20, 0xC8, 0xFF, 0x89, 0x82, 0x61, 0x90, 0x10, 0x1F, 4 | 0x14, 0xDA, 0x3D, 0x1E, 0x83, 0x40, 0x78, 0x17, 0x08, 0xF4, 0x7A, 0x35, 5 | 0x33, 0xF0, 0x40, 0x20, 0x38, 0x10, 0xEC, 0x20, 0xC6, 0x20, 0xC6, 0x40, 6 | 0xC6, 0x40, 0x6C, 0x80, 0x39, 0x00, 0x01, 0x3C, 0x02, 0x77, 0x02, 0x63, 7 | 0x04, 0x63, 0x04, 0x77, 0x08, 0x3C, 0x0E, 0x06, 0x60, 0xCC, 0x19, 0x81, 8 | 0xE0, 0x18, 0x0F, 0x03, 0x36, 0xC2, 0xD8, 0x73, 0x06, 0x31, 0xE3, 0xC4, 9 | 0xFE, 0x13, 0x26, 0x6C, 0xCC, 0xCC, 0xC4, 0x66, 0x23, 0x10, 0x8C, 0x46, 10 | 0x63, 0x33, 0x33, 0x32, 0x66, 0x4C, 0x80, 0x25, 0x7E, 0xA5, 0x00, 0x30, 11 | 0xC3, 0x3F, 0x30, 0xC3, 0x0C, 0xD6, 0xF0, 0xC0, 0x08, 0x44, 0x21, 0x10, 12 | 0x84, 0x42, 0x11, 0x08, 0x00, 0x3C, 0x66, 0x42, 0xC3, 0xC3, 0xC3, 0xC3, 13 | 0xC3, 0xC3, 0xC3, 0x42, 0x66, 0x3C, 0x11, 0x3F, 0x33, 0x33, 0x33, 0x33, 14 | 0x30, 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 15 | 0x10, 0x08, 0x07, 0xF8, 0x3C, 0x66, 0xC3, 0xC3, 0x03, 0x06, 0x1C, 0x07, 16 | 0x03, 0xC3, 0xC3, 0x66, 0x3C, 0x0C, 0x18, 0x71, 0x62, 0xC9, 0xA3, 0x46, 17 | 0xFE, 0x18, 0x30, 0x60, 0xC0, 0x7F, 0x20, 0x10, 0x08, 0x08, 0x07, 0xF3, 18 | 0x8C, 0x03, 0x01, 0x80, 0xF0, 0x6C, 0x63, 0xE0, 0x1E, 0x31, 0x98, 0x78, 19 | 0x0C, 0x06, 0xF3, 0x8D, 0x83, 0xC1, 0xE0, 0xD0, 0x6C, 0x63, 0xE0, 0xFF, 20 | 0x03, 0x02, 0x06, 0x04, 0x0C, 0x08, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30, 21 | 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1B, 0x18, 0xF8, 0xC6, 0xC1, 0xE0, 0xF0, 22 | 0x6C, 0x63, 0xE0, 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 23 | 0x03, 0xC2, 0x66, 0x3C, 0xC0, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x64, 0xA0, 24 | 0x00, 0x81, 0xC7, 0x8E, 0x0C, 0x07, 0x80, 0x70, 0x0E, 0x01, 0x80, 0xFF, 25 | 0x80, 0x00, 0x1F, 0xF0, 0x00, 0x70, 0x0E, 0x01, 0xC0, 0x18, 0x38, 0x71, 26 | 0xC0, 0x80, 0x00, 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x18, 0x38, 0x18, 27 | 0x18, 0x0C, 0x00, 0x00, 0x01, 0x80, 0x03, 0xF0, 0x06, 0x0E, 0x06, 0x01, 28 | 0x86, 0x00, 0x66, 0x1D, 0xBB, 0x31, 0xCF, 0x18, 0xC7, 0x98, 0x63, 0xCC, 29 | 0x31, 0xE6, 0x11, 0xB3, 0x99, 0xCC, 0xF7, 0x86, 0x00, 0x01, 0x80, 0x00, 30 | 0x70, 0x40, 0x0F, 0xE0, 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 31 | 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30, 32 | 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 33 | 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8, 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 34 | 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0, 35 | 0xFF, 0x18, 0x33, 0x03, 0x60, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 36 | 0x78, 0x0F, 0x03, 0x60, 0xCF, 0xF0, 0xFF, 0xE0, 0x30, 0x18, 0x0C, 0x06, 37 | 0x03, 0xFD, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0F, 0xF8, 0xFF, 0xC0, 0xC0, 38 | 0xC0, 0xC0, 0xC0, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x0F, 0x83, 39 | 0x0E, 0x60, 0x66, 0x03, 0xC0, 0x0C, 0x00, 0xC1, 0xFC, 0x03, 0xC0, 0x36, 40 | 0x03, 0x60, 0x73, 0x0F, 0x0F, 0x10, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 41 | 0x07, 0x80, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06, 42 | 0xFF, 0xFF, 0xFF, 0xC0, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x07, 43 | 0x8F, 0x1E, 0x27, 0x80, 0xC0, 0xD8, 0x33, 0x0C, 0x63, 0x0C, 0xC1, 0xB8, 44 | 0x3F, 0x07, 0x30, 0xC3, 0x18, 0x63, 0x06, 0x60, 0x6C, 0x0C, 0xC0, 0xC0, 45 | 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, 0xE0, 46 | 0x3F, 0x01, 0xFC, 0x1F, 0xE0, 0xFD, 0x05, 0xEC, 0x6F, 0x63, 0x79, 0x13, 47 | 0xCD, 0x9E, 0x6C, 0xF1, 0x47, 0x8E, 0x3C, 0x71, 0x80, 0xE0, 0x7C, 0x0F, 48 | 0xC1, 0xE8, 0x3D, 0x87, 0x98, 0xF1, 0x1E, 0x33, 0xC3, 0x78, 0x6F, 0x07, 49 | 0xE0, 0x7C, 0x0E, 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 50 | 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x0C, 0x60, 0xC0, 0xF8, 51 | 0x00, 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 52 | 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00, 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 53 | 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x6C, 54 | 0x60, 0xC0, 0xFB, 0x00, 0x08, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 55 | 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 56 | 0x70, 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 57 | 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00, 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 58 | 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0xC0, 0x78, 0x0F, 59 | 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 60 | 0xB0, 0x61, 0xF0, 0xC0, 0x6C, 0x0D, 0x81, 0x10, 0x63, 0x0C, 0x61, 0x04, 61 | 0x60, 0xCC, 0x19, 0x01, 0x60, 0x3C, 0x07, 0x00, 0x60, 0xC1, 0x81, 0x30, 62 | 0xE1, 0x98, 0x70, 0xCC, 0x28, 0x66, 0x26, 0x21, 0x13, 0x30, 0xC8, 0x98, 63 | 0x6C, 0x4C, 0x14, 0x34, 0x0A, 0x1A, 0x07, 0x07, 0x03, 0x03, 0x80, 0x81, 64 | 0x80, 0x60, 0x63, 0x0C, 0x30, 0xC1, 0x98, 0x0F, 0x00, 0xE0, 0x06, 0x00, 65 | 0xF0, 0x19, 0x01, 0x98, 0x30, 0xC6, 0x0E, 0x60, 0x60, 0xC0, 0x36, 0x06, 66 | 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 67 | 0x06, 0x00, 0x60, 0x06, 0x00, 0xFF, 0xC0, 0x60, 0x30, 0x0C, 0x06, 0x03, 68 | 0x01, 0xC0, 0x60, 0x30, 0x18, 0x06, 0x03, 0x00, 0xFF, 0xC0, 0xFB, 0x6D, 69 | 0xB6, 0xDB, 0x6D, 0xB6, 0xE0, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 70 | 0x10, 0x80, 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0xE0, 0x30, 0x60, 0xA2, 71 | 0x44, 0xD8, 0xA1, 0x80, 0xFF, 0xC0, 0xC6, 0x30, 0x7E, 0x71, 0xB0, 0xC0, 72 | 0x60, 0xF3, 0xDB, 0x0D, 0x86, 0xC7, 0x3D, 0xC0, 0xC0, 0x60, 0x30, 0x1B, 73 | 0xCE, 0x36, 0x0F, 0x07, 0x83, 0xC1, 0xE0, 0xF0, 0x7C, 0x6D, 0xE0, 0x3C, 74 | 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C, 0x03, 0x03, 0x03, 75 | 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x3C, 0x66, 76 | 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C, 0x36, 0x6F, 0x66, 0x66, 77 | 0x66, 0x66, 0x60, 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 78 | 0x3B, 0x03, 0x03, 0xC6, 0x7C, 0xC0, 0xC0, 0xC0, 0xDE, 0xE3, 0xC3, 0xC3, 79 | 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xFF, 0xFF, 0xC0, 0x30, 0x03, 80 | 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xE0, 0xC0, 0x60, 0x30, 0x18, 0x4C, 81 | 0x46, 0x63, 0x61, 0xF0, 0xEC, 0x62, 0x31, 0x98, 0x6C, 0x30, 0xFF, 0xFF, 82 | 0xFF, 0xC0, 0xDE, 0xF7, 0x1C, 0xF0, 0xC7, 0x86, 0x3C, 0x31, 0xE1, 0x8F, 83 | 0x0C, 0x78, 0x63, 0xC3, 0x1E, 0x18, 0xC0, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 84 | 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 85 | 0xC3, 0x66, 0x3C, 0xDE, 0x71, 0xB0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x83, 86 | 0xE3, 0x6F, 0x30, 0x18, 0x0C, 0x00, 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 87 | 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0x03, 0xDF, 0x31, 0x8C, 0x63, 0x18, 88 | 0xC6, 0x00, 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xE3, 0x7E, 89 | 0x66, 0xF6, 0x66, 0x66, 0x66, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 90 | 0xC3, 0xC3, 0xC7, 0x7B, 0xC1, 0xA0, 0x98, 0xCC, 0x42, 0x21, 0xB0, 0xD0, 91 | 0x28, 0x1C, 0x0C, 0x00, 0xC6, 0x1E, 0x38, 0x91, 0xC4, 0xCA, 0x66, 0xD3, 92 | 0x16, 0xD0, 0xA6, 0x87, 0x1C, 0x38, 0xC0, 0xC6, 0x00, 0x43, 0x62, 0x36, 93 | 0x1C, 0x18, 0x1C, 0x3C, 0x26, 0x62, 0x43, 0xC1, 0x21, 0x98, 0xCC, 0x42, 94 | 0x61, 0xB0, 0xD0, 0x38, 0x1C, 0x0C, 0x06, 0x03, 0x01, 0x03, 0x00, 0xFE, 95 | 0x0C, 0x30, 0xC1, 0x86, 0x18, 0x20, 0xC1, 0xFC, 0x36, 0x66, 0x66, 0x6E, 96 | 0xCE, 0x66, 0x66, 0x66, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xC6, 0x66, 97 | 0x66, 0x67, 0x37, 0x66, 0x66, 0x66, 0xC0, 0x61, 0x24, 0x38 }; 98 | 99 | const GFXglyph FreeSans9pt7bGlyphs[] PROGMEM = { 100 | { 0, 0, 0, 5, 0, 1 }, // 0x20 ' ' 101 | { 0, 2, 13, 6, 2, -12 }, // 0x21 '!' 102 | { 4, 5, 4, 6, 1, -12 }, // 0x22 '"' 103 | { 7, 10, 12, 10, 0, -11 }, // 0x23 '#' 104 | { 22, 9, 16, 10, 1, -13 }, // 0x24 '$' 105 | { 40, 16, 13, 16, 1, -12 }, // 0x25 '%' 106 | { 66, 11, 13, 12, 1, -12 }, // 0x26 '&' 107 | { 84, 2, 4, 4, 1, -12 }, // 0x27 ''' 108 | { 85, 4, 17, 6, 1, -12 }, // 0x28 '(' 109 | { 94, 4, 17, 6, 1, -12 }, // 0x29 ')' 110 | { 103, 5, 5, 7, 1, -12 }, // 0x2A '*' 111 | { 107, 6, 8, 11, 3, -7 }, // 0x2B '+' 112 | { 113, 2, 4, 5, 2, 0 }, // 0x2C ',' 113 | { 114, 4, 1, 6, 1, -4 }, // 0x2D '-' 114 | { 115, 2, 1, 5, 1, 0 }, // 0x2E '.' 115 | { 116, 5, 13, 5, 0, -12 }, // 0x2F '/' 116 | { 125, 8, 13, 10, 1, -12 }, // 0x30 '0' 117 | { 138, 4, 13, 10, 3, -12 }, // 0x31 '1' 118 | { 145, 9, 13, 10, 1, -12 }, // 0x32 '2' 119 | { 160, 8, 13, 10, 1, -12 }, // 0x33 '3' 120 | { 173, 7, 13, 10, 2, -12 }, // 0x34 '4' 121 | { 185, 9, 13, 10, 1, -12 }, // 0x35 '5' 122 | { 200, 9, 13, 10, 1, -12 }, // 0x36 '6' 123 | { 215, 8, 13, 10, 0, -12 }, // 0x37 '7' 124 | { 228, 9, 13, 10, 1, -12 }, // 0x38 '8' 125 | { 243, 8, 13, 10, 1, -12 }, // 0x39 '9' 126 | { 256, 2, 10, 5, 1, -9 }, // 0x3A ':' 127 | { 259, 3, 12, 5, 1, -8 }, // 0x3B ';' 128 | { 264, 9, 9, 11, 1, -8 }, // 0x3C '<' 129 | { 275, 9, 4, 11, 1, -5 }, // 0x3D '=' 130 | { 280, 9, 9, 11, 1, -8 }, // 0x3E '>' 131 | { 291, 9, 13, 10, 1, -12 }, // 0x3F '?' 132 | { 306, 17, 16, 18, 1, -12 }, // 0x40 '@' 133 | { 340, 12, 13, 12, 0, -12 }, // 0x41 'A' 134 | { 360, 11, 13, 12, 1, -12 }, // 0x42 'B' 135 | { 378, 11, 13, 13, 1, -12 }, // 0x43 'C' 136 | { 396, 11, 13, 13, 1, -12 }, // 0x44 'D' 137 | { 414, 9, 13, 11, 1, -12 }, // 0x45 'E' 138 | { 429, 8, 13, 11, 1, -12 }, // 0x46 'F' 139 | { 442, 12, 13, 14, 1, -12 }, // 0x47 'G' 140 | { 462, 11, 13, 13, 1, -12 }, // 0x48 'H' 141 | { 480, 2, 13, 5, 2, -12 }, // 0x49 'I' 142 | { 484, 7, 13, 10, 1, -12 }, // 0x4A 'J' 143 | { 496, 11, 13, 12, 1, -12 }, // 0x4B 'K' 144 | { 514, 8, 13, 10, 1, -12 }, // 0x4C 'L' 145 | { 527, 13, 13, 15, 1, -12 }, // 0x4D 'M' 146 | { 549, 11, 13, 13, 1, -12 }, // 0x4E 'N' 147 | { 567, 13, 13, 14, 1, -12 }, // 0x4F 'O' 148 | { 589, 10, 13, 12, 1, -12 }, // 0x50 'P' 149 | { 606, 13, 14, 14, 1, -12 }, // 0x51 'Q' 150 | { 629, 12, 13, 13, 1, -12 }, // 0x52 'R' 151 | { 649, 10, 13, 12, 1, -12 }, // 0x53 'S' 152 | { 666, 9, 13, 11, 1, -12 }, // 0x54 'T' 153 | { 681, 11, 13, 13, 1, -12 }, // 0x55 'U' 154 | { 699, 11, 13, 12, 0, -12 }, // 0x56 'V' 155 | { 717, 17, 13, 17, 0, -12 }, // 0x57 'W' 156 | { 745, 12, 13, 12, 0, -12 }, // 0x58 'X' 157 | { 765, 12, 13, 12, 0, -12 }, // 0x59 'Y' 158 | { 785, 10, 13, 11, 1, -12 }, // 0x5A 'Z' 159 | { 802, 3, 17, 5, 1, -12 }, // 0x5B '[' 160 | { 809, 5, 13, 5, 0, -12 }, // 0x5C '\' 161 | { 818, 3, 17, 5, 0, -12 }, // 0x5D ']' 162 | { 825, 7, 7, 8, 1, -12 }, // 0x5E '^' 163 | { 832, 10, 1, 10, 0, 3 }, // 0x5F '_' 164 | { 834, 4, 3, 5, 0, -12 }, // 0x60 '`' 165 | { 836, 9, 10, 10, 1, -9 }, // 0x61 'a' 166 | { 848, 9, 13, 10, 1, -12 }, // 0x62 'b' 167 | { 863, 8, 10, 9, 1, -9 }, // 0x63 'c' 168 | { 873, 8, 13, 10, 1, -12 }, // 0x64 'd' 169 | { 886, 8, 10, 10, 1, -9 }, // 0x65 'e' 170 | { 896, 4, 13, 5, 1, -12 }, // 0x66 'f' 171 | { 903, 8, 14, 10, 1, -9 }, // 0x67 'g' 172 | { 917, 8, 13, 10, 1, -12 }, // 0x68 'h' 173 | { 930, 2, 13, 4, 1, -12 }, // 0x69 'i' 174 | { 934, 4, 17, 4, 0, -12 }, // 0x6A 'j' 175 | { 943, 9, 13, 9, 1, -12 }, // 0x6B 'k' 176 | { 958, 2, 13, 4, 1, -12 }, // 0x6C 'l' 177 | { 962, 13, 10, 15, 1, -9 }, // 0x6D 'm' 178 | { 979, 8, 10, 10, 1, -9 }, // 0x6E 'n' 179 | { 989, 8, 10, 10, 1, -9 }, // 0x6F 'o' 180 | { 999, 9, 13, 10, 1, -9 }, // 0x70 'p' 181 | { 1014, 8, 13, 10, 1, -9 }, // 0x71 'q' 182 | { 1027, 5, 10, 6, 1, -9 }, // 0x72 'r' 183 | { 1034, 8, 10, 9, 1, -9 }, // 0x73 's' 184 | { 1044, 4, 12, 5, 1, -11 }, // 0x74 't' 185 | { 1050, 8, 10, 10, 1, -9 }, // 0x75 'u' 186 | { 1060, 9, 10, 9, 0, -9 }, // 0x76 'v' 187 | { 1072, 13, 10, 13, 0, -9 }, // 0x77 'w' 188 | { 1089, 8, 10, 9, 0, -9 }, // 0x78 'x' 189 | { 1099, 9, 14, 9, 0, -9 }, // 0x79 'y' 190 | { 1115, 7, 10, 9, 1, -9 }, // 0x7A 'z' 191 | { 1124, 4, 17, 6, 1, -12 }, // 0x7B '{' 192 | { 1133, 2, 17, 4, 2, -12 }, // 0x7C '|' 193 | { 1138, 4, 17, 6, 1, -12 }, // 0x7D '}' 194 | { 1147, 7, 3, 9, 1, -7 } }; // 0x7E '~' 195 | 196 | const GFXfont FreeSans9pt7b PROGMEM = { 197 | (uint8_t *)FreeSans9pt7bBitmaps, 198 | (GFXglyph *)FreeSans9pt7bGlyphs, 199 | 0x20, 0x7E, 22 }; 200 | 201 | // Approx. 1822 bytes 202 | --------------------------------------------------------------------------------