├── InternetRadio.ino ├── Orbitron_Medium_20.h ├── background.h └── frame.h /InternetRadio.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include // Graphics and font library for ST7735 driver chip 10 | #include 11 | #include 12 | 13 | #include "frame.h" 14 | 15 | #include "background.h" 16 | #include "Orbitron_Medium_20.h" 17 | 18 | TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h 19 | #define TFT_GREY 0x5AEB // New colour 20 | 21 | const int pwmFreq = 5000; 22 | const int pwmResolution = 8; 23 | const int pwmLedChannelTFT = 0; 24 | 25 | const char *SSID = "xxxxxx"; 26 | const char *PASSWORD = "xxxxxx"; 27 | const int bufferSize = 16 * 1024; // buffer in byte, default 16 * 1024 = 16kb 28 | char * arrayURL[8] = { 29 | "http://jenny.torontocast.com:8134/stream", 30 | 31 | "http://188.165.212.154:8478/stream", 32 | "https://igor.torontocast.com:1025/;.mp3", 33 | "http://streamer.radio.co/s06b196587/listen", 34 | 35 | 36 | "http://media-ice.musicradio.com:80/ClassicFMMP3", 37 | "http://naxos.cdnstream.com:80/1255_128", 38 | "http://149.56.195.94:8015/steam", 39 | "http://ice2.somafm.com/christmas-128-mp3" 40 | }; 41 | 42 | String arrayStation[8] = { 43 | "Mega Shuffle", 44 | 45 | "WayUp Radio", 46 | "Asia Dream", 47 | "KPop Radio", 48 | 49 | 50 | "Classic FM", 51 | "Lite Favorites", 52 | "MAXXED Out", 53 | "SomaFM Xmas" 54 | }; 55 | 56 | const int LED = 10; // GPIO LED 57 | const int BTNA = 0; // GPIO Play and Pause 58 | const int BTNB = 35; 59 | const int BTNC = 12; 60 | const int BTND = 17; 61 | // GPIO Switch Channel / Volume 62 | 63 | AudioGeneratorTalkie *talkie; 64 | AudioGeneratorMP3 *mp3; 65 | AudioFileSourceICYStream *file; 66 | AudioFileSourceBuffer *buff; 67 | AudioOutputI2S *out; 68 | 69 | const int numCh = sizeof(arrayURL)/sizeof(char *); 70 | bool TestMode = false; 71 | uint32_t LastTime = 0; 72 | int playflag = 0; 73 | int ledflag = 0; 74 | //int btnaflag = 0; 75 | //int btnbflag = 0; 76 | float fgain = 4.0; 77 | int sflag = 0; 78 | char *URL = arrayURL[sflag]; 79 | String station = arrayStation[sflag]; 80 | 81 | int backlight[5] = {10,30,60,120,220}; 82 | byte b=2; 83 | int press1=0; 84 | int press2=0; 85 | bool inv=0; 86 | 87 | void setup() { 88 | tft.init(); 89 | tft.setRotation(0); 90 | tft.setSwapBytes(true); 91 | tft.setFreeFont(&Orbitron_Medium_20); 92 | tft.fillScreen(TFT_BLACK); 93 | tft.pushImage(0, 0, 135, 240, background); 94 | 95 | ledcSetup(pwmLedChannelTFT, pwmFreq, pwmResolution); 96 | ledcAttachPin(TFT_BL, pwmLedChannelTFT); 97 | ledcWrite(pwmLedChannelTFT, backlight[b]); 98 | 99 | 100 | Serial.begin(115200); 101 | pinMode(LED, OUTPUT); 102 | digitalWrite(LED , HIGH); 103 | pinMode(BTNA, INPUT); 104 | pinMode(BTNB, INPUT); 105 | pinMode(BTNC, INPUT_PULLUP); 106 | pinMode(BTND, INPUT_PULLUP); 107 | 108 | 109 | 110 | 111 | 112 | 113 | tft.setCursor(14, 20); 114 | tft.println("Radio"); 115 | 116 | tft.drawLine(0,28,135,28,TFT_GREY); 117 | delay(500); 118 | delay(1000); 119 | initwifi(); 120 | 121 | for(int i=0;iSetOutputModeMono(true); 134 | out->SetGain(fgain*0.05); 135 | } 136 | 137 | float n=0; 138 | 139 | void loop() { 140 | 141 | if (playflag == 1) { 142 | tft.pushImage(50, 126, animation_width, animation_height, frame[int(n)]); 143 | n=n+0.05 ; 144 | if(int(n)==frames) 145 | n=0; } 146 | else 147 | {tft.pushImage(50, 126, animation_width, animation_height, frame[frames-1]);} 148 | 149 | 150 | static int lastms = 0; 151 | if (playflag == 0) { 152 | if (digitalRead(BTNA) == LOW) { 153 | StartPlaying(); 154 | tft.drawString("Playing! ",78,44,2); 155 | playflag = 1; 156 | 157 | } 158 | 159 | if (digitalRead(BTNB) == LOW) { 160 | sflag = (sflag + 1) % numCh; 161 | URL = arrayURL[sflag]; 162 | station = arrayStation[sflag]; 163 | 164 | tft.setTextSize(1); 165 | 166 | 167 | tft.drawString(String(station),12,108,2); 168 | delay(300); 169 | } 170 | } 171 | 172 | if (playflag == 1) { 173 | if (mp3->isRunning()) { 174 | if (millis() - lastms > 1000) { 175 | lastms = millis(); 176 | Serial.printf("STATUS(Streaming) %d ms...\n", lastms); 177 | 178 | ledflag = ledflag + 1; 179 | if (ledflag > 1) { 180 | ledflag = 0; 181 | digitalWrite(LED , HIGH); 182 | 183 | } else { 184 | digitalWrite(LED , LOW); 185 | } 186 | 187 | } 188 | if (!mp3->loop()) mp3->stop(); 189 | } else { 190 | Serial.printf("MP3 done\n"); 191 | playflag = 0; 192 | 193 | digitalWrite(LED , HIGH); 194 | 195 | } 196 | if (digitalRead(BTNA) == LOW) { 197 | StopPlaying(); 198 | playflag = 0; 199 | tft.drawString("Stoped! ",78,44,2); 200 | digitalWrite(LED , HIGH); 201 | 202 | delay(200); 203 | } 204 | if (digitalRead(BTNB) == LOW) { 205 | fgain = fgain + 1.0; 206 | if (fgain > 10.0) { 207 | fgain = 1.0; 208 | } 209 | out->SetGain(fgain*0.05); 210 | tft.drawString(String(fgain),78,66,2 ); 211 | Serial.printf("STATUS(Gain) %f \n", fgain*0.05); 212 | delay(200); 213 | } 214 | } 215 | 216 | if(digitalRead(BTNC)==0){ 217 | if(press2==0) 218 | {press2=1; 219 | tft.fillRect(108,18,25,6,TFT_BLACK); 220 | 221 | b++; 222 | if(b>4) 223 | b=0; 224 | 225 | for(int i=0;iRegisterMetadataCB(MDCallback, (void*)"ICY"); 242 | buff = new AudioFileSourceBuffer(file, bufferSize); 243 | buff->RegisterStatusCB(StatusCallback, (void*)"buffer"); 244 | out = new AudioOutputI2S(0, 1); // Output to builtInDAC 245 | out->SetOutputModeMono(true); 246 | out->SetGain(fgain*0.05); 247 | mp3 = new AudioGeneratorMP3(); 248 | mp3->RegisterStatusCB(StatusCallback, (void*)"mp3"); 249 | mp3->begin(buff, out); 250 | Serial.printf("STATUS(URL) %s \n", URL); 251 | Serial.flush(); 252 | } 253 | 254 | void StopPlaying() { 255 | if (mp3) { 256 | mp3->stop(); 257 | delete mp3; 258 | mp3 = NULL; 259 | } 260 | if (buff) { 261 | buff->close(); 262 | delete buff; 263 | buff = NULL; 264 | } 265 | if (file) { 266 | file->close(); 267 | delete file; 268 | file = NULL; 269 | } 270 | Serial.printf("STATUS(Stopped)\n"); 271 | Serial.flush(); 272 | } 273 | 274 | void initwifi() { 275 | WiFi.disconnect(); 276 | WiFi.softAPdisconnect(true); 277 | WiFi.mode(WIFI_STA); 278 | WiFi.begin(SSID, PASSWORD); 279 | 280 | int i = 0; 281 | while (WiFi.status() != WL_CONNECTED) { 282 | Serial.print("STATUS(Connecting to WiFi) "); 283 | delay(1000); 284 | i = i + 1; 285 | if (i > 10) { 286 | ESP.restart(); 287 | } 288 | } 289 | Serial.println("OK"); 290 | } 291 | 292 | void MDCallback(void *cbData, const char *type, bool isUnicode, const char *string) { 293 | const char *ptr = reinterpret_cast(cbData); 294 | (void) isUnicode; // Punt this ball for now 295 | // Note that the type and string may be in PROGMEM, so copy them to RAM for printf 296 | char s1[32], s2[64]; 297 | strncpy_P(s1, type, sizeof(s1)); 298 | s1[sizeof(s1) - 1] = 0; 299 | strncpy_P(s2, string, sizeof(s2)); 300 | s2[sizeof(s2) - 1] = 0; 301 | Serial.printf("METADATA(%s) '%s' = '%s'\n", ptr, s1, s2); 302 | 303 | 304 | 305 | Serial.flush(); 306 | } 307 | 308 | void StatusCallback(void *cbData, int code, const char *string) { 309 | const char *ptr = reinterpret_cast(cbData); 310 | // Note that the string may be in PROGMEM, so copy it to RAM for printf 311 | char s1[64]; 312 | strncpy_P(s1, string, sizeof(s1)); 313 | s1[sizeof(s1) - 1] = 0; 314 | Serial.printf("STATUS(%s) '%d' = '%s'\n", ptr, code, s1); 315 | Serial.flush(); 316 | } 317 | -------------------------------------------------------------------------------- /Orbitron_Medium_20.h: -------------------------------------------------------------------------------- 1 | // Created by http://oleddisplay.squix.ch/ Consider a donation 2 | // In case of problems make sure that you are using the font file with the correct version! 3 | const uint8_t Orbitron_Medium_20Bitmaps[] PROGMEM = { 4 | 5 | // Bitmap Data: 6 | 0x00, // ' ' 7 | 0xDB,0x6D,0xB6,0xD8,0x0D,0x80, // '!' 8 | 0xDB,0x6D,0x80, // '"' 9 | 0x06,0x1C,0x1C,0x30,0x30,0x67,0xFF,0xEF,0xFF,0xC3,0x06,0x06,0x18,0x1C,0x30,0x30,0x61,0xFF,0xFB,0xFF,0xF3,0x06,0x06,0x1C,0x1C,0x30,0x00, // '#' 10 | 0x03,0x00,0x06,0x00,0x0C,0x07,0xFF,0xCF,0xFF,0xD8,0x61,0xB0,0xC0,0x61,0x80,0xC3,0x01,0xFF,0xF1,0xFF,0xF0,0x18,0x60,0x30,0xC0,0x61,0xB0,0xC3,0x7F,0xFE,0x7F,0xF8,0x06,0x00,0x0C,0x00, // '$' 11 | 0x7C,0x01,0x31,0x81,0xCC,0x60,0xF3,0x18,0x70,0xC6,0x38,0x1F,0x1C,0x00,0x0E,0x00,0x0F,0x3C,0x07,0x1F,0x83,0x8C,0x21,0xC3,0x08,0xE0,0xC2,0x30,0x1F,0x88,0x07,0xC0, // '%' 12 | 0x7F,0xF8,0x1F,0xFF,0x06,0x00,0xC1,0x80,0x00,0x60,0x00,0x1C,0x00,0x0F,0xC0,0x03,0x3C,0x30,0xC3,0xCC,0x30,0x3F,0x0C,0x03,0xE3,0x00,0x3C,0xFF,0xFF,0x9F,0xFE,0x20, // '&' 13 | 0xDB,0x00, // ''' 14 | 0x6E,0xCC,0xCC,0xCC,0xCC,0xCC,0xE6, // '(' 15 | 0xE7,0x1C,0xE7,0x39,0xCE,0x73,0x9C,0xEE,0x60, // ')' 16 | 0x18,0x0C,0x3F,0xDF,0xE3,0xC3,0xE1,0xB8,0x48, // '*' 17 | 0x18,0x0C,0x06,0x1F,0xEF,0xF0,0xC0,0x60,0x30, // '+' 18 | 0xDB,0x68, // ',' 19 | 0xFF,0x7F,0x80, // '-' 20 | 0xD8, // '.' 21 | 0x00,0x40,0x18,0x03,0x00,0xC0,0x30,0x0E,0x03,0x80,0xE0,0x18,0x06,0x01,0x80,0x70,0x0C,0x01,0x00,0x00, // '/' 22 | 0x7F,0xFC,0xFF,0xFC,0xC0,0x1E,0xC0,0x3E,0xC0,0xFE,0xC1,0xEE,0xC3,0x8E,0xC7,0x0E,0xCE,0x0E,0xFC,0x0E,0xF8,0x0E,0xE0,0x0E,0xFF,0xFC,0x7F,0xF8, // '0' 23 | 0x1E,0x3E,0x3E,0x7E,0x8E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, // '1' 24 | 0x7F,0xFC,0xFF,0xFC,0xC0,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x7F,0xFC,0xFF,0xFC,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xFF,0xFE,0xFF,0xFE, // '2' 25 | 0x7F,0xF9,0xFF,0xFB,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x87,0xFF,0x0F,0xFE,0x00,0x0C,0x00,0x18,0x00,0x36,0x00,0x6F,0xFF,0xCF,0xFF,0x00, // '3' 26 | 0x00,0x70,0x01,0xE0,0x0F,0xC0,0x3D,0x80,0xF3,0x03,0xC6,0x0E,0x0C,0x38,0x18,0xFF,0xFD,0xFF,0xF8,0x00,0xC0,0x01,0x80,0x03,0x00,0x06,0x00, // '4' 27 | 0xFF,0xFE,0xFF,0xFE,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xE0,0x00,0xFF,0xFC,0xFF,0xFC,0x00,0x0E,0x00,0x0E,0x00,0x0E,0xC0,0x0E,0xFF,0xFC,0x7F,0xF8, // '5' 28 | 0x7F,0xF0,0xFF,0xF0,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xE0,0x00,0xFF,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFC,0x7F,0xF8, // '6' 29 | 0xFF,0xE7,0xFF,0x80,0x0C,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x06,0x00,0x30,0x01,0x80,0x0C,0x00,0x60,0x03,0x00,0x18, // '7' 30 | 0x7F,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0x7F,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFC,0x7F,0xF8, // '8' 31 | 0x7F,0xFD,0xFF,0xFB,0x00,0x36,0x00,0x6C,0x00,0xD8,0x01,0xBF,0xFF,0x3F,0xFE,0x00,0x0C,0x00,0x18,0x00,0x30,0x00,0x6F,0xFF,0xCF,0xFF,0x00, // '9' 32 | 0xD8,0x00,0x00,0x03,0x60, // ':' 33 | 0xD8,0x00,0x00,0x03,0x6D,0xA0, // ';' 34 | 0x01,0x01,0x83,0xC3,0xC7,0x87,0x83,0x80,0xF0,0x3E,0x07,0x80,0xC0,0x20, // '<' 35 | 0xFF,0xEF,0xFE,0x00,0x00,0x00,0xFF,0xEF,0xFE, // '=' 36 | 0x80,0x60,0x3C,0x0F,0x81,0xE0,0x38,0x1C,0x1E,0x3C,0x78,0x38,0x10,0x00, // '>' 37 | 0xFF,0xF7,0xFF,0x80,0x0C,0x00,0x60,0x03,0x00,0x18,0x7F,0xC7,0xFE,0x30,0x01,0x80,0x00,0x00,0x00,0x03,0x00,0x18,0x00, // '?' 38 | 0x7F,0xFC,0xFF,0xFC,0xC0,0x0E,0xC3,0x8E,0xCF,0xCE,0xCC,0x6E,0xCC,0x6E,0xCC,0x6E,0xCF,0xFE,0xC7,0xFE,0xC0,0x00,0xC0,0x00,0xFF,0xFE,0x7F,0xFE, // '@' 39 | 0x7F,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFE,0xFF,0xFE,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E, // 'A' 40 | 0xFF,0xF8,0xFF,0xFC,0xC0,0x0C,0xC0,0x0C,0xC0,0x0C,0xE0,0x0C,0xFF,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFC,0xFF,0xFC, // 'B' 41 | 0x7F,0xFD,0xFF,0xFB,0x00,0x06,0x00,0x0C,0x00,0x18,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x03,0x00,0x06,0x00,0x0F,0xFF,0xCF,0xFF,0x80, // 'C' 42 | 0xFF,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFC,0xFF,0xFC, // 'D' 43 | 0xFF,0xFB,0xFF,0xEC,0x00,0x30,0x00,0xC0,0x03,0x00,0x0F,0xFE,0x3F,0xF8,0xC0,0x03,0x00,0x0C,0x00,0x30,0x00,0xFF,0xFB,0xFF,0xE0, // 'E' 44 | 0xFF,0xFB,0xFF,0xEC,0x00,0x30,0x00,0xC0,0x03,0x00,0x0F,0xFE,0x3F,0xF8,0xC0,0x03,0x00,0x0C,0x00,0x30,0x00,0xC0,0x03,0x00,0x00, // 'F' 45 | 0x7F,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x7E,0xC0,0x7E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFC,0x7F,0xF8, // 'G' 46 | 0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xFF,0xFE,0xFF,0xFE,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06,0xC0,0x06, // 'H' 47 | 0xDB,0x6D,0xB6,0xDB,0x6D,0x80, // 'I' 48 | 0x00,0x0C,0x00,0x18,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x03,0x00,0x06,0x00,0x0C,0x00,0x1B,0x00,0x36,0x00,0x6F,0xFF,0xCF,0xFF,0x00, // 'J' 49 | 0xC0,0x1D,0x80,0x73,0x01,0xC6,0x07,0x0C,0x1C,0x18,0x70,0x3F,0xC0,0x7F,0xC0,0xC1,0xC1,0x81,0x83,0x03,0x86,0x03,0x8C,0x03,0x98,0x03,0x80, // 'K' 50 | 0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xFF,0xFE,0xFF,0xFE, // 'L' 51 | 0xE0,0x07,0x78,0x07,0xBE,0x07,0xDB,0x83,0x6C,0xE3,0xB6,0x3B,0x9B,0x0F,0x8D,0x87,0x86,0xC1,0x83,0x60,0x41,0xB0,0x00,0xD8,0x00,0x6C,0x00,0x36,0x00,0x18, // 'M' 52 | 0xE0,0x0E,0xF0,0x0E,0xF8,0x0E,0xDC,0x0E,0xCE,0x0E,0xC7,0x0E,0xC3,0x0E,0xC3,0x8E,0xC1,0xCE,0xC0,0xEE,0xC0,0x7E,0xC0,0x3E,0xC0,0x1E,0xC0,0x0E, // 'N' 53 | 0x7F,0xFD,0xFF,0xFB,0x00,0x36,0x00,0x6C,0x00,0xD8,0x01,0xB0,0x03,0x60,0x06,0xC0,0x0D,0x80,0x1B,0x00,0x36,0x00,0x6F,0xFF,0xCF,0xFF,0x00, // 'O' 54 | 0xFF,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xFF,0xFC,0xFF,0xF8,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00, // 'P' 55 | 0x7F,0xFC,0x7F,0xFE,0x30,0x03,0x18,0x01,0x8C,0x00,0xC6,0x00,0x63,0x00,0x31,0x80,0x18,0xC0,0x0C,0x60,0x06,0x30,0x03,0x18,0x01,0x8F,0xFF,0xF3,0xFF,0xF8, // 'Q' 56 | 0xFF,0xFC,0xFF,0xFC,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0E,0xC0,0x0C,0xFF,0xFC,0xFF,0xF8,0xC0,0xE0,0xC0,0x70,0xC0,0x38,0xC0,0x18,0xC0,0x0E, // 'R' 57 | 0x7F,0xFD,0xFF,0xFB,0x00,0x36,0x00,0x0C,0x00,0x18,0x00,0x3F,0xFF,0x3F,0xFE,0x00,0x0C,0x00,0x18,0x00,0x36,0x00,0x6F,0xFF,0xCF,0xFF,0x00, // 'S' 58 | 0xFF,0xFE,0xFF,0xFE,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80, // 'T' 59 | 0xC0,0x0D,0x80,0x1B,0x00,0x36,0x00,0x6C,0x00,0xD8,0x01,0xB0,0x03,0x60,0x06,0xC0,0x0D,0x80,0x1B,0x00,0x36,0x00,0x6F,0xFF,0xCF,0xFF,0x00, // 'U' 60 | 0xE0,0x01,0xCC,0x00,0x31,0xC0,0x0E,0x18,0x01,0x81,0x80,0x70,0x38,0x0C,0x03,0x03,0x80,0x70,0xE0,0x06,0x18,0x00,0xE7,0x00,0x0C,0xC0,0x00,0xF8,0x00,0x1E,0x00,0x01,0x80,0x00, // 'V' 61 | 0xC0,0x70,0x1D,0xC0,0xF0,0x31,0x81,0xE0,0x63,0x07,0xC1,0x87,0x0D,0xC3,0x06,0x39,0x8E,0x0E,0x63,0x18,0x0C,0xC3,0x30,0x1B,0x86,0xE0,0x3E,0x0F,0x80,0x3C,0x0F,0x00,0x78,0x1E,0x00,0xE0,0x38,0x00,0xC0,0x30,0x00, // 'W' 62 | 0xE0,0x1C,0xE0,0x70,0xE1,0xC0,0xE7,0x00,0xEC,0x00,0xF8,0x01,0xE0,0x03,0xC0,0x0F,0xC0,0x39,0xC0,0x61,0xC1,0xC1,0x87,0x01,0x9C,0x03,0x80, // 'X' 63 | 0xF0,0x07,0x18,0x06,0x0E,0x07,0x03,0x87,0x00,0xE7,0x00,0x3B,0x00,0x1F,0x80,0x07,0x80,0x01,0x80,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00, // 'Y' 64 | 0xFF,0xFD,0xFF,0xF8,0x00,0x70,0x03,0xC0,0x0F,0x00,0x38,0x00,0xE0,0x03,0x80,0x0E,0x00,0x78,0x01,0xE0,0x07,0x00,0x0F,0xFF,0xDF,0xFF,0x80, // 'Z' 65 | 0xF7,0xB1,0x8C,0x63,0x18,0xC6,0x31,0x8F,0x78, // '[' 66 | 0x80,0x18,0x03,0x80,0x38,0x03,0x80,0x30,0x03,0x00,0x30,0x07,0x00,0x70,0x07,0x00,0x60,0x04,0x00,0x80, // '\' 67 | 0xEE,0x66,0x66,0x66,0x66,0x66,0xEE, // ']' 68 | 0x00, // '^' 69 | 0xFF,0xFD,0xFF,0xF8, // '_' 70 | 0xCC,0xE0, // '`' 71 | 0xFF,0xC7,0xFF,0x3F,0xFC,0x00,0x60,0x03,0x7F,0xFB,0xFF,0xD8,0x06,0xC0,0x36,0x01,0xBF,0xFC,0xFF,0xE0, // 'a' 72 | 0xC0,0x06,0x00,0x30,0x01,0xFF,0x8F,0xFE,0x7F,0xFB,0x00,0xD8,0x06,0xC0,0x36,0x01,0xB0,0x0D,0x80,0x6C,0x03,0x7F,0xFB,0xFF,0x80, // 'b' 73 | 0x3F,0xF7,0xFF,0xBF,0xFD,0x80,0x0C,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x06,0x00,0x3F,0xFC,0xFF,0xE0, // 'c' 74 | 0x00,0x30,0x01,0x80,0x0C,0x7F,0xE7,0xFF,0x7F,0xFB,0x80,0xDC,0x06,0xE0,0x37,0x01,0xB8,0x0D,0xC0,0x6E,0x03,0x3F,0xF8,0xFF,0xC0, // 'd' 75 | 0x3F,0xC7,0xFF,0x3F,0xFD,0x80,0x6C,0x03,0x7F,0xFB,0xFF,0xD8,0x00,0xC0,0x06,0x00,0x3F,0xFC,0xFF,0xE0, // 'e' 76 | 0x7E,0xFE,0xC0,0xFE,0xFE,0xFE,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0, // 'f' 77 | 0x3F,0xC7,0xFF,0x3F,0xFD,0x80,0xEC,0x07,0x60,0x3B,0x01,0xD8,0x0E,0xC0,0x76,0x03,0xBF,0xFC,0xFF,0xE0,0x07,0x00,0x38,0xFF,0xC7,0xFC,0x3F,0xC0, // 'g' 78 | 0xC0,0x06,0x00,0x30,0x01,0xFF,0x8F,0xFE,0x7F,0xFB,0x00,0xD8,0x06,0xC0,0x36,0x01,0xB0,0x0D,0x80,0x6C,0x03,0x60,0x1B,0x00,0xC0, // 'h' 79 | 0xD8,0x6D,0xB6,0xDB,0x6D,0xB0, // 'i' 80 | 0x03,0x01,0x80,0x00,0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x80,0xC0,0x60,0x30,0x18,0x0C,0x06,0x03,0x7F,0xBF,0x9F,0x80, // 'j' 81 | 0xC0,0x06,0x00,0x30,0x01,0x80,0xEC,0x0E,0x60,0xE3,0x0E,0x18,0xE0,0xFE,0x07,0xF0,0x31,0xC1,0x87,0x0C,0x1C,0x60,0x73,0x01,0xC0, // 'k' 82 | 0xC3,0x0C,0x30,0xC3,0x0C,0x30,0xC3,0x0C,0x30,0xC3,0xE7,0x80, // 'l' 83 | 0xFF,0xFF,0x1F,0xFF,0xF3,0xFF,0xFE,0x60,0x60,0xEC,0x0C,0x1D,0x81,0x83,0xB0,0x30,0x76,0x06,0x0E,0xC0,0xC1,0xD8,0x18,0x3B,0x03,0x07,0x60,0x60,0xE0, // 'm' 84 | 0xFF,0xC7,0xFF,0x3F,0xFD,0x80,0x6C,0x03,0x60,0x1B,0x00,0xD8,0x06,0xC0,0x36,0x01,0xB0,0x0D,0x80,0x60, // 'n' 85 | 0x3F,0xC7,0xFF,0x3F,0xFD,0x80,0x6C,0x03,0x60,0x1B,0x00,0xD8,0x06,0xC0,0x36,0x01,0xBF,0xFC,0xFF,0xC0, // 'o' 86 | 0xFF,0xC7,0xFF,0x3F,0xFD,0x80,0x6C,0x03,0x60,0x1B,0x00,0xD8,0x06,0xC0,0x36,0x01,0xBF,0xFD,0xFF,0xCC,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x00, // 'p' 87 | 0x3F,0xF3,0xFF,0xBF,0xFD,0xC0,0x6E,0x03,0x70,0x1B,0x80,0xDC,0x06,0xE0,0x37,0x01,0x9F,0xFC,0xFF,0xE0,0x03,0x00,0x18,0x00,0xC0,0x06,0x00,0x30, // 'q' 88 | 0x3F,0x9F,0xEF,0xFB,0x00,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0x00, // 'r' 89 | 0x3F,0xC7,0xFF,0x3F,0xFD,0x80,0x0C,0x00,0x7F,0xF1,0xFF,0x80,0x06,0x00,0x36,0x01,0xBF,0xFC,0xFF,0xC0, // 's' 90 | 0xC0,0xC0,0xC0,0xFE,0xFE,0xFE,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFE,0x7E, // 't' 91 | 0xC0,0x36,0x01,0xB0,0x0D,0x80,0x6C,0x03,0x60,0x1B,0x00,0xD8,0x06,0xC0,0x36,0x01,0xBF,0xFC,0xFF,0xC0, // 'u' 92 | 0xE0,0x06,0x70,0x0E,0x30,0x0C,0x38,0x1C,0x18,0x18,0x1C,0x38,0x0C,0x30,0x0E,0x60,0x06,0xE0,0x07,0xC0,0x03,0xC0,0x01,0x80, // 'v' 93 | 0xC0,0xE0,0x76,0x07,0x03,0x18,0x3C,0x18,0xC3,0xE1,0xC7,0x1B,0x8C,0x19,0xCC,0xE0,0xCC,0x76,0x07,0xE1,0xB0,0x1F,0x0F,0x80,0xF0,0x78,0x03,0x81,0xC0,0x18,0x0E,0x00, // 'w' 94 | 0xE0,0x73,0x07,0x1C,0x30,0x73,0x81,0xF8,0x07,0x80,0x3C,0x03,0xE0,0x19,0x81,0xCE,0x1C,0x39,0xC0,0xE0, // 'x' 95 | 0xC0,0x76,0x03,0xB0,0x1D,0x80,0xEC,0x07,0x60,0x3B,0x01,0xD8,0x0E,0xC0,0x76,0x03,0xBF,0xFC,0xFF,0xE0,0x07,0x00,0x38,0xFF,0xC7,0xFC,0x3F,0xC0, // 'y' 96 | 0xFF,0xF7,0xFF,0xBF,0xFC,0x01,0xC0,0x3C,0x03,0xC0,0x38,0x03,0x80,0x78,0x07,0x00,0x3F,0xFD,0xFF,0xE0, // 'z' 97 | 0x39,0xE7,0x1C,0x71,0xCC,0x38,0x71,0xC7,0x1C,0x38,0xE0, // '{' 98 | 0xDB,0x6D,0xB6,0xDB,0x6D,0xB6,0xDB,0x00, // '|' 99 | 0xE7,0x18,0xC6,0x38,0xC6,0x63,0x18,0xCE,0x60 // '}' 100 | }; 101 | const GFXglyph Orbitron_Medium_20Glyphs[] PROGMEM = { 102 | // bitmapOffset, width, height, xAdvance, xOffset, yOffset 103 | { 0, 1, 1, 7, 0, 0 }, // ' ' 104 | { 1, 3, 14, 5, 1, -14 }, // '!' 105 | { 7, 6, 3, 8, 1, -14 }, // '"' 106 | { 10, 15, 14, 17, 1, -14 }, // '#' 107 | { 37, 15, 19, 17, 1, -17 }, // '$' 108 | { 73, 18, 14, 20, 1, -14 }, // '%' 109 | { 105, 18, 14, 20, 1, -14 }, // '&' 110 | { 137, 3, 3, 5, 1, -14 }, // ''' 111 | { 139, 4, 14, 7, 1, -14 }, // '(' 112 | { 146, 5, 14, 7, 1, -14 }, // ')' 113 | { 155, 9, 8, 11, 1, -14 }, // '*' 114 | { 164, 9, 8, 10, 0, -10 }, // '+' 115 | { 173, 3, 5, 5, 1, -2 }, // ',' 116 | { 175, 9, 2, 11, 1, -7 }, // '-' 117 | { 178, 3, 2, 5, 1, -2 }, // '.' 118 | { 179, 11, 14, 11, 0, -14 }, // '/' 119 | { 199, 16, 14, 18, 1, -14 }, // '0' 120 | { 227, 8, 14, 9, 0, -14 }, // '1' 121 | { 241, 16, 14, 18, 1, -14 }, // '2' 122 | { 269, 15, 14, 18, 1, -14 }, // '3' 123 | { 296, 15, 14, 16, 0, -14 }, // '4' 124 | { 323, 16, 14, 18, 1, -14 }, // '5' 125 | { 351, 16, 14, 17, 1, -14 }, // '6' 126 | { 379, 13, 14, 14, 0, -14 }, // '7' 127 | { 402, 16, 14, 18, 1, -14 }, // '8' 128 | { 430, 15, 14, 18, 1, -14 }, // '9' 129 | { 457, 3, 12, 5, 1, -12 }, // ':' 130 | { 462, 3, 15, 5, 1, -12 }, // ';' 131 | { 468, 9, 12, 10, 0, -12 }, // '<' 132 | { 482, 12, 6, 14, 1, -9 }, // '=' 133 | { 491, 9, 12, 11, 1, -12 }, // '>' 134 | { 505, 13, 14, 15, 1, -14 }, // '?' 135 | { 528, 16, 14, 18, 1, -14 }, // '@' 136 | { 556, 16, 14, 18, 1, -14 }, // 'A' 137 | { 584, 16, 14, 18, 1, -14 }, // 'B' 138 | { 612, 15, 14, 17, 1, -14 }, // 'C' 139 | { 639, 16, 14, 18, 1, -14 }, // 'D' 140 | { 667, 14, 14, 16, 1, -14 }, // 'E' 141 | { 692, 14, 14, 15, 1, -14 }, // 'F' 142 | { 717, 16, 14, 18, 1, -14 }, // 'G' 143 | { 745, 16, 14, 18, 1, -14 }, // 'H' 144 | { 773, 3, 14, 5, 1, -14 }, // 'I' 145 | { 779, 15, 14, 17, 0, -14 }, // 'J' 146 | { 806, 15, 14, 17, 1, -14 }, // 'K' 147 | { 833, 16, 14, 17, 1, -14 }, // 'L' 148 | { 861, 17, 14, 20, 1, -14 }, // 'M' 149 | { 891, 16, 14, 18, 1, -14 }, // 'N' 150 | { 919, 15, 14, 18, 1, -14 }, // 'O' 151 | { 946, 16, 14, 17, 1, -14 }, // 'P' 152 | { 974, 17, 14, 19, 1, -14 }, // 'Q' 153 | { 1004, 16, 14, 18, 1, -14 }, // 'R' 154 | { 1032, 15, 14, 17, 1, -14 }, // 'S' 155 | { 1059, 16, 14, 16, 0, -14 }, // 'T' 156 | { 1087, 15, 14, 18, 1, -14 }, // 'U' 157 | { 1114, 19, 14, 21, 1, -14 }, // 'V' 158 | { 1148, 23, 14, 25, 1, -14 }, // 'W' 159 | { 1189, 15, 14, 17, 1, -14 }, // 'X' 160 | { 1216, 17, 14, 17, 0, -14 }, // 'Y' 161 | { 1246, 15, 14, 17, 1, -14 }, // 'Z' 162 | { 1273, 5, 14, 7, 1, -14 }, // '[' 163 | { 1282, 11, 14, 11, 0, -14 }, // '\' 164 | { 1302, 4, 14, 7, 1, -14 }, // ']' 165 | { 1309, 1, 1, 1, 0, 0 }, // '^' 166 | { 1310, 15, 2, 18, 1, 0 }, // '_' 167 | { 1314, 4, 3, 5, 1, -20 }, // '`' 168 | { 1316, 13, 12, 15, 1, -12 }, // 'a' 169 | { 1336, 13, 15, 14, 1, -15 }, // 'b' 170 | { 1361, 13, 12, 15, 1, -12 }, // 'c' 171 | { 1381, 13, 15, 14, 0, -15 }, // 'd' 172 | { 1406, 13, 12, 15, 1, -12 }, // 'e' 173 | { 1426, 8, 15, 9, 1, -15 }, // 'f' 174 | { 1441, 13, 17, 15, 1, -12 }, // 'g' 175 | { 1469, 13, 15, 14, 1, -15 }, // 'h' 176 | { 1494, 3, 15, 5, 1, -15 }, // 'i' 177 | { 1500, 9, 20, 6, -4, -15 }, // 'j' 178 | { 1523, 13, 15, 14, 1, -15 }, // 'k' 179 | { 1548, 6, 15, 7, 1, -15 }, // 'l' 180 | { 1560, 19, 12, 21, 1, -12 }, // 'm' 181 | { 1589, 13, 12, 15, 1, -12 }, // 'n' 182 | { 1609, 13, 12, 15, 1, -12 }, // 'o' 183 | { 1629, 13, 17, 14, 1, -12 }, // 'p' 184 | { 1657, 13, 17, 14, 0, -12 }, // 'q' 185 | { 1685, 10, 12, 11, 1, -12 }, // 'r' 186 | { 1700, 13, 12, 15, 1, -12 }, // 's' 187 | { 1720, 8, 15, 9, 1, -15 }, // 't' 188 | { 1735, 13, 12, 15, 1, -12 }, // 'u' 189 | { 1755, 16, 12, 17, 0, -12 }, // 'v' 190 | { 1779, 21, 12, 22, 1, -12 }, // 'w' 191 | { 1811, 13, 12, 15, 1, -12 }, // 'x' 192 | { 1831, 13, 17, 15, 1, -12 }, // 'y' 193 | { 1859, 13, 12, 15, 1, -12 }, // 'z' 194 | { 1879, 6, 14, 7, 0, -14 }, // '{' 195 | { 1890, 3, 19, 5, 1, -17 }, // '|' 196 | { 1898, 5, 14, 7, 1, -14 } // '}' 197 | }; 198 | const GFXfont Orbitron_Medium_20 PROGMEM = { 199 | (uint8_t *)Orbitron_Medium_20Bitmaps,(GFXglyph *)Orbitron_Medium_20Glyphs,0x20, 0x7E, 20}; 200 | --------------------------------------------------------------------------------