diff --git a/examples/3. Projects/05-Spotify_api_example/05-Spotify_api_example.ino b/examples/3. Projects/05-Spotify_api_example/05-Spotify_api_example.ino new file mode 100644 index 0000000..0dcdc02 --- /dev/null +++ b/examples/3. Projects/05-Spotify_api_example/05-Spotify_api_example.ino @@ -0,0 +1,195 @@ +#include "Inkplate.h" + +#include +#include +#include +#include +#include + +#include "generatedUI.h" + +Inkplate display(INKPLATE_1BIT); + +char ssid[] = ""; +char password[] = ""; + +char clientId[] = ""; +char clientSecret[] = ""; + +#define SPOTIFY_REFRESH_TOKEN "" + +#define SPOTIFY_MARKET "IE" + + +char name[128]; +char title[128]; +char album[128]; +char url[128]; +int imgW; +bool playing; + +int elapsedTime = 0; +int totalTime = 0; +float elapsed = 0; + +#define FULLREFRESH 10 +int cnt = 0; + +const char *ntpServer = "pool.ntp.org"; +const long gmtOffset_sec = 3600; +const int daylightOffset_sec = 3600; + +WiFiClientSecure client; +ArduinoSpotify spotify(client, clientId, clientSecret, SPOTIFY_REFRESH_TOKEN); + +unsigned long delayBetweenRequests = 100; // Time between requests (1 minute) + +void setup() +{ + Serial.begin(115200); + display.begin(); + + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + + Serial.print("Connecting..."); + + // Wait for connection + int cnt = 0; + Serial.print(F("Waiting for WiFi to connect...")); + while ((WiFi.status() != WL_CONNECTED)) + { + Serial.print(F(".")); + delay(1000); + ++cnt; + + if (cnt == 20) + { + Serial.println("Can't connect to WIFI, restarting"); + delay(100); + ESP.restart(); + } + } + + Serial.print("Connected to "); + Serial.println(ssid); + Serial.print("IP address: "); + Serial.println(WiFi.localIP()); + + client.setCACert(spotify_server_cert); + + Serial.println("Refreshing Access Tokens"); + if (!spotify.refreshAccessToken()) + { + Serial.println("Failed to get access tokens"); + } + + configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); + + display.display(); +} + +void loop() +{ + if (!display.isConnected()) + { + Serial.println("Reconnecting..."); + delay(100); + if (!display.joinAP(ssid, password)) + ESP.restart(); + } + + CurrentlyPlaying currentlyPlaying = spotify.getCurrentlyPlaying(SPOTIFY_MARKET); + + if (!currentlyPlaying.error) + { + parsePlayingData(currentlyPlaying); + updateScreenContent(); + } + + delay(delayBetweenRequests); +} + +void parsePlayingData(CurrentlyPlaying currentlyPlaying) +{ + strcpy(name, currentlyPlaying.firstArtistName); + strcpy(title, currentlyPlaying.trackName); + strcpy(album, currentlyPlaying.albumName); + + playing = currentlyPlaying.isPlaying; + + int mn = 0; + for (int i = 1; i < currentlyPlaying.numImages; i++) + if (abs(currentlyPlaying.albumImages[i].width - 300) + abs(currentlyPlaying.albumImages[i].width - 300) < + abs(currentlyPlaying.albumImages[mn].width - 300) + abs(currentlyPlaying.albumImages[mn].width - 300)) + mn = i; + + imgW = currentlyPlaying.albumImages[mn].width; + strcpy(url, currentlyPlaying.albumImages[mn].url); + + elapsed = (float)currentlyPlaying.progressMs / (float)currentlyPlaying.duraitonMs; + elapsedTime = currentlyPlaying.progressMs / 1000; + totalTime = currentlyPlaying.duraitonMs / 1000; +} + +void updateScreenContent() +{ + display.clearDisplay(); + + line1_color = line2_color = playing; + triangle2_color = !playing; + + strncpy(text1_content, name, min((int)35, (int)strlen(name))); + strncpy(text2_content, title, min((int)35, (int)strlen(title))); + strncpy(text3_content, album, min((int)35, (int)strlen(album))); + + text1_content[min((int)35, (int)strlen(name))] = 0; + text2_content[min((int)35, (int)strlen(title))] = 0; + text3_content[min((int)35, (int)strlen(album))] = 0; + + if (strlen(name) >= 35) + strcat(text1_content, "..."); + if (strlen(title) >= 35) + strcat(text2_content, "..."); + if (strlen(album) >= 35) + strcat(text3_content, "..."); + + int16_t x1 = 0, y1 = 0; + uint16_t w = 0, h = 0; + + display.setFont(text1_font); + display.getTextBounds(text1_content, 0, 200, &x1, &y1, &w, &h); + text1_cursor_x = 400 - w / 2; + + display.setFont(text2_font); + display.getTextBounds(text2_content, 0, 200, &x1, &y1, &w, &h); + text2_cursor_x = 400 - w / 2; + + display.setFont(text3_font); + display.getTextBounds(text3_content, 0, 200, &x1, &y1, &w, &h); + text3_cursor_x = 400 - w / 2; + + display.drawJpegFromWeb(url, 400 - imgW / 2, 103, 1); + + circle2_center_x = elapsed * (730 - 70) + 70; + + digital_clock2_h = elapsedTime / 60; + digital_clock2_m = elapsedTime % 60; + + digital_clock5_h = totalTime / 60; + digital_clock5_m = totalTime % 60; + + struct tm timeinfo; + if (getLocalTime(&timeinfo)) + { + digital_clock4_h = timeinfo.tm_hour; + digital_clock4_m = timeinfo.tm_min; + } + + mainDraw(); + + if (cnt++ % FULLREFRESH == 0) + display.display(); + else + display.partialUpdate(); +} \ No newline at end of file diff --git a/examples/3. Projects/05-Spotify_api_example/Fonts/Roboto_Condensed_24.h b/examples/3. Projects/05-Spotify_api_example/Fonts/Roboto_Condensed_24.h new file mode 100644 index 0000000..2fac28b --- /dev/null +++ b/examples/3. Projects/05-Spotify_api_example/Fonts/Roboto_Condensed_24.h @@ -0,0 +1,199 @@ +// Created by http://oleddisplay.squix.ch/ Consider a donation +// In case of problems make sure that you are using the font file with the correct version! +const uint8_t Roboto_Condensed_24Bitmaps[] PROGMEM = { + + // Bitmap Data: + 0x00, // ' ' + 0xDB,0x6D,0xB6,0xDB,0x60,0x06,0xC0, // '!' + 0x94,0xA5,0x29,0x48, // '"' + 0x08,0x80,0x88,0x19,0x81,0x98,0xFF,0xEF,0xFE,0x11,0x01,0x10,0x33,0x03,0x30,0xFF,0xCF,0xFC,0x22,0x02,0x20,0x66,0x06,0x60,0x66,0x00, // '#' + 0x0C,0x01,0x80,0x30,0x0F,0x03,0xF0,0xE7,0x18,0x63,0x0C,0x60,0x0E,0x00,0xF0,0x0F,0x80,0x78,0x03,0x00,0x76,0x06,0x61,0xCC,0x31,0xFE,0x0F,0x00,0xC0,0x18,0x00, // '$' + 0x38,0x01,0x30,0x0C,0x44,0x31,0x18,0xC4,0xC3,0x12,0x04,0xD8,0x0E,0x40,0x03,0x00,0x0B,0xC0,0x69,0x81,0x66,0x0D,0x88,0x66,0x21,0x19,0x84,0x26,0x00,0x70, // '%' + 0x1E,0x01,0xF8,0x0C,0xC0,0xC3,0x06,0x10,0x19,0x80,0xD8,0x03,0x80,0x3C,0x03,0xF3,0x19,0x99,0x86,0xCC,0x3C,0x60,0xE1,0x87,0x0F,0xFC,0x1E,0x70, // '&' + 0xDB,0x6D,0x80, // ''' + 0x08,0x63,0x0C,0x61,0x86,0x30,0xC3,0x0C,0x30,0xC3,0x0C,0x30,0xC3,0x06,0x18,0x60,0xC3,0x06,0x08, // '(' + 0x83,0x04,0x18,0x30,0xC3,0x06,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x63,0x0C,0x31,0x84,0x30,0x80, // ')' + 0x0C,0x01,0x80,0x30,0x36,0xEF,0xFC,0x18,0x07,0x81,0x98,0x33,0x84,0x20, // '*' + 0x0C,0x01,0x80,0x30,0x06,0x00,0xC1,0xFF,0xBF,0xF0,0x60,0x0C,0x01,0x80,0x30,0x06,0x00, // '+' + 0x73,0x9C,0xC6,0x60, // ',' + 0xF7,0x80, // '-' + 0xD8, // '.' + 0x03,0x01,0x80,0x80,0xC0,0x60,0x20,0x30,0x18,0x08,0x0C,0x06,0x02,0x03,0x01,0x80,0x80,0xC0,0x60,0x60,0x00, // '/' + 0x1E,0x0F,0xC7,0x39,0x86,0x61,0xB0,0x6C,0x1B,0x06,0xC1,0xB0,0x6C,0x1B,0x06,0x61,0x98,0x67,0x38,0xFC,0x1E,0x00, // '0' + 0x0C,0xFB,0xF4,0xE1,0xC3,0x87,0x0E,0x1C,0x38,0x70,0xE1,0xC3,0x87,0x0E,0x1C, // '1' + 0x1E,0x0F,0xE1,0x8E,0x60,0xCC,0x18,0x03,0x00,0x60,0x18,0x03,0x00,0xC0,0x30,0x0E,0x03,0x80,0x60,0x18,0x07,0xFE,0xFF,0xC0, // '2' + 0x1E,0x1F,0xC6,0x3B,0x86,0xC1,0x80,0x60,0x38,0x7C,0x1F,0x00,0xE0,0x18,0x06,0xC1,0xB8,0x66,0x39,0xFC,0x1E,0x00, // '3' + 0x03,0x00,0xE0,0x1C,0x07,0x80,0xF0,0x36,0x06,0xC1,0x98,0x23,0x0C,0x63,0x0C,0x7F,0xEF,0xFC,0x06,0x00,0xC0,0x18,0x03,0x00, // '4' + 0x7F,0x1F,0xC6,0x01,0x80,0x60,0x30,0x0D,0xE3,0xFC,0xC3,0x00,0xE0,0x18,0x06,0xC1,0xB0,0xEE,0x31,0xFC,0x3C,0x00, // '5' + 0x0E,0x0F,0x87,0x01,0x80,0xC0,0x30,0x0D,0xE3,0xFC,0xE3,0x30,0xEC,0x1B,0x06,0xC1,0xB0,0xEE,0x31,0xFC,0x3C,0x00, // '6' + 0xFF,0xDF,0xF8,0x06,0x00,0xC0,0x18,0x06,0x00,0xC0,0x30,0x06,0x00,0xC0,0x30,0x06,0x00,0xC0,0x30,0x06,0x01,0x80,0x30,0x00, // '7' + 0x1E,0x07,0xE1,0xCE,0x30,0xC6,0x18,0xC3,0x1C,0xE1,0xF8,0x3F,0x0E,0x71,0x86,0x70,0xEE,0x1C,0xC3,0x18,0x61,0xF8,0x1E,0x00, // '8' + 0x1E,0x0F,0xC6,0x31,0x86,0xC1,0xB0,0x6C,0x1B,0x06,0x61,0x98,0xE7,0xF8,0x76,0x01,0x80,0xC0,0x70,0xF8,0x38,0x00, // '9' + 0xD8,0x00,0x00,0x03,0x60, // ':' + 0x31,0x80,0x00,0x00,0x00,0x00,0x1C,0xE7,0x31,0x98, // ';' + 0x01,0x03,0x83,0xC7,0x8F,0x06,0x03,0xC0,0x78,0x0F,0x03,0x80,0x40, // '<' + 0xFF,0x7F,0x80,0x00,0x00,0x07,0xFB,0xFC, // '=' + 0x80,0x60,0x3C,0x07,0x80,0xF0,0x18,0x3C,0x78,0xF0,0x60,0x20,0x00, // '>' + 0x3C,0x3F,0x39,0xD8,0x60,0x30,0x18,0x1C,0x0C,0x0C,0x0E,0x06,0x03,0x01,0x80,0x00,0x00,0x30,0x18,0x00, // '?' + 0x03,0xE0,0x07,0xFC,0x07,0x07,0x07,0x00,0xC3,0x00,0x63,0x0F,0x11,0x8F,0xCC,0x8E,0x46,0xC6,0x21,0x63,0x10,0xB1,0x08,0x59,0x8C,0x2C,0xC6,0x36,0x63,0x1B,0x19,0x99,0x8F,0x7C,0x63,0x3C,0x30,0x00,0x0C,0x00,0x07,0x04,0x01,0xFE,0x00,0x3E,0x00, // '@' + 0x06,0x00,0x30,0x03,0xC0,0x1E,0x00,0xF0,0x0C,0xC0,0x66,0x03,0x30,0x30,0xC1,0x86,0x0C,0x30,0xFF,0xC7,0xFE,0x30,0x33,0x81,0xD8,0x06,0xC0,0x30, // 'A' + 0xFE,0x1F,0xF3,0x0E,0x60,0xCC,0x19,0x83,0x30,0xE7,0xF8,0xFF,0x18,0x33,0x07,0x60,0x6C,0x0D,0x83,0xB0,0x67,0xFC,0xFE,0x00, // 'B' + 0x1F,0x03,0xF8,0x71,0xCE,0x0C,0xC0,0xEC,0x06,0xC0,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x06,0xC0,0xEE,0x0C,0x61,0xC7,0xF8,0x1F,0x00, // 'C' + 0xFE,0x1F,0xE3,0x0E,0x60,0xEC,0x0D,0x81,0xB0,0x36,0x06,0xC0,0xD8,0x1B,0x03,0x60,0x6C,0x0D,0x83,0xB0,0xE7,0xF8,0xFE,0x00, // 'D' + 0xFF,0xBF,0xEC,0x03,0x00,0xC0,0x30,0x0C,0x03,0xFC,0xFF,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0xFE,0xFF,0x80, // 'E' + 0xFF,0xBF,0xEC,0x03,0x00,0xC0,0x30,0x0C,0x03,0xFC,0xFF,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x00, // 'F' + 0x1F,0x83,0xFC,0x70,0xE6,0x06,0x60,0x6E,0x00,0xE0,0x0E,0x00,0xE0,0x0E,0x3E,0xE3,0xEE,0x06,0x60,0x66,0x06,0x70,0x63,0xFE,0x0F,0x80, // 'G' + 0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6F,0xFE,0xFF,0xEC,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x60, // 'H' + 0xDB,0x6D,0xB6,0xDB,0x6D,0xB6,0xC0, // 'I' + 0x01,0x80,0x60,0x18,0x06,0x01,0x80,0x60,0x18,0x06,0x01,0x80,0x60,0x18,0x06,0xC1,0xB0,0xEE,0x31,0xFC,0x3C,0x00, // 'J' + 0xC0,0xEC,0x18,0xC3,0x8C,0x70,0xC6,0x0C,0xC0,0xDC,0x0F,0x80,0xFC,0x0E,0xC0,0xEE,0x0C,0x70,0xC3,0x0C,0x38,0xC1,0x8C,0x1C,0xC0,0xE0, // 'K' + 0xC0,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0xFE,0xFF,0x80, // 'L' + 0xE0,0x1D,0xC0,0x3B,0x80,0x77,0x81,0xEF,0x03,0xDE,0x07,0xB6,0x1B,0x6C,0x36,0xD8,0x6D,0x99,0x9B,0x33,0x36,0x66,0x6C,0x78,0xD8,0xF1,0xB1,0xE3,0x61,0x86,0xC3,0x0C, // 'M' + 0xC0,0x6E,0x06,0xE0,0x6F,0x06,0xF0,0x6D,0x86,0xDC,0x6C,0xC6,0xC6,0x6C,0x66,0xC3,0x6C,0x36,0xC1,0xEC,0x1E,0xC0,0xEC,0x0E,0xC0,0x60, // 'N' + 0x0F,0x01,0xFE,0x1C,0x38,0xC0,0xC6,0x06,0x60,0x3B,0x00,0xD8,0x06,0xC0,0x36,0x01,0xB0,0x0D,0x80,0xE6,0x06,0x30,0x31,0xC3,0x87,0xF8,0x0F,0x80, // 'O' + 0xFE,0x1F,0xF3,0x07,0x60,0x6C,0x0D,0x81,0xB0,0x36,0x06,0xC1,0xDF,0xF3,0xFC,0x60,0x0C,0x01,0x80,0x30,0x06,0x00,0xC0,0x00, // 'P' + 0x1F,0x01,0xFE,0x1C,0x38,0xC0,0xCE,0x06,0x60,0x3B,0x01,0xD8,0x0E,0xC0,0x76,0x03,0xB0,0x1D,0x80,0xEE,0x06,0x30,0x31,0xC3,0x87,0xF8,0x1F,0xC0,0x07,0x00,0x1C,0x00,0x40, // 'Q' + 0xFE,0x1F,0xF3,0x06,0x60,0xEC,0x0D,0x81,0xB0,0x76,0x1C,0xFF,0x9F,0xC3,0x1C,0x61,0x8C,0x31,0x83,0x30,0x66,0x06,0xC0,0xC0, // 'R' + 0x1E,0x0F,0xF1,0x86,0x70,0x6C,0x0D,0xC0,0x18,0x03,0xE0,0x1F,0x00,0xF0,0x07,0x00,0x6C,0x0D,0x81,0x98,0x73,0xFC,0x1F,0x00, // 'S' + 0xFF,0xEF,0xFE,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x00,0xC0,0x0C,0x00, // 'T' + 0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6C,0x06,0xC0,0x6E,0x0E,0x71,0xC7,0xFC,0x1F,0x00, // 'U' + 0xE0,0x39,0x80,0xC6,0x03,0x1C,0x1C,0x30,0x60,0xC1,0x83,0x06,0x06,0x30,0x18,0xC0,0x63,0x00,0xD8,0x03,0x60,0x0D,0x80,0x36,0x00,0x70,0x01,0xC0,0x07,0x00, // 'V' + 0xC1,0x83,0xB0,0x70,0xCC,0x1C,0x31,0x87,0x0C,0x63,0xC3,0x18,0xD1,0xC6,0x36,0x61,0x89,0x98,0x36,0x66,0x0D,0x89,0x83,0x63,0x60,0xD0,0xF0,0x34,0x3C,0x07,0x07,0x01,0xC1,0xC0,0x70,0x70,0x18,0x18,0x00, // 'W' + 0xE0,0x66,0x0E,0x70,0xC3,0x1C,0x39,0x81,0xB0,0x1F,0x00,0xE0,0x0E,0x00,0xE0,0x1F,0x01,0xB8,0x39,0x83,0x1C,0x70,0xC6,0x0E,0xE0,0x60, // 'X' + 0xE0,0x33,0x03,0x9C,0x18,0x61,0xC3,0x8C,0x0C,0x60,0x66,0x01,0xB0,0x0F,0x00,0x38,0x01,0x80,0x0C,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x06,0x00, // 'Y' + 0xFF,0xCF,0xFC,0x00,0xC0,0x18,0x03,0x80,0x30,0x06,0x00,0x60,0x0C,0x01,0xC0,0x18,0x03,0x80,0x30,0x06,0x00,0xE0,0x0F,0xFE,0xFF,0xE0, // 'Z' + 0xF7,0xB1,0x8C,0x63,0x18,0xC6,0x31,0x8C,0x63,0x18,0xC6,0x31,0x8C,0x63,0xDE, // '[' + 0xC0,0x60,0x30,0x0C,0x06,0x03,0x00,0xC0,0x60,0x30,0x0C,0x06,0x03,0x00,0xC0,0x60,0x30,0x0C,0x06,0x03,0x80, // '\' + 0xF7,0x8C,0x63,0x18,0xC6,0x31,0x8C,0x63,0x18,0xC6,0x31,0x8C,0x63,0x1B,0xDE, // ']' + 0x10,0x38,0x38,0x28,0x6C,0x6C,0xC6,0xC6, // '^' + 0xFF,0xBF,0xE0, // '_' + 0xE1,0xC3,0x80, // '`' + 0x3C,0x3F,0x30,0xD8,0x60,0x31,0xF9,0xFD,0xC6,0xC3,0x61,0xB1,0xDF,0xE7,0xB0, // 'a' + 0xC0,0x30,0x0C,0x03,0x00,0xC0,0x37,0x8F,0xF3,0x8C,0xC3,0xB0,0x6C,0x1B,0x06,0xC1,0xB0,0x6C,0x3B,0x8C,0xFF,0x37,0x80, // 'b' + 0x1E,0x1F,0xC6,0x3B,0x06,0xC1,0xB0,0x0C,0x03,0x00,0xC0,0x30,0x66,0x39,0xFC,0x1E,0x00, // 'c' + 0x01,0x80,0x60,0x18,0x06,0x01,0x8F,0x67,0xF9,0x8E,0xE1,0xB0,0x6C,0x1B,0x06,0xC1,0xB0,0x6E,0x19,0x8E,0x7F,0x8F,0x60, // 'd' + 0x1E,0x1F,0xC6,0x3B,0x06,0xC1,0xBF,0xEF,0xFB,0x00,0xC0,0x30,0x06,0x19,0xFE,0x1E,0x00, // 'e' + 0x1E,0x3E,0x30,0x30,0x30,0xFC,0xFC,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, // 'f' + 0x3D,0x9F,0xE6,0x3B,0x86,0xC1,0xB0,0x6C,0x1B,0x06,0xC1,0xB8,0x66,0x39,0xFE,0x3D,0x80,0x60,0x19,0x8E,0x7F,0x07,0x80, // 'g' + 0xC0,0x60,0x30,0x18,0x0C,0x06,0xF3,0xFD,0xC6,0xC3,0x61,0xB0,0xD8,0x6C,0x36,0x1B,0x0D,0x86,0xC3,0x61,0x80, // 'h' + 0xD8,0x0D,0xB6,0xDB,0x6D,0xB6,0xC0, // 'i' + 0x63,0x80,0x07,0x39,0xCE,0x73,0x9C,0xE7,0x39,0xCE,0x73,0x9C,0xCE,0x60, // 'j' + 0xC0,0x30,0x0C,0x03,0x00,0xC0,0x31,0xCC,0x63,0x30,0xDC,0x36,0x0F,0x03,0xE0,0xF8,0x33,0x0C,0xE3,0x18,0xC7,0x30,0xE0, // 'k' + 0xDB,0x6D,0xB6,0xDB,0x6D,0xB6,0xD8, // 'l' + 0x9C,0x79,0xFD,0xFB,0x1E,0x36,0x18,0x6C,0x30,0xD8,0x61,0xB0,0xC3,0x61,0x86,0xC3,0x0D,0x86,0x1B,0x0C,0x36,0x18,0x6C,0x30,0xC0, // 'm' + 0xDE,0x7F,0xB8,0xD8,0x6C,0x36,0x1B,0x0D,0x86,0xC3,0x61,0xB0,0xD8,0x6C,0x30, // 'n' + 0x1E,0x0F,0xE1,0x8E,0x70,0xEC,0x0D,0x81,0xB0,0x36,0x06,0xC0,0xDC,0x39,0x86,0x3F,0x81,0xE0, // 'o' + 0xDE,0x3F,0xCC,0x33,0x0E,0xC1,0xB0,0x6C,0x1B,0x06,0xC1,0xB0,0xEC,0x33,0xFC,0xDE,0x30,0x0C,0x03,0x00,0xC0,0x30,0x00, // 'p' + 0x3D,0x9F,0xE6,0x3B,0x86,0xC1,0xB0,0x6C,0x1B,0x06,0xC1,0xB8,0x66,0x39,0xFE,0x3D,0x80,0x60,0x18,0x06,0x01,0x80,0x60, // 'q' + 0xDD,0xFB,0x87,0x0C,0x18,0x30,0x60,0xC1,0x83,0x06,0x0C,0x00, // 'r' + 0x3E,0x1F,0xC6,0x31,0x86,0x60,0x1E,0x01,0xE0,0x1C,0x03,0xB0,0x6E,0x39,0xFC,0x3E,0x00, // 's' + 0x30,0x60,0xC7,0xEF,0xC6,0x0C,0x18,0x30,0x60,0xC1,0x83,0x06,0x0F,0x0E, // 't' + 0xC3,0x61,0xB0,0xD8,0x6C,0x36,0x1B,0x0D,0x86,0xC3,0x61,0xB1,0xDF,0xE7,0xB0, // 'u' + 0xE1,0xCC,0x31,0x86,0x30,0xC3,0x30,0x66,0x0C,0xC0,0x90,0x1E,0x03,0xC0,0x78,0x06,0x00,0xC0, // 'v' + 0xC3,0x0D,0x86,0x1B,0x1C,0x33,0x3C,0xC6,0x79,0x8C,0xF3,0x1B,0x26,0x16,0x68,0x3C,0xF0,0x70,0xE0,0xE1,0xC0,0xC3,0x01,0x86,0x00, // 'w' + 0xC3,0x98,0xC6,0x60,0xD8,0x3C,0x07,0x01,0x80,0x70,0x3C,0x1D,0x86,0x73,0x8C,0xC3,0x80, // 'x' + 0xE1,0xCC,0x31,0x86,0x39,0xC3,0x30,0x66,0x0C,0xC0,0xF0,0x1E,0x03,0xC0,0x38,0x06,0x00,0xC0,0x18,0x02,0x00,0xC0,0x78,0x0E,0x00, // 'y' + 0xFF,0x3F,0xC0,0x30,0x18,0x0E,0x03,0x01,0x80,0xE0,0x30,0x18,0x06,0x03,0xFE,0xFF,0x80, // 'z' + 0x08,0x38,0xC1,0x83,0x06,0x0C,0x18,0x30,0x61,0x87,0x0E,0x0C,0x0C,0x18,0x30,0x60,0xC1,0x83,0x03,0x03,0x00, // '{' + 0xDB,0x6D,0xB6,0xDB,0x6D,0xB6,0xDB,0x60, // '|' + 0x41,0xC1,0xC1,0x83,0x06,0x0C,0x18,0x30,0x60,0x60,0xE1,0xC3,0x0C,0x18,0x30,0x60,0xC1,0x83,0x0C,0x30,0x00 // '}' +}; +const GFXglyph Roboto_Condensed_24Glyphs[] PROGMEM = { +// bitmapOffset, width, height, xAdvance, xOffset, yOffset + { 0, 1, 1, 7, 0, 0 }, // ' ' + { 1, 3, 17, 7, 2, -17 }, // '!' + { 8, 5, 6, 9, 2, -18 }, // '"' + { 12, 12, 17, 14, 2, -17 }, // '#' + { 38, 11, 22, 13, 1, -20 }, // '$' + { 69, 14, 17, 16, 1, -17 }, // '%' + { 99, 13, 17, 14, 1, -17 }, // '&' + { 127, 3, 6, 5, 1, -18 }, // ''' + { 130, 6, 25, 9, 2, -19 }, // '(' + { 149, 6, 25, 9, 1, -19 }, // ')' + { 168, 11, 10, 11, 0, -17 }, // '*' + { 182, 11, 12, 13, 1, -14 }, // '+' + { 199, 5, 6, 6, 0, -2 }, // ',' + { 203, 5, 2, 7, 1, -8 }, // '-' + { 205, 3, 2, 7, 2, -2 }, // '.' + { 206, 9, 18, 10, 0, -17 }, // '/' + { 227, 10, 17, 13, 1, -17 }, // '0' + { 249, 7, 17, 13, 2, -17 }, // '1' + { 264, 11, 17, 13, 1, -17 }, // '2' + { 288, 10, 17, 13, 1, -17 }, // '3' + { 310, 11, 17, 13, 1, -17 }, // '4' + { 334, 10, 17, 13, 2, -17 }, // '5' + { 356, 10, 17, 13, 2, -17 }, // '6' + { 378, 11, 17, 13, 1, -17 }, // '7' + { 402, 11, 17, 13, 1, -17 }, // '8' + { 426, 10, 17, 13, 1, -17 }, // '9' + { 448, 3, 12, 7, 2, -12 }, // ':' + { 453, 5, 16, 6, 0, -12 }, // ';' + { 463, 9, 11, 12, 1, -13 }, // '<' + { 476, 9, 7, 13, 2, -12 }, // '=' + { 484, 9, 11, 12, 2, -13 }, // '>' + { 497, 9, 17, 11, 1, -17 }, // '?' + { 517, 17, 22, 19, 1, -17 }, // '@' + { 564, 13, 17, 15, 1, -17 }, // 'A' + { 592, 11, 17, 14, 2, -17 }, // 'B' + { 616, 12, 17, 15, 2, -17 }, // 'C' + { 642, 11, 17, 15, 2, -17 }, // 'D' + { 666, 10, 17, 13, 2, -17 }, // 'E' + { 688, 10, 17, 13, 2, -17 }, // 'F' + { 710, 12, 17, 15, 1, -17 }, // 'G' + { 736, 12, 17, 16, 2, -17 }, // 'H' + { 762, 3, 17, 7, 2, -17 }, // 'I' + { 769, 10, 17, 13, 1, -17 }, // 'J' + { 791, 12, 17, 14, 2, -17 }, // 'K' + { 817, 10, 17, 12, 2, -17 }, // 'L' + { 839, 15, 17, 19, 2, -17 }, // 'M' + { 871, 12, 17, 16, 2, -17 }, // 'N' + { 897, 13, 17, 15, 1, -17 }, // 'O' + { 925, 11, 17, 14, 2, -17 }, // 'P' + { 949, 13, 20, 15, 1, -17 }, // 'Q' + { 982, 11, 17, 14, 2, -17 }, // 'R' + { 1006, 11, 17, 13, 1, -17 }, // 'S' + { 1030, 12, 17, 14, 1, -17 }, // 'T' + { 1056, 12, 17, 14, 1, -17 }, // 'U' + { 1082, 14, 17, 14, 0, -17 }, // 'V' + { 1112, 18, 17, 19, 1, -17 }, // 'W' + { 1151, 12, 17, 14, 1, -17 }, // 'X' + { 1177, 13, 17, 14, 0, -17 }, // 'Y' + { 1205, 12, 17, 14, 1, -17 }, // 'Z' + { 1231, 5, 24, 7, 2, -20 }, // '[' + { 1246, 9, 18, 10, 1, -17 }, // '\' + { 1267, 5, 24, 7, 0, -20 }, // ']' + { 1282, 8, 8, 10, 1, -17 }, // '^' + { 1290, 10, 2, 11, 0, 0 }, // '_' + { 1293, 6, 3, 8, 1, -18 }, // '`' + { 1296, 9, 13, 13, 2, -13 }, // 'a' + { 1311, 10, 18, 13, 2, -18 }, // 'b' + { 1334, 10, 13, 12, 1, -13 }, // 'c' + { 1351, 10, 18, 13, 1, -18 }, // 'd' + { 1374, 10, 13, 12, 1, -13 }, // 'e' + { 1391, 8, 18, 9, 1, -18 }, // 'f' + { 1409, 10, 18, 13, 1, -13 }, // 'g' + { 1432, 9, 18, 13, 2, -18 }, // 'h' + { 1453, 3, 17, 7, 2, -17 }, // 'i' + { 1460, 5, 22, 6, 0, -17 }, // 'j' + { 1474, 10, 18, 12, 2, -18 }, // 'k' + { 1497, 3, 18, 7, 2, -18 }, // 'l' + { 1504, 15, 13, 19, 2, -13 }, // 'm' + { 1529, 9, 13, 13, 2, -13 }, // 'n' + { 1544, 11, 13, 13, 1, -13 }, // 'o' + { 1562, 10, 18, 13, 2, -13 }, // 'p' + { 1585, 10, 18, 13, 1, -13 }, // 'q' + { 1608, 7, 13, 8, 1, -13 }, // 'r' + { 1620, 10, 13, 12, 1, -13 }, // 's' + { 1637, 7, 16, 8, 0, -16 }, // 't' + { 1651, 9, 13, 13, 2, -13 }, // 'u' + { 1666, 11, 13, 11, 0, -13 }, // 'v' + { 1684, 15, 13, 17, 1, -13 }, // 'w' + { 1709, 10, 13, 12, 1, -13 }, // 'x' + { 1726, 11, 18, 11, 0, -13 }, // 'y' + { 1751, 10, 13, 12, 1, -13 }, // 'z' + { 1768, 7, 23, 8, 1, -19 }, // '{' + { 1789, 3, 20, 7, 2, -17 }, // '|' + { 1797, 7, 23, 8, 0, -19 } // '}' +}; +const GFXfont Roboto_Condensed_24 PROGMEM = { +(uint8_t *)Roboto_Condensed_24Bitmaps,(GFXglyph *)Roboto_Condensed_24Glyphs,0x20, 0x7E, 29}; \ No newline at end of file diff --git a/examples/3. Projects/05-Spotify_api_example/Fonts/Roboto_Condensed_32.h b/examples/3. Projects/05-Spotify_api_example/Fonts/Roboto_Condensed_32.h new file mode 100644 index 0000000..9601fa4 --- /dev/null +++ b/examples/3. Projects/05-Spotify_api_example/Fonts/Roboto_Condensed_32.h @@ -0,0 +1,330 @@ +// Created by http://oleddisplay.squix.ch/ Consider a donation +// In case of problems make sure that you are using the font file with the correct version! +const uint8_t Roboto_Condensed_32Bitmaps[] PROGMEM = { + + // Bitmap Data: + 0x00, // ' ' + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0xCE, 0xC0, // '!' + 0xCE, 0xCE, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, // '"' + 0x03, 0x18, 0x03, 0x18, 0x06, 0x18, 0x06, 0x38, 0x06, 0x30, 0x06, 0x30, 0x7F, 0xFE, 0x7F, 0xFE, 0x0C, 0x30, + 0x0C, 0x70, 0x0C, 0x60, 0x0C, 0x60, 0x0C, 0x60, 0x0C, 0x60, 0xFF, 0xFC, 0xFF, 0xFC, 0x18, 0xC0, 0x18, 0xC0, + 0x18, 0xC0, 0x18, 0xC0, 0x38, 0xC0, 0x30, 0xC0, 0x31, 0xC0, // '#' + 0x06, 0x00, 0x30, 0x01, 0x80, 0x1F, 0x03, 0xFC, 0x3C, 0x71, 0xC3, 0x8C, 0x0E, 0x60, 0x73, 0x03, 0x98, 0x00, + 0xE0, 0x07, 0x80, 0x1E, 0x00, 0x7C, 0x00, 0xF8, 0x01, 0xE0, 0x07, 0x80, 0x1D, 0xC0, 0xEE, 0x07, 0x70, 0x3B, + 0x81, 0xCE, 0x1C, 0x3F, 0xE0, 0xFC, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x00, // '$' + 0x38, 0x00, 0x1F, 0x80, 0x0C, 0x60, 0x83, 0x18, 0x70, 0xC3, 0x18, 0x30, 0xCC, 0x0C, 0x33, 0x03, 0x19, 0x80, + 0xC6, 0x60, 0x1F, 0xB0, 0x03, 0xCC, 0x00, 0x06, 0x00, 0x01, 0x9E, 0x00, 0xCF, 0xC0, 0x37, 0x30, 0x19, 0x86, + 0x0E, 0x61, 0x83, 0x18, 0x61, 0xC6, 0x18, 0x61, 0x86, 0x08, 0x73, 0x00, 0x0F, 0xC0, 0x01, 0xE0, // '%' + 0x07, 0x80, 0x0F, 0xE0, 0x0F, 0x38, 0x07, 0x0C, 0x03, 0x87, 0x01, 0xC3, 0x80, 0xE1, 0x80, 0x71, 0xC0, 0x1D, + 0xC0, 0x0F, 0xC0, 0x03, 0xC0, 0x03, 0xE0, 0x03, 0xF8, 0xE3, 0xDC, 0x71, 0xC7, 0x38, 0xC1, 0xD8, 0xE0, 0xFC, + 0x70, 0x3E, 0x18, 0x0E, 0x0E, 0x07, 0x87, 0x8F, 0xC1, 0xFF, 0x70, 0x3E, 0x3C, // '&' + 0xDB, 0x6D, 0xB0, // ''' + 0x02, 0x06, 0x0E, 0x1C, 0x18, 0x38, 0x30, 0x70, 0x70, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x70, 0x70, 0x30, 0x38, 0x18, 0x1C, 0x0E, 0x06, 0x02, // '(' + 0x80, 0xC0, 0xE0, 0x60, 0x30, 0x30, 0x38, 0x18, 0x1C, 0x1C, 0x0C, 0x0C, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, + 0x0E, 0x0E, 0x0E, 0x0C, 0x0C, 0x1C, 0x1C, 0x18, 0x18, 0x38, 0x30, 0x60, 0xE0, 0xC0, 0x80, // ')' + 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x63, 0x39, 0xFF, 0xEB, 0xFF, 0x01, 0xE0, 0x0F, 0x80, 0x37, 0x01, + 0xCE, 0x0E, 0x18, 0x10, 0x70, // '*' + 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x3F, 0xFE, 0xFF, 0xF8, 0x0C, 0x00, + 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, // '+' + 0x38, 0xE3, 0x8E, 0x31, 0xC6, 0x38, // ',' + 0xFD, 0xF8, // '-' + 0x67, 0x98, // '.' + 0x00, 0xE0, 0x0C, 0x00, 0xC0, 0x1C, 0x01, 0x80, 0x18, 0x03, 0x80, 0x30, 0x03, 0x00, 0x70, 0x06, 0x00, 0x60, + 0x0E, 0x00, 0xE0, 0x0C, 0x01, 0xC0, 0x1C, 0x01, 0x80, 0x18, 0x03, 0x80, 0x30, 0x03, 0x00, 0x70, 0x06, 0x00, + 0xE0, 0x00, // '/' + 0x1F, 0x01, 0xFE, 0x1C, 0x78, 0xE1, 0xCE, 0x06, 0x70, 0x3B, 0x81, 0xDC, 0x0E, 0xE0, 0x77, 0x03, 0xB8, 0x1D, + 0xC0, 0xEE, 0x07, 0x70, 0x3B, 0x81, 0xDC, 0x0E, 0xE0, 0x77, 0x03, 0xB8, 0x18, 0xE1, 0xC7, 0x1E, 0x1F, 0xE0, + 0x7C, 0x00, // '0' + 0x06, 0x1E, 0x7E, 0xEE, 0x8E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, + 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, // '1' + 0x0F, 0x80, 0x3F, 0xC0, 0xE3, 0xC3, 0x83, 0x87, 0x03, 0x8C, 0x07, 0x38, 0x0E, 0x00, 0x1C, 0x00, 0x30, 0x00, + 0xE0, 0x01, 0xC0, 0x07, 0x00, 0x1C, 0x00, 0x38, 0x00, 0xE0, 0x03, 0x80, 0x0F, 0x00, 0x1C, 0x00, 0x70, 0x01, + 0xC0, 0x07, 0x80, 0x0F, 0xFF, 0x9F, 0xFF, 0x00, // '2' + 0x1F, 0x01, 0xFE, 0x1C, 0x79, 0xC1, 0xCE, 0x06, 0x70, 0x30, 0x01, 0xC0, 0x0C, 0x00, 0xE0, 0x0E, 0x07, 0xE0, + 0x3F, 0x80, 0x1E, 0x00, 0x70, 0x01, 0xC0, 0x0E, 0x00, 0x76, 0x03, 0xB8, 0x1D, 0xC1, 0xCF, 0x1E, 0x3F, 0xE0, + 0x7C, 0x00, // '3' + 0x00, 0xE0, 0x01, 0xC0, 0x07, 0x80, 0x0F, 0x00, 0x3E, 0x00, 0xEC, 0x01, 0xD8, 0x07, 0x30, 0x0E, 0x60, 0x38, + 0xC0, 0x61, 0x81, 0xC3, 0x03, 0x06, 0x0E, 0x0C, 0x18, 0x18, 0x7F, 0xFE, 0xFF, 0xFC, 0x00, 0xC0, 0x01, 0x80, + 0x03, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x18, 0x00, // '4' + 0x3F, 0xF1, 0xFF, 0x8C, 0x00, 0x60, 0x03, 0x00, 0x38, 0x01, 0xC0, 0x0E, 0x00, 0x7F, 0x83, 0xFE, 0x1C, 0x38, + 0xE0, 0xE0, 0x07, 0x00, 0x38, 0x00, 0xC0, 0x06, 0x00, 0x37, 0x03, 0x98, 0x1C, 0xE0, 0xE7, 0x8E, 0x1F, 0xE0, + 0x3E, 0x00, // '5' + 0x03, 0xC0, 0x7E, 0x07, 0x80, 0x70, 0x03, 0x00, 0x38, 0x01, 0xC0, 0x0C, 0x00, 0xE7, 0x87, 0xFE, 0x3E, 0x39, + 0xE0, 0xEE, 0x07, 0x70, 0x3B, 0x80, 0xDC, 0x06, 0xE0, 0x33, 0x03, 0x9C, 0x1C, 0xE0, 0xE3, 0x8E, 0x0F, 0xE0, + 0x3E, 0x00, // '6' + 0xFF, 0xFB, 0xFF, 0xE0, 0x03, 0x80, 0x0E, 0x00, 0x30, 0x01, 0xC0, 0x07, 0x00, 0x38, 0x00, 0xE0, 0x03, 0x00, + 0x1C, 0x00, 0x70, 0x01, 0x80, 0x0E, 0x00, 0x38, 0x01, 0xC0, 0x07, 0x00, 0x1C, 0x00, 0xE0, 0x03, 0x80, 0x0C, + 0x00, 0x70, 0x01, 0xC0, 0x00, // '7' + 0x1F, 0x01, 0xFE, 0x1C, 0x78, 0xE1, 0xCE, 0x06, 0x70, 0x3B, 0x81, 0xDC, 0x0C, 0x70, 0xE3, 0x8F, 0x0F, 0xF0, + 0x7F, 0x87, 0x0E, 0x30, 0x33, 0x81, 0xDC, 0x0E, 0xE0, 0x77, 0x03, 0xB8, 0x1D, 0xC0, 0xE7, 0x0E, 0x1F, 0xE0, + 0x7E, 0x00, // '8' + 0x1F, 0x01, 0xFC, 0x1C, 0x71, 0xC1, 0xCE, 0x0E, 0x70, 0x33, 0x01, 0xD8, 0x0E, 0xC0, 0x77, 0x03, 0xB8, 0x1D, + 0xC1, 0xE7, 0x1F, 0x1F, 0xF8, 0x79, 0xC0, 0x0C, 0x00, 0x60, 0x07, 0x00, 0x30, 0x03, 0x80, 0x78, 0x1F, 0x80, + 0xF0, 0x00, // '9' + 0x67, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9E, 0x60, // ':' + 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1C, 0x38, 0x70, 0xC3, 0x86, + 0x1C, 0x00, // ';' + 0x00, 0x20, 0x0E, 0x03, 0xE0, 0x7C, 0x1F, 0x07, 0xC0, 0xF0, 0x0F, 0x00, 0x7C, 0x01, 0xF0, 0x07, 0xC0, 0x3E, + 0x00, 0xE0, 0x02, // '<' + 0xFF, 0xEF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0xFF, 0xE0, // '=' + 0x80, 0x0E, 0x00, 0xF8, 0x07, 0xE0, 0x1F, 0x80, 0x3E, 0x00, 0xE0, 0x1E, 0x07, 0xE1, 0xF8, 0x7E, 0x0F, 0x80, + 0xE0, 0x08, 0x00, // '>' + 0x1E, 0x0F, 0xF3, 0xCF, 0x70, 0xEC, 0x0D, 0x81, 0x80, 0x30, 0x0E, 0x01, 0xC0, 0x70, 0x0E, 0x03, 0x80, 0xE0, + 0x1C, 0x07, 0x00, 0xE0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC0, 0x38, 0x07, 0x00, // '?' + 0x00, 0xFC, 0x00, 0x0F, 0xFC, 0x00, 0x70, 0x3C, 0x03, 0x80, 0x38, 0x18, 0x00, 0x60, 0xE0, 0x00, 0xC3, 0x00, + 0x03, 0x1C, 0x0F, 0x06, 0x60, 0xFE, 0x19, 0x83, 0x18, 0x66, 0x18, 0x61, 0xB0, 0x61, 0x86, 0xC3, 0x86, 0x1B, + 0x0C, 0x18, 0x6C, 0x30, 0x61, 0xB0, 0xC3, 0x86, 0xC3, 0x0E, 0x1B, 0x0C, 0x38, 0x6C, 0x30, 0xE3, 0x30, 0xE7, + 0x9C, 0x61, 0xF7, 0xE1, 0x87, 0x8F, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x00, 0x00, 0x70, 0x00, 0x00, + 0xE0, 0x60, 0x01, 0xFF, 0x80, 0x01, 0xF8, 0x00, // '@' + 0x00, 0xC0, 0x00, 0x3C, 0x00, 0x07, 0x80, 0x00, 0xF0, 0x00, 0x3F, 0x00, 0x07, 0xE0, 0x00, 0xCC, 0x00, 0x39, + 0xC0, 0x07, 0x38, 0x00, 0xC3, 0x00, 0x38, 0x70, 0x07, 0x0E, 0x00, 0xC0, 0xC0, 0x38, 0x1C, 0x07, 0xFF, 0x80, + 0xFF, 0xF0, 0x18, 0x06, 0x07, 0x00, 0xE0, 0xE0, 0x1C, 0x18, 0x01, 0x87, 0x00, 0x38, 0xE0, 0x07, 0x3C, 0x00, + 0x70, // 'A' + 0xFF, 0xC1, 0xFF, 0xE3, 0x81, 0xC7, 0x01, 0xCE, 0x03, 0x9C, 0x07, 0x38, 0x0E, 0x70, 0x1C, 0xE0, 0x39, 0xC0, + 0xE3, 0xFF, 0x87, 0xFF, 0x0E, 0x07, 0x1C, 0x07, 0x38, 0x06, 0x70, 0x0E, 0xE0, 0x1D, 0xC0, 0x3B, 0x80, 0xE7, + 0x01, 0xCE, 0x07, 0x9F, 0xFE, 0x3F, 0xF0, 0x00, // 'B' + 0x07, 0xE0, 0x1F, 0xF0, 0x38, 0x38, 0x70, 0x1C, 0x70, 0x1C, 0xE0, 0x0C, 0xE0, 0x0E, 0xE0, 0x00, 0xE0, 0x00, + 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x0E, 0xE0, 0x0C, + 0x70, 0x1C, 0x70, 0x1C, 0x38, 0x38, 0x1F, 0xF0, 0x07, 0xE0, // 'C' + 0xFF, 0x81, 0xFF, 0xC3, 0x83, 0xC7, 0x01, 0xCE, 0x03, 0x9C, 0x03, 0xB8, 0x07, 0x70, 0x0E, 0xE0, 0x1D, 0xC0, + 0x3B, 0x80, 0x77, 0x00, 0xEE, 0x01, 0xDC, 0x03, 0xB8, 0x07, 0x70, 0x0E, 0xE0, 0x1D, 0xC0, 0x3B, 0x80, 0xE7, + 0x01, 0xCE, 0x0F, 0x1F, 0xFC, 0x3F, 0xE0, 0x00, // 'D' + 0xFF, 0xFB, 0xFF, 0xEE, 0x00, 0x38, 0x00, 0xE0, 0x03, 0x80, 0x0E, 0x00, 0x38, 0x00, 0xE0, 0x03, 0x80, 0x0F, + 0xFE, 0x3F, 0xF8, 0xE0, 0x03, 0x80, 0x0E, 0x00, 0x38, 0x00, 0xE0, 0x03, 0x80, 0x0E, 0x00, 0x38, 0x00, 0xE0, + 0x03, 0xFF, 0xEF, 0xFF, 0x80, // 'E' + 0xFF, 0xF7, 0xFF, 0xB8, 0x01, 0xC0, 0x0E, 0x00, 0x70, 0x03, 0x80, 0x1C, 0x00, 0xE0, 0x07, 0x00, 0x3F, 0xF9, + 0xFF, 0xCE, 0x00, 0x70, 0x03, 0x80, 0x1C, 0x00, 0xE0, 0x07, 0x00, 0x38, 0x01, 0xC0, 0x0E, 0x00, 0x70, 0x03, + 0x80, 0x00, // 'F' + 0x07, 0xE0, 0x1F, 0xF8, 0x38, 0x3C, 0x70, 0x1C, 0x70, 0x1C, 0xE0, 0x0E, 0xE0, 0x0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 0x80, 0x3B, 0x80, 0xE7, + 0x01, 0xC7, 0x87, 0x07, 0xFE, 0x03, 0xF0, 0x00, // 'S' + 0xFF, 0xFE, 0xFF, 0xFE, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, + 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, // 'T' + 0xE0, 0x1D, 0xC0, 0x3B, 0x80, 0x77, 0x00, 0xEE, 0x01, 0xDC, 0x03, 0xB8, 0x07, 0x70, 0x0E, 0xE0, 0x1D, 0xC0, + 0x3B, 0x80, 0x77, 0x00, 0xEE, 0x01, 0xDC, 0x03, 0xB8, 0x07, 0x70, 0x0E, 0xE0, 0x1D, 0xC0, 0x3B, 0x80, 0x73, + 0x81, 0xC7, 0x87, 0x87, 0xFE, 0x03, 0xF0, 0x00, // 'U' + 0xE0, 0x07, 0x70, 0x03, 0xBC, 0x03, 0xCE, 0x01, 0xC7, 0x00, 0xE3, 0x80, 0x70, 0xE0, 0x70, 0x70, 0x38, 0x38, + 0x1C, 0x0C, 0x0C, 0x07, 0x0E, 0x03, 0x87, 0x00, 0xC3, 0x00, 0x73, 0x80, 0x39, 0xC0, 0x1C, 0xE0, 0x06, 0x60, + 0x03, 0xF0, 0x01, 0xF8, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x06, 0x00, // 'V' + 0xE0, 0x38, 0x0E, 0xE0, 0x38, 0x1C, 0x60, 0x38, 0x1C, 0x70, 0x78, 0x1C, 0x70, 0x7C, 0x1C, 0x70, 0x7C, 0x18, + 0x70, 0x6C, 0x18, 0x30, 0xEC, 0x38, 0x30, 0xEC, 0x38, 0x38, 0xCE, 0x38, 0x38, 0xC6, 0x30, 0x38, 0xC6, 0x30, + 0x19, 0xC6, 0x70, 0x19, 0x87, 0x70, 0x1D, 0x83, 0x70, 0x1D, 0x83, 0x60, 0x1F, 0x83, 0x60, 0x0F, 0x83, 0x60, + 0x0F, 0x03, 0xE0, 0x0F, 0x01, 0xE0, 0x0F, 0x01, 0xE0, 0x0F, 0x01, 0xC0, 0x06, 0x01, 0xC0, // 'W' + 0xF0, 0x0E, 0x38, 0x0F, 0x1E, 0x07, 0x07, 0x07, 0x81, 0xC3, 0x80, 0xE3, 0xC0, 0x39, 0xC0, 0x1D, 0xE0, 0x07, + 0xE0, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x3F, 0x00, 0x1F, 0x80, 0x1C, 0xE0, 0x1E, 0x70, + 0x0E, 0x1C, 0x0F, 0x0E, 0x07, 0x03, 0x87, 0x81, 0xC3, 0x80, 0xF3, 0xC0, 0x3C, // 'X' + 0xF0, 0x07, 0x38, 0x07, 0x8E, 0x03, 0x87, 0x01, 0xC3, 0xC1, 0xC0, 0xE0, 0xE0, 0x70, 0xE0, 0x1C, 0x70, 0x0E, + 0x30, 0x03, 0xB8, 0x01, 0xDC, 0x00, 0x7C, 0x00, 0x3E, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, + 0x00, 0xE0, 0x00, 0x70, 0x00, 0x38, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x07, 0x00, // 'Y' + 0x7F, 0xFC, 0xFF, 0xF8, 0x00, 0xF0, 0x01, 0xC0, 0x07, 0x80, 0x0E, 0x00, 0x38, 0x00, 0x70, 0x01, 0xC0, 0x03, + 0x80, 0x0E, 0x00, 0x1C, 0x00, 0x70, 0x00, 0xE0, 0x03, 0x80, 0x0F, 0x00, 0x1C, 0x00, 0x70, 0x00, 0xE0, 0x03, + 0x80, 0x07, 0x00, 0x1F, 0xFF, 0xBF, 0xFF, 0x00, // 'Z' + 0xFB, 0xEE, 0x38, 0xE3, 0x8E, 0x38, 0xE3, 0x8E, 0x38, 0xE3, 0x8E, 0x38, 0xE3, 0x8E, 0x38, 0xE3, 0x8E, 0x38, + 0xE3, 0x8E, 0x38, 0xE3, 0xEF, 0x80, // '[' + 0xE0, 0x1C, 0x01, 0x80, 0x38, 0x07, 0x00, 0x60, 0x0C, 0x01, 0xC0, 0x18, 0x03, 0x00, 0x70, 0x0E, 0x00, 0xC0, + 0x1C, 0x03, 0x80, 0x30, 0x07, 0x00, 0xE0, 0x0C, 0x01, 0xC0, 0x38, 0x03, 0x00, 0x70, 0x0E, 0x00, 0xC0, // '\' + 0xFD, 0xF8, 0x70, 0xE1, 0xC3, 0x87, 0x0E, 0x1C, 0x38, 0x70, 0xE1, 0xC3, 0x87, 0x0E, 0x1C, 0x38, 0x70, 0xE1, + 0xC3, 0x87, 0x0E, 0x1C, 0x38, 0x70, 0xE1, 0xDF, 0xBF, 0x00, // ']' + 0x0C, 0x01, 0x80, 0x78, 0x0F, 0x03, 0xF0, 0x66, 0x0C, 0xC3, 0x9C, 0x71, 0x8C, 0x33, 0x87, 0x00, // '^' + 0xFF, 0xFB, 0xFF, 0xE0, // '_' + 0xF0, 0xE0, 0xE0, 0xE0, 0xC0, // '`' + 0x1F, 0x03, 0xFC, 0x71, 0xCE, 0x0E, 0xE0, 0xE0, 0x0E, 0x00, 0xE1, 0xFE, 0x7F, 0xEF, 0x0E, 0xE0, 0xEC, 0x0E, + 0xC0, 0xEE, 0x0E, 0xE1, 0xE7, 0xFE, 0x3E, 0xE0, // 'a' + 0xE0, 0x07, 0x00, 0x38, 0x01, 0xC0, 0x0E, 0x00, 0x70, 0x03, 0x80, 0x1C, 0xF0, 0xFF, 0xE7, 0x87, 0x38, 0x1D, + 0xC0, 0xEE, 0x03, 0x70, 0x1B, 0x80, 0xDC, 0x06, 0xE0, 0x37, 0x01, 0xB8, 0x1D, 0xC0, 0xEE, 0x07, 0x78, 0x73, + 0xFF, 0x9C, 0xF0, // 'b' + 0x1F, 0x81, 0xFE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// 'y' + 0x7F, 0xE3, 0xFF, 0x00, 0x38, 0x03, 0x80, 0x1C, 0x01, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x70, 0x07, 0x00, + 0x38, 0x03, 0x80, 0x3C, 0x01, 0xC0, 0x1F, 0xFE, 0xFF, 0xF0, // 'z' + 0x03, 0x03, 0x83, 0x81, 0x81, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x07, 0x03, 0x81, 0x81, 0xC3, 0xC1, 0xE0, + 0x38, 0x1C, 0x07, 0x03, 0x81, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x07, 0x01, 0x80, 0xE0, 0x38, 0x04, // '{' + 0xDB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0x00, // '|' + 0xC0, 0x70, 0x1C, 0x06, 0x03, 0x81, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x07, 0x01, 0x80, 0xE0, 0x3C, 0x1E, + 0x1C, 0x0C, 0x0E, 0x07, 0x03, 0x81, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x0E, 0x07, 0x07, 0x02, 0x00 // '}' +}; +const GFXglyph Roboto_Condensed_32Glyphs[] PROGMEM = { + // bitmapOffset, width, height, xAdvance, xOffset, yOffset + {0, 1, 1, 8, 0, 0}, // ' ' + {1, 4, 23, 9, 3, -23}, // '!' + {13, 8, 8, 11, 2, -24}, // '"' + {21, 16, 23, 19, 2, -23}, // '#' + {67, 13, 29, 17, 2, -26}, // '$' + {115, 18, 23, 21, 2, -23}, // '%' + {167, 17, 23, 18, 1, -23}, // '&' + {216, 3, 7, 7, 2, -24}, // ''' + {219, 8, 33, 11, 2, -26}, // '(' + {252, 8, 33, 11, 1, -26}, // ')' + {285, 14, 13, 15, 0, -23}, // '*' + {308, 14, 16, 17, 1, -19}, // '+' + {336, 6, 8, 7, 0, -3}, // ',' + {342, 7, 2, 9, 1, -11}, // '-' + {344, 5, 3, 9, 2, -3}, // '.' + {346, 12, 25, 13, 0, -23}, // '/' + {384, 13, 23, 17, 2, -23}, // '0' + {422, 8, 23, 17, 3, -23}, // '1' + {445, 15, 23, 17, 1, -23}, // '2' + {489, 13, 23, 17, 2, -23}, // '3' + {527, 15, 23, 17, 1, -23}, // '4' + {571, 13, 23, 17, 2, -23}, // '5' + {609, 13, 23, 17, 2, -23}, // '6' + {647, 14, 23, 17, 1, -23}, // '7' + {688, 13, 23, 17, 2, -23}, // '8' + {726, 13, 23, 17, 2, -23}, // '9' + {764, 5, 17, 8, 2, -17}, // ':' + {775, 7, 22, 7, 0, -17}, // ';' + {795, 12, 14, 15, 1, -17}, // '<' + {816, 12, 9, 16, 2, -16}, // '=' + {830, 12, 14, 16, 2, -17}, // '>' + {851, 11, 23, 15, 2, -23}, // '?' + {883, 22, 29, 26, 2, -22}, // '@' + {963, 19, 23, 19, 0, -23}, // 'A' + {1018, 15, 23, 18, 2, -23}, // 'B' + {1062, 16, 23, 19, 2, -23}, // 'C' + {1108, 15, 23, 19, 2, -23}, // 'D' + {1152, 14, 23, 17, 2, -23}, // 'E' + {1193, 13, 23, 16, 2, -23}, // 'F' + {1231, 16, 23, 20, 2, -23}, // 'G' + {1277, 15, 23, 21, 3, -23}, // 'H' + {1321, 3, 23, 9, 3, -23}, // 'I' + {1330, 13, 23, 16, 1, -23}, // 'J' + {1368, 16, 23, 18, 2, -23}, // 'K' + {1414, 13, 23, 16, 2, -23}, // 'L' + {1452, 21, 23, 25, 2, -23}, // 'M' + {1513, 15, 23, 21, 3, -23}, // 'N' + {1557, 16, 23, 20, 2, -23}, // 'O' + {1603, 15, 23, 19, 3, -23}, // 'P' + {1647, 16, 27, 20, 2, -23}, // 'Q' + {1701, 15, 23, 18, 2, -23}, // 'R' + {1745, 15, 23, 18, 2, -23}, // 'S' + {1789, 16, 23, 18, 1, -23}, // 'T' + {1835, 15, 23, 19, 2, -23}, // 'U' + {1879, 17, 23, 19, 1, -23}, // 'V' + {1928, 24, 23, 25, 1, -23}, // 'W' + {1997, 17, 23, 19, 1, -23}, // 'X' + {2046, 17, 23, 18, 0, -23}, // 'Y' + {2095, 15, 23, 18, 1, -23}, // 'Z' + {2139, 6, 31, 9, 2, -26}, // '[' + {2163, 11, 25, 13, 1, -23}, // '\' + {2198, 7, 31, 9, 0, -26}, // ']' + {2226, 11, 11, 13, 1, -23}, // '^' + {2242, 14, 2, 14, 0, 0}, // '_' + {2246, 7, 5, 11, 1, -24}, // '`' + {2251, 12, 17, 16, 2, -17}, // 'a' + {2277, 13, 24, 17, 2, -24}, // 'b' + {2316, 13, 17, 16, 2, -17}, // 'c' + {2344, 13, 24, 17, 2, -24}, // 'd' + {2383, 13, 17, 16, 2, -17}, // 'e' + {2411, 10, 24, 11, 1, -24}, // 'f' + {2441, 13, 24, 17, 2, -17}, // 'g' + {2480, 12, 24, 16, 2, -24}, // 'h' + {2516, 4, 23, 8, 2, -23}, // 'i' + {2528, 6, 30, 8, 0, -23}, // 'j' + {2551, 13, 24, 15, 2, -24}, // 'k' + {2590, 4, 24, 8, 2, -24}, // 'l' + {2602, 21, 17, 25, 2, -17}, // 'm' + {2647, 12, 17, 16, 2, -17}, // 'n' + {2673, 15, 17, 17, 1, -17}, // 'o' + {2705, 13, 24, 17, 2, -17}, // 'p' + {2744, 14, 24, 17, 1, -17}, // 'q' + {2786, 8, 17, 11, 2, -17}, // 'r' + {2803, 12, 17, 16, 2, -17}, // 's' + {2829, 9, 21, 10, 0, -21}, // 't' + {2853, 12, 17, 16, 2, -17}, // 'u' + {2879, 13, 17, 15, 1, -17}, // 'v' + {2907, 20, 17, 22, 1, -17}, // 'w' + {2950, 13, 17, 15, 1, -17}, // 'x' + {2978, 14, 24, 14, 0, -17}, // 'y' + {3020, 13, 17, 15, 1, -17}, // 'z' + {3048, 9, 31, 11, 1, -25}, // '{' + {3083, 3, 27, 9, 3, -23}, // '|' + {3094, 9, 31, 11, 1, -25} // '}' +}; +const GFXfont Roboto_Condensed_32 PROGMEM = {(uint8_t *)Roboto_Condensed_32Bitmaps, + (GFXglyph *)Roboto_Condensed_32Glyphs, 0x20, 0x7E, 38}; \ No newline at end of file diff --git a/examples/3. Projects/05-Spotify_api_example/generatedUI.h b/examples/3. Projects/05-Spotify_api_example/generatedUI.h new file mode 100644 index 0000000..fcd8ad4 --- /dev/null +++ b/examples/3. Projects/05-Spotify_api_example/generatedUI.h @@ -0,0 +1,451 @@ +#include "Arduino.h" +#include "Fonts/Roboto_Condensed_24.h" +#include "Fonts/Roboto_Condensed_32.h" +#include "Inkplate.h" + +extern Inkplate display; + +int line0_start_x = 70; +int line0_start_y = 490; +int line0_end_x = 730; +int line0_end_y = 490; +int line0_color = BLACK; +int line0_thickness = 1; +int line0_gradient = 0; + +int circle0_center_x = 70; +int circle0_center_y = 490; +int circle0_fill = 1; +int circle0_radius = 10; +int circle0_color = BLACK; + +int circle1_center_x = 730; +int circle1_center_y = 490; +int circle1_fill = 1; +int circle1_radius = 10; +int circle1_color = BLACK; + +int circle2_center_x = 70; +int circle2_center_y = 490; +int circle2_fill = -1; +int circle2_radius = 14; +int circle2_color = BLACK; + +int digital_clock2_h = 9; +int digital_clock2_m = 41; +int digital_clock2_location_x = 35; +int digital_clock2_location_y = 444; +int digital_clock2_size = 32; +int digital_clock2_bitmask[] = {119, 48, 93, 121, 58, 107, 111, 49, 127, 59}; +int digital_clock2_triangleX[] = { + 83, 101, 108, 101, 108, 277, 101, 108, 277, 257, 277, 108, 257, 277, 286, 76, 60, 98, 60, 98, 80, 80, + 39, 60, 80, 39, 55, 31, 55, 73, 31, 73, 52, 31, 9, 52, 9, 52, 20, 61, 86, 80, 86, 80, + 233, 233, 227, 80, 233, 227, 252, 260, 292, 305, 305, 260, 240, 305, 281, 240, 240, 281, 260, 259, 234, 276, + 234, 276, 256, 256, 214, 234, 214, 256, 237, 38, 27, 60, 38, 60, 207, 207, 38, 212, 212, 207, 230}; +int digital_clock2_triangleY[] = { + 30, 13, 60, 13, 60, 14, 13, 60, 14, 57, 14, 60, 57, 14, 29, 36, 47, 61, 47, 61, 198, 198, + 201, 47, 198, 201, 219, 252, 232, 253, 252, 253, 390, 252, 406, 390, 406, 390, 416, 227, 202, 249, 202, 249, + 203, 203, 247, 249, 203, 247, 224, 60, 35, 49, 49, 60, 200, 50, 201, 200, 200, 201, 220, 231, 252, 252, + 252, 252, 403, 403, 390, 252, 390, 403, 415, 439, 424, 392, 439, 392, 394, 394, 439, 439, 439, 394, 424}; +int digital_clock2_maxX = 310; +int digital_clock2_maxY = 440; + +int digital_clock4_h = 9; +int digital_clock4_m = 41; +int digital_clock4_location_x = 675; +int digital_clock4_location_y = 21; +int digital_clock4_size = 32; +int digital_clock4_bitmask[] = {119, 48, 93, 121, 58, 107, 111, 49, 127, 59}; +int digital_clock4_triangleX[] = { + 83, 101, 108, 101, 108, 277, 101, 108, 277, 257, 277, 108, 257, 277, 286, 76, 60, 98, 60, 98, 80, 80, + 39, 60, 80, 39, 55, 31, 55, 73, 31, 73, 52, 31, 9, 52, 9, 52, 20, 61, 86, 80, 86, 80, + 233, 233, 227, 80, 233, 227, 252, 260, 292, 305, 305, 260, 240, 305, 281, 240, 240, 281, 260, 259, 234, 276, + 234, 276, 256, 256, 214, 234, 214, 256, 237, 38, 27, 60, 38, 60, 207, 207, 38, 212, 212, 207, 230}; +int digital_clock4_triangleY[] = { + 30, 13, 60, 13, 60, 14, 13, 60, 14, 57, 14, 60, 57, 14, 29, 36, 47, 61, 47, 61, 198, 198, + 201, 47, 198, 201, 219, 252, 232, 253, 252, 253, 390, 252, 406, 390, 406, 390, 416, 227, 202, 249, 202, 249, + 203, 203, 247, 249, 203, 247, 224, 60, 35, 49, 49, 60, 200, 50, 201, 200, 200, 201, 220, 231, 252, 252, + 252, 252, 403, 403, 390, 252, 390, 403, 415, 439, 424, 392, 439, 392, 394, 394, 439, 439, 439, 394, 424}; +int digital_clock4_maxX = 310; +int digital_clock4_maxY = 440; + +int circle3_center_x = 400; +int circle3_center_y = 560; +int circle3_fill = -1; +int circle3_radius = 30; +int circle3_color = BLACK; + +int line1_start_x = 390; +int line1_start_y = 570; +int line1_end_x = 390; +int line1_end_y = 550; +int line1_color = BLACK; +int line1_thickness = 4; +int line1_gradient = 0; + +int line2_start_x = 410; +int line2_start_y = 550; +int line2_end_x = 410; +int line2_end_y = 570; +int line2_color = BLACK; +int line2_thickness = 4; +int line2_gradient = 0; + +char text1_content[128] = "Rick Astley "; +int text1_cursor_x = 325; +int text1_cursor_y = 49; +const GFXfont *text1_font = &Roboto_Condensed_32; + +char text2_content[128] = "Never Gonna Give You Up"; +int text2_cursor_x = 254; +int text2_cursor_y = 87; +const GFXfont *text2_font = &Roboto_Condensed_32; + +char text3_content[128] = "from Whenever You Need Somebody"; +int text3_cursor_x = 305; +int text3_cursor_y = 424; +const GFXfont *text3_font = &Roboto_Condensed_24; + +int digital_clock5_h = 9; +int digital_clock5_m = 41; +int digital_clock5_location_x = 675; +int digital_clock5_location_y = 444; +int digital_clock5_size = 32; +int digital_clock5_bitmask[] = {119, 48, 93, 121, 58, 107, 111, 49, 127, 59}; +int digital_clock5_triangleX[] = { + 83, 101, 108, 101, 108, 277, 101, 108, 277, 257, 277, 108, 257, 277, 286, 76, 60, 98, 60, 98, 80, 80, + 39, 60, 80, 39, 55, 31, 55, 73, 31, 73, 52, 31, 9, 52, 9, 52, 20, 61, 86, 80, 86, 80, + 233, 233, 227, 80, 233, 227, 252, 260, 292, 305, 305, 260, 240, 305, 281, 240, 240, 281, 260, 259, 234, 276, + 234, 276, 256, 256, 214, 234, 214, 256, 237, 38, 27, 60, 38, 60, 207, 207, 38, 212, 212, 207, 230}; +int digital_clock5_triangleY[] = { + 30, 13, 60, 13, 60, 14, 13, 60, 14, 57, 14, 60, 57, 14, 29, 36, 47, 61, 47, 61, 198, 198, + 201, 47, 198, 201, 219, 252, 232, 253, 252, 253, 390, 252, 406, 390, 406, 390, 416, 227, 202, 249, 202, 249, + 203, 203, 247, 249, 203, 247, 224, 60, 35, 49, 49, 60, 200, 50, 201, 200, 200, 201, 220, 231, 252, 252, + 252, 252, 403, 403, 390, 252, 390, 403, 415, 439, 424, 392, 439, 392, 394, 394, 439, 439, 439, 394, 424}; +int digital_clock5_maxX = 310; +int digital_clock5_maxY = 440; + +int triangle0_a_x = 500; +int triangle0_a_y = 570; +int triangle0_b_x = 530; +int triangle0_b_y = 560; +int triangle0_c_x = 500; +int triangle0_c_y = 550; +int triangle0_fill = 1; +int triangle0_radius = -1; +int triangle0_color = BLACK; + +int line3_start_x = 528; +int line3_start_y = 550; +int line3_end_x = 528; +int line3_end_y = 570; +int line3_color = BLACK; +int line3_thickness = 4; +int line3_gradient = 0; + +int triangle1_a_x = 270; +int triangle1_a_y = 560; +int triangle1_b_x = 300; +int triangle1_b_y = 550; +int triangle1_c_x = 300; +int triangle1_c_y = 570; +int triangle1_fill = 1; +int triangle1_radius = -1; +int triangle1_color = BLACK; + +int line4_start_x = 272; +int line4_start_y = 550; +int line4_end_x = 272; +int line4_end_y = 570; +int line4_color = BLACK; +int line4_thickness = 4; +int line4_gradient = 0; + +int triangle2_a_x = 390; +int triangle2_a_y = 573; +int triangle2_b_x = 417; +int triangle2_b_y = 560; +int triangle2_c_x = 390; +int triangle2_c_y = 548; +int triangle2_fill = 1; +int triangle2_radius = -1; +int triangle2_color = BLACK; + +void mainDraw() +{ + if (line0_gradient <= line0_color && line0_thickness == 1) + display.drawLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color); + else if (line0_gradient <= line0_color && line0_thickness != 1) + display.drawThickLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color, line0_thickness); + else if (line0_gradient > line0_color && line0_thickness == 1) + display.drawGradientLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color, line0_gradient, + 1); + else if (line0_gradient > line0_color && line0_thickness != 1) + display.drawGradientLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color, line0_gradient, + line0_thickness); + + if (circle0_fill != -1) + display.fillCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color); + else + display.drawCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color); + + if (circle1_fill != -1) + display.fillCircle(circle1_center_x, circle1_center_y, circle1_radius, circle1_color); + else + display.drawCircle(circle1_center_x, circle1_center_y, circle1_radius, circle1_color); + + if (circle2_fill != -1) + display.fillCircle(circle2_center_x, circle2_center_y, circle2_radius, circle2_color); + else + display.drawCircle(circle2_center_x, circle2_center_y, circle2_radius, circle2_color); + + for (int i = 0; i < 4; ++i) + { + for (int j = 0; j < sizeof(digital_clock2_triangleX) / sizeof(digital_clock2_triangleX[0]); j += 3) + { + int temp[4] = {digital_clock2_h / 10 % 10, digital_clock2_h % 10, digital_clock2_m / 10 % 10, + digital_clock2_m % 10}; + int b = digital_clock2_bitmask[temp[i]]; + if (b & (1 << ((j - 1) / (3 * 4)))) + { + display.fillTriangle( + (int)((float)i * (float)digital_clock2_maxX / (float)digital_clock2_maxY * + (float)digital_clock2_size * 1.1 + + (float)digital_clock2_location_x + + (float)digital_clock2_maxX / (float)digital_clock2_maxY * (float)digital_clock2_size * + (float)digital_clock2_triangleX[j + 0] / (float)digital_clock2_maxX), + (int)((float)digital_clock2_location_y + (float)digital_clock2_size * + (float)digital_clock2_triangleY[j + 0] / + (float)digital_clock2_maxY), + + (int)((float)i * (float)digital_clock2_maxX / (float)digital_clock2_maxY * + (float)digital_clock2_size * 1.1 + + (float)digital_clock2_location_x + + (float)digital_clock2_maxX / (float)digital_clock2_maxY * (float)digital_clock2_size * + (float)digital_clock2_triangleX[j + 1] / (float)digital_clock2_maxX), + (int)((float)digital_clock2_location_y + (float)digital_clock2_size * + (float)digital_clock2_triangleY[j + 1] / + (float)digital_clock2_maxY), + + (int)((float)i * (float)digital_clock2_maxX / (float)digital_clock2_maxY * + (float)digital_clock2_size * 1.1 + + (float)digital_clock2_location_x + + (float)digital_clock2_maxX / (float)digital_clock2_maxY * (float)digital_clock2_size * + (float)digital_clock2_triangleX[j + 2] / (float)digital_clock2_maxX), + (int)((float)digital_clock2_location_y + (float)digital_clock2_size * + (float)digital_clock2_triangleY[j + 2] / + (float)digital_clock2_maxY), + + BLACK); + } + } + } + + int digital_clock2_r = 0.05 * (float)digital_clock2_size; + + display.fillCircle( + (int)((float)digital_clock2_location_x + + 4.0 * (float)digital_clock2_maxX / (float)digital_clock2_maxY * (float)digital_clock2_size * 1.075 / 2.0), + (int)((float)digital_clock2_location_y + (float)digital_clock2_size * 0.4), digital_clock2_r, BLACK); + display.fillCircle( + (int)((float)digital_clock2_location_x + + 4.0 * (float)digital_clock2_maxX / (float)digital_clock2_maxY * (float)digital_clock2_size * 1.075 / 2.0), + (int)((float)digital_clock2_location_y + (float)digital_clock2_size * 0.6), digital_clock2_r, BLACK); + for (int i = 0; i < 4; ++i) + { + for (int j = 0; j < sizeof(digital_clock4_triangleX) / sizeof(digital_clock4_triangleX[0]); j += 3) + { + int temp[4] = {digital_clock4_h / 10 % 10, digital_clock4_h % 10, digital_clock4_m / 10 % 10, + digital_clock4_m % 10}; + int b = digital_clock4_bitmask[temp[i]]; + if (b & (1 << ((j - 1) / (3 * 4)))) + { + display.fillTriangle( + (int)((float)i * (float)digital_clock4_maxX / (float)digital_clock4_maxY * + (float)digital_clock4_size * 1.1 + + (float)digital_clock4_location_x + + (float)digital_clock4_maxX / (float)digital_clock4_maxY * (float)digital_clock4_size * + (float)digital_clock4_triangleX[j + 0] / (float)digital_clock4_maxX), + (int)((float)digital_clock4_location_y + (float)digital_clock4_size * + (float)digital_clock4_triangleY[j + 0] / + (float)digital_clock4_maxY), + + (int)((float)i * (float)digital_clock4_maxX / (float)digital_clock4_maxY * + (float)digital_clock4_size * 1.1 + + (float)digital_clock4_location_x + + (float)digital_clock4_maxX / (float)digital_clock4_maxY * (float)digital_clock4_size * + (float)digital_clock4_triangleX[j + 1] / (float)digital_clock4_maxX), + (int)((float)digital_clock4_location_y + (float)digital_clock4_size * + (float)digital_clock4_triangleY[j + 1] / + (float)digital_clock4_maxY), + + (int)((float)i * (float)digital_clock4_maxX / (float)digital_clock4_maxY * + (float)digital_clock4_size * 1.1 + + (float)digital_clock4_location_x + + (float)digital_clock4_maxX / (float)digital_clock4_maxY * (float)digital_clock4_size * + (float)digital_clock4_triangleX[j + 2] / (float)digital_clock4_maxX), + (int)((float)digital_clock4_location_y + (float)digital_clock4_size * + (float)digital_clock4_triangleY[j + 2] / + (float)digital_clock4_maxY), + + BLACK); + } + } + } + + int digital_clock4_r = 0.05 * (float)digital_clock4_size; + + display.fillCircle( + (int)((float)digital_clock4_location_x + + 4.0 * (float)digital_clock4_maxX / (float)digital_clock4_maxY * (float)digital_clock4_size * 1.075 / 2.0), + (int)((float)digital_clock4_location_y + (float)digital_clock4_size * 0.4), digital_clock4_r, BLACK); + display.fillCircle( + (int)((float)digital_clock4_location_x + + 4.0 * (float)digital_clock4_maxX / (float)digital_clock4_maxY * (float)digital_clock4_size * 1.075 / 2.0), + (int)((float)digital_clock4_location_y + (float)digital_clock4_size * 0.6), digital_clock4_r, BLACK); + + if (circle3_fill != -1) + display.fillCircle(circle3_center_x, circle3_center_y, circle3_radius, circle3_color); + else + display.drawCircle(circle3_center_x, circle3_center_y, circle3_radius, circle3_color); + + if (line1_color == BLACK) + { + if (line1_gradient <= line1_color && line1_thickness == 1) + display.drawLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color); + else if (line1_gradient <= line1_color && line1_thickness != 1) + display.drawThickLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color, line1_thickness); + else if (line1_gradient > line1_color && line1_thickness == 1) + display.drawGradientLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color, + line1_gradient, 1); + else if (line1_gradient > line1_color && line1_thickness != 1) + display.drawGradientLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color, + line1_gradient, line1_thickness); + } + if (line2_color == BLACK) + { + if (line2_gradient <= line2_color && line2_thickness == 1) + display.drawLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color); + else if (line2_gradient <= line2_color && line2_thickness != 1) + display.drawThickLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color, line2_thickness); + else if (line2_gradient > line2_color && line2_thickness == 1) + display.drawGradientLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color, + line2_gradient, 1); + else if (line2_gradient > line2_color && line2_thickness != 1) + display.drawGradientLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color, + line2_gradient, line2_thickness); + } + + display.setFont(text1_font); + display.setTextSize(1); + display.setCursor(text1_cursor_x, text1_cursor_y); + display.print(text1_content); + + display.setFont(text2_font); + display.setTextSize(1); + display.setCursor(text2_cursor_x, text2_cursor_y); + display.print(text2_content); + + display.setFont(text3_font); + display.setTextSize(1); + display.setCursor(text3_cursor_x, text3_cursor_y); + display.print(text3_content); + + for (int i = 0; i < 4; ++i) + { + for (int j = 0; j < sizeof(digital_clock5_triangleX) / sizeof(digital_clock5_triangleX[0]); j += 3) + { + int temp[4] = {digital_clock5_h / 10 % 10, digital_clock5_h % 10, digital_clock5_m / 10 % 10, + digital_clock5_m % 10}; + int b = digital_clock5_bitmask[temp[i]]; + if (b & (1 << ((j - 1) / (3 * 4)))) + { + display.fillTriangle( + (int)((float)i * (float)digital_clock5_maxX / (float)digital_clock5_maxY * + (float)digital_clock5_size * 1.1 + + (float)digital_clock5_location_x + + (float)digital_clock5_maxX / (float)digital_clock5_maxY * (float)digital_clock5_size * + (float)digital_clock5_triangleX[j + 0] / (float)digital_clock5_maxX), + (int)((float)digital_clock5_location_y + (float)digital_clock5_size * + (float)digital_clock5_triangleY[j + 0] / + (float)digital_clock5_maxY), + + (int)((float)i * (float)digital_clock5_maxX / (float)digital_clock5_maxY * + (float)digital_clock5_size * 1.1 + + (float)digital_clock5_location_x + + (float)digital_clock5_maxX / (float)digital_clock5_maxY * (float)digital_clock5_size * + (float)digital_clock5_triangleX[j + 1] / (float)digital_clock5_maxX), + (int)((float)digital_clock5_location_y + (float)digital_clock5_size * + (float)digital_clock5_triangleY[j + 1] / + (float)digital_clock5_maxY), + + (int)((float)i * (float)digital_clock5_maxX / (float)digital_clock5_maxY * + (float)digital_clock5_size * 1.1 + + (float)digital_clock5_location_x + + (float)digital_clock5_maxX / (float)digital_clock5_maxY * (float)digital_clock5_size * + (float)digital_clock5_triangleX[j + 2] / (float)digital_clock5_maxX), + (int)((float)digital_clock5_location_y + (float)digital_clock5_size * + (float)digital_clock5_triangleY[j + 2] / + (float)digital_clock5_maxY), + + BLACK); + } + } + } + + int digital_clock5_r = 0.05 * (float)digital_clock5_size; + + display.fillCircle( + (int)((float)digital_clock5_location_x + + 4.0 * (float)digital_clock5_maxX / (float)digital_clock5_maxY * (float)digital_clock5_size * 1.075 / 2.0), + (int)((float)digital_clock5_location_y + (float)digital_clock5_size * 0.4), digital_clock5_r, BLACK); + display.fillCircle( + (int)((float)digital_clock5_location_x + + 4.0 * (float)digital_clock5_maxX / (float)digital_clock5_maxY * (float)digital_clock5_size * 1.075 / 2.0), + (int)((float)digital_clock5_location_y + (float)digital_clock5_size * 0.6), digital_clock5_r, BLACK); + if (triangle0_fill != -1) + display.fillTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, + triangle0_color); + else + display.drawTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, + triangle0_color); + + if (line3_gradient <= line3_color && line3_thickness == 1) + display.drawLine(line3_start_x, line3_start_y, line3_end_x, line3_end_y, line3_color); + else if (line3_gradient <= line3_color && line3_thickness != 1) + display.drawThickLine(line3_start_x, line3_start_y, line3_end_x, line3_end_y, line3_color, line3_thickness); + else if (line3_gradient > line3_color && line3_thickness == 1) + display.drawGradientLine(line3_start_x, line3_start_y, line3_end_x, line3_end_y, line3_color, line3_gradient, + 1); + else if (line3_gradient > line3_color && line3_thickness != 1) + display.drawGradientLine(line3_start_x, line3_start_y, line3_end_x, line3_end_y, line3_color, line3_gradient, + line3_thickness); + + if (triangle1_fill != -1) + display.fillTriangle(triangle1_a_x, triangle1_a_y, triangle1_b_x, triangle1_b_y, triangle1_c_x, triangle1_c_y, + triangle1_color); + else + display.drawTriangle(triangle1_a_x, triangle1_a_y, triangle1_b_x, triangle1_b_y, triangle1_c_x, triangle1_c_y, + triangle1_color); + + if (line4_gradient <= line4_color && line4_thickness == 1) + display.drawLine(line4_start_x, line4_start_y, line4_end_x, line4_end_y, line4_color); + else if (line4_gradient <= line4_color && line4_thickness != 1) + display.drawThickLine(line4_start_x, line4_start_y, line4_end_x, line4_end_y, line4_color, line4_thickness); + else if (line4_gradient > line4_color && line4_thickness == 1) + display.drawGradientLine(line4_start_x, line4_start_y, line4_end_x, line4_end_y, line4_color, line4_gradient, + 1); + else if (line4_gradient > line4_color && line4_thickness != 1) + display.drawGradientLine(line4_start_x, line4_start_y, line4_end_x, line4_end_y, line4_color, line4_gradient, + line4_thickness); + + if (triangle2_color == BLACK) + { + if (triangle2_fill != -1) + display.fillTriangle(triangle2_a_x, triangle2_a_y, triangle2_b_x, triangle2_b_y, triangle2_c_x, + triangle2_c_y, triangle2_color); + else + display.drawTriangle(triangle2_a_x, triangle2_a_y, triangle2_b_x, triangle2_b_y, triangle2_c_x, + triangle2_c_y, triangle2_color); + } +} diff --git a/examples/4. Others/5-Inkplate_Maze_Generator/5-Inkplate_Maze_Generator.ino b/examples/4. Others/5-Inkplate_Maze_Generator/5-Inkplate_Maze_Generator.ino index 0f87341..8968b24 100644 --- a/examples/4. Others/5-Inkplate_Maze_Generator/5-Inkplate_Maze_Generator.ino +++ b/examples/4. Others/5-Inkplate_Maze_Generator/5-Inkplate_Maze_Generator.ino @@ -14,6 +14,10 @@ void setup() { Serial.begin(115200); display.begin(); + + pinMode(12, INPUT); + pinMode(13, INPUT); + // Generate and display the maze generateMaze(maze, w, h); showMaze(maze, w, h); diff --git a/src/Inkplate.cpp b/src/Inkplate.cpp index 49823e1..fe8b957 100644 --- a/src/Inkplate.cpp +++ b/src/Inkplate.cpp @@ -505,7 +505,7 @@ void Inkplate::einkOff() delay(6); PWRUP_CLEAR; WAKEUP_CLEAR; - delay(50); + delay(100); pinsZstate(); setPanelState(0); } @@ -555,9 +555,12 @@ void Inkplate::einkOn() Wire.requestFrom(0x48, 1); setTemperature(Wire.read()); - pinModeMCP(7, INPUT_PULLUP); - while (!digitalReadMCP(7)) - ; + // pinModeMCP(7, INPUT_PULLUP); + // while (!digitalReadMCP(7)) + // ; + + delay(100); + OE_SET; setPanelState(1); } diff --git a/src/include/ImageJPEG.cpp b/src/include/ImageJPEG.cpp index b71c4c5..a0e55d8 100644 --- a/src/include/ImageJPEG.cpp +++ b/src/include/ImageJPEG.cpp @@ -61,7 +61,8 @@ bool Image::drawJpegFromWeb(const char *url, int x, int y, bool dither, bool inv int32_t defaultLen = 800 * 600 * 4; uint8_t *buff = downloadFile(url, &defaultLen); - ret = drawJpegFromBuffer(buff, x, y, defaultLen, dither, invert); + + ret = drawJpegFromBuffer(buff, defaultLen, x, y, dither, invert); free(buff); return ret; @@ -71,7 +72,7 @@ bool Image::drawJpegFromWeb(WiFiClient *s, int x, int y, int32_t len, bool dithe { bool ret = 0; uint8_t *buff = downloadFile(s, len); - ret = drawJpegFromBuffer(buff, x, y, len, dither, invert); + ret = drawJpegFromBuffer(buff, len, x, y, dither, invert); free(buff); return ret; @@ -88,7 +89,8 @@ bool Image::drawJpegFromBuffer(uint8_t *buff, int32_t len, int x, int y, bool di TJpgDec.setJpgScale(1); TJpgDec.setCallback(drawJpegChunk); - if (TJpgDec.drawJpg(x, y, buff, len, dither, invert) == 0) + int err = TJpgDec.drawJpg(x, y, buff, len, dither, invert); + if (err == 0) ret = 1; return ret; diff --git a/src/include/NetworkClient.cpp b/src/include/NetworkClient.cpp index 75bba56..27e4806 100644 --- a/src/include/NetworkClient.cpp +++ b/src/include/NetworkClient.cpp @@ -5,13 +5,16 @@ bool NetworkClient::joinAP(const char *ssid, const char *pass) WiFi.mode(WIFI_MODE_STA); WiFi.begin(ssid, pass); + delay(3000); + int cnt = 0; while (!isConnected()) { - if (cnt > 15) + if (cnt > 20) return 0; delay(1000); ++cnt; + Serial.println(cnt); } return 1; @@ -57,7 +60,7 @@ uint8_t *NetworkClient::downloadFile(const char *url, int32_t *defaultLen) int32_t total = http.getSize(); int32_t len = total; - uint8_t buff[128] = {0}; + uint8_t buff[512] = {0}; WiFiClient *stream = http.getStreamPtr(); while (http.connected() && (len > 0 || len == -1)) @@ -73,7 +76,6 @@ uint8_t *NetworkClient::downloadFile(const char *url, int32_t *defaultLen) len -= c; buffPtr += c; } - yield(); } } http.end(); diff --git a/test/test.ino b/test/test.ino index 446f7df..204762a 100644 --- a/test/test.ino +++ b/test/test.ino @@ -6,18 +6,16 @@ void setup() { Serial.begin(115200); + pinMode(12, INPUT); + pinMode(13, INPUT); display.begin(); - Serial.println(display.joinAP("", "")); - delay(500); } void loop() { - display.clearDisplay(); - - Serial.println(display.drawBitmapFromWeb("http://img.cale.es/bmp/fasani/5e5ff140694ee", 0, 0, 1, 0)); - - display.display(); - delay(5000); + Serial.println(analogRead(12)); + Serial.println(analogRead(13)); + Serial.println(); + delay(1000); } \ No newline at end of file