From 37efdced57bbb5f91a209aa7a007192f283ceeb4 Mon Sep 17 00:00:00 2001 From: Mike Causer Date: Fri, 11 Mar 2016 09:15:24 +1100 Subject: [PATCH] More Nokia 5110 examples --- .../conways-game-of-life.ino | 165 ++++++++++++++++++ .../PCD8544-Nokia-5110-84x48/cube/cube.ino | 130 ++++++++++++++ .../hello-nokia/hello-nokia.ino | 85 +++++++++ .../hello-nokia/nokia-hands-84x48.h | 36 ++++ .../hello-nokia/nokia-home-84x48.h | 36 ++++ .../hello-wemos/hello-wemos.ino | 69 ++++---- .../hello-wemos/wemos-logo-84x28.h | 1 + .../hello-wemos/wemos-logo-84x48.h | 1 + .../hello-wemos/wemos-w-53x48.h | 1 + .../hello-wemos/wemos-w-84x48.h | 1 + .../hello-world/hello-world.ino | 59 ++++--- .../qr-code/qr-code-25x25.h | 28 +++ .../qr-code/qr-code.ino | 78 +++++++++ .../rotate/rotate.ino | 105 +++++++++++ .../screen-saver/cool-smiley-15x15.h | 18 ++ .../screen-saver/screen-saver.ino | 110 ++++++++++++ .../screen-saver/smiley-9x9.h | 12 ++ .../spiral-animation/spiral-1-84x48.h | 36 ++++ .../spiral-animation/spiral-2-84x48.h | 36 ++++ .../spiral-animation/spiral-3-84x48.h | 36 ++++ .../spiral-animation/spiral-4-84x48.h | 36 ++++ .../spiral-animation/spiral-5-84x48.h | 36 ++++ .../spiral-animation/spiral-6-84x48.h | 36 ++++ .../spiral-animation/spiral-7-84x48.h | 36 ++++ .../spiral-animation/spiral-8-84x48.h | 36 ++++ .../spiral-animation/spiral-animation.ino | 119 +++++++++++++ .../wifi-signal-strength.ino | 149 ++++++++++++++++ 27 files changed, 1428 insertions(+), 63 deletions(-) create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/conways-game-of-life/conways-game-of-life.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/cube/cube.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/hello-nokia.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-hands-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-home-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code-25x25.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/rotate/rotate.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/cool-smiley-15x15.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/screen-saver.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/smiley-9x9.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-1-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-2-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-3-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-4-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-5-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-6-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-7-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-8-84x48.h create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-animation.ino create mode 100644 05.Displays/PCD8544-Nokia-5110-84x48/wifi-signal-strength/wifi-signal-strength.ino diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/conways-game-of-life/conways-game-of-life.ino b/05.Displays/PCD8544-Nokia-5110-84x48/conways-game-of-life/conways-game-of-life.ino new file mode 100644 index 0000000..c22eedf --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/conways-game-of-life/conways-game-of-life.ino @@ -0,0 +1,165 @@ +/* Conway's Game of Life + * https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life + * + * The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, + * each of which is in one of two possible states, alive or dead. + * + * Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, + * or diagonally adjacent. + * + * At each step in time, the following transitions occur: + * 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. + * 2. Any live cell with two or three live neighbours lives on to the next generation. + * 3. Any live cell with more than three live neighbours dies, as if by over-population. + * 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + +#define PIXEL_SIZE 4 // Big pixels +#define SPEED 20 // Delay in ms between generations + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); + + display.clearDisplay(); + display.setTextSize(1); + display.setTextColor(BLACK); + display.println("Conway's"); + display.println("Game of Life"); + display.display(); + delay(2000); +} + +void loop() { + // Random Seed + display.clearDisplay(); + randomise(); + display.display(); + delay(1000); + + // Begin + int generations = 0; + while(tick()) { + generations++; + display.display(); + delay(SPEED); + } + + // Finish + display.setTextColor(BLACK, WHITE); + display.setCursor(0,0); + display.println(generations); + display.display(); + + // Restart + delay(5000); +} + +void randomise() { + for (uint8_t x = 0; x < LCDWIDTH; x = x + PIXEL_SIZE) { + for (uint8_t y = 0; y < LCDHEIGHT; y = y + PIXEL_SIZE) { + cell(x, y, random(0,2)); // 0 = White, 1 = Black + } + } +} + +void cell(int x, int y, int color) { + for (uint8_t i = 0; i < PIXEL_SIZE; i++) { + for (uint8_t j = 0; j < PIXEL_SIZE; j++) { + display.drawPixel(x + i, y + j, color); + } + } +} + +bool tick() { + bool something_happened = false; + for (uint8_t x = 0; x < LCDWIDTH; x = x + PIXEL_SIZE) { + for (uint8_t y = 0; y < LCDHEIGHT; y = y + PIXEL_SIZE) { + + // The current cell + uint8_t alive = display.getPixel(x, y); + + // Count number of neighbours + uint8_t neighbours = ( + display.getPixel(x - PIXEL_SIZE, y - PIXEL_SIZE) + + display.getPixel(x, y - PIXEL_SIZE) + + display.getPixel(x + PIXEL_SIZE, y - PIXEL_SIZE) + + display.getPixel(x - PIXEL_SIZE, y) + + display.getPixel(x + PIXEL_SIZE, y) + + display.getPixel(x + PIXEL_SIZE, y + PIXEL_SIZE) + + display.getPixel(x, y + PIXEL_SIZE) + + display.getPixel(x - PIXEL_SIZE, y + PIXEL_SIZE) + ); + + // Apply the rules of life + if (alive && (neighbours < 2 || neighbours > 3)) { + cell(x, y, WHITE); // death + if (!something_happened) something_happened = true; + } + else if (!alive && neighbours == 3) { + cell(x, y, BLACK); // birth + if (!something_happened) something_happened = true; + } + } + } + + return something_happened; +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/cube/cube.ino b/05.Displays/PCD8544-Nokia-5110-84x48/cube/cube.ino new file mode 100644 index 0000000..4b9b1ab --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/cube/cube.ino @@ -0,0 +1,130 @@ +/* Rotating 3D cube + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + + +#define SHAPE_SIZE 700 +#define ROTATION_SPEED 25 // Delay in ms between cube redraws + +float d = 3; +float px[] = { -d, d, d, -d, -d, d, d, -d }; +float py[] = { -d, -d, d, d, -d, -d, d, d }; +float pz[] = { -d, -d, -d, -d, d, d, d, d }; + +float p2x[] = {0,0,0,0,0,0,0,0}; +float p2y[] = {0,0,0,0,0,0,0,0}; + +float r[] = {0,0,0}; + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); + + display.clearDisplay(); + display.setTextSize(1); + display.setTextColor(BLACK); + display.display(); +} + +void loop() { + drawCube(); + delay(ROTATION_SPEED); +} + +void drawCube() { + r[0] = r[0] + PI / 180.0; // Add a degree + r[1] = r[1] + PI / 180.0; // Add a degree + r[2] = r[2] + PI / 180.0; // Add a degree + if (r[0] >= 360.0 * PI / 180.0) r[0] = 0; + if (r[1] >= 360.0 * PI / 180.0) r[1] = 0; + if (r[2] >= 360.0 * PI / 180.0) r[2] = 0; + + for (int i = 0; i < 8; i++) { + float px2 = px[i]; + float py2 = cos(r[0]) * py[i] - sin(r[0]) * pz[i]; + float pz2 = sin(r[0]) * py[i] + cos(r[0]) * pz[i]; + + float px3 = cos(r[1]) * px2 + sin(r[1]) * pz2; + float py3 = py2; + float pz3 = -sin(r[1]) * px2 + cos(r[1]) * pz2; + + float ax = cos(r[2]) * px3 - sin(r[2]) * py3; + float ay = sin(r[2]) * px3 + cos(r[2]) * py3; + float az = pz3 - 150; + + p2x[i] = LCDWIDTH / 2 + ax * SHAPE_SIZE / az; + p2y[i] = LCDHEIGHT / 2 + ay * SHAPE_SIZE / az; + } + + display.clearDisplay(); + + for (int i = 0; i < 3; i++) { + display.drawLine(p2x[i], p2y[i], p2x[i+1], p2y[i+1], BLACK); + display.drawLine(p2x[i+4], p2y[i+4], p2x[i+5], p2y[i+5], BLACK); + display.drawLine(p2x[i], p2y[i], p2x[i+4], p2y[i+4], BLACK); + } + + display.drawLine(p2x[3], p2y[3], p2x[0], p2y[0], BLACK); + display.drawLine(p2x[7], p2y[7], p2x[4], p2y[4], BLACK); + display.drawLine(p2x[3], p2y[3], p2x[7], p2y[7], BLACK); + + display.display(); +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/hello-nokia.ino b/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/hello-nokia.ino new file mode 100644 index 0000000..de57925 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/hello-nokia.ino @@ -0,0 +1,85 @@ +/* Hello Nokia + * Displays a few Nokia bitmaps + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Bitmaps +#include "nokia-hands-84x48.h" +#include "nokia-home-84x48.h" + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); +} + +void loop() { + display.clearDisplay(); + display.drawBitmap(0, 0, Nokia_hands_84x48, 84, 48, 1); + display.display(); + Serial.println("Show Nokia splash screen handshake bitmap"); + delay(2000); + + display.clearDisplay(); + display.drawBitmap(0, 0, Nokia_home_84x48, 84, 48, 1); + Serial.println("Show Nokia home screen bitmap"); + display.display(); + delay(2000); +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-hands-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-hands-84x48.h new file mode 100644 index 0000000..c135491 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-hands-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/nokia-hands-84x48.bmp +const uint8_t Nokia_hands_84x48[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x03, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x03, 0xfe, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0xdf, 0x01, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x06, 0xff, 0xff, 0x00, 0x7f, 0xff, + 0xff, 0xf0, 0x00, 0x00, 0x0e, 0x7b, 0xff, 0xfe, 0x00, 0x03, 0xff, 0xff, 0xf0, 0x92, 0x49, 0x31, + 0xef, 0xff, 0xfc, 0x49, 0x27, 0xff, 0xff, 0xf0, 0x00, 0x04, 0xe7, 0xdf, 0xfe, 0x00, 0x00, 0x07, + 0xf7, 0xff, 0xf0, 0x24, 0x93, 0x1f, 0x3f, 0xff, 0x49, 0x24, 0x9f, 0xa3, 0xff, 0xf0, 0x00, 0x00, + 0xfe, 0xff, 0xff, 0x80, 0x00, 0x2e, 0xc3, 0xff, 0xf0, 0xaa, 0x83, 0xfb, 0xff, 0xff, 0xe5, 0x41, + 0xee, 0xc7, 0xfe, 0xd0, 0x00, 0x07, 0xd7, 0xff, 0xc7, 0xf0, 0x07, 0xff, 0xef, 0x80, 0x00, 0x54, + 0x06, 0xaf, 0xfc, 0xeb, 0xfb, 0x3e, 0x6e, 0xff, 0xa9, 0x50, 0x00, 0x05, 0xff, 0xf8, 0x60, 0x70, + 0x3f, 0xef, 0xfe, 0x12, 0x00, 0xa0, 0x0b, 0xff, 0xf1, 0x0a, 0x06, 0x9e, 0xff, 0xfd, 0x49, 0x60, + 0x00, 0x03, 0xff, 0xca, 0x44, 0x21, 0x00, 0x1f, 0x78, 0x92, 0x00, 0x80, 0x07, 0x7f, 0xc5, 0x32, + 0x9a, 0x6e, 0x8e, 0x72, 0x49, 0xb0, 0x00, 0x8a, 0xff, 0x92, 0x95, 0x45, 0x10, 0x51, 0x09, 0x54, + 0x40, 0x00, 0x17, 0xff, 0x2c, 0xa4, 0xb2, 0xd5, 0x54, 0xd4, 0xab, 0x20, 0x02, 0x43, 0xfc, 0x52, + 0x1a, 0x4c, 0x4a, 0xa6, 0x4b, 0x49, 0x50, 0x20, 0x3f, 0xfe, 0xaa, 0xd3, 0x66, 0xb5, 0x32, 0xb4, + 0xac, 0xa0, 0x13, 0xdf, 0xff, 0x54, 0x0c, 0x99, 0x4a, 0xcd, 0x4b, 0x53, 0x50, 0xdc, 0xff, 0xfe, + 0x23, 0xf1, 0x66, 0xd9, 0x32, 0xb4, 0xac, 0xa0, 0x6f, 0x7f, 0xfe, 0xff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0, 0xf8, 0x7c, 0x03, 0x00, 0x00, 0xc3, 0x83, 0xc3, 0x00, 0x03, 0xf0, 0xf8, 0x7e, + 0x03, 0x00, 0x00, 0xc3, 0xc1, 0xc2, 0x1f, 0xe1, 0xf0, 0xf8, 0x7f, 0x03, 0x80, 0x01, 0xc3, 0xe0, + 0xc2, 0x1f, 0xe1, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, +}; diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-home-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-home-84x48.h new file mode 100644 index 0000000..a4d32e8 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-nokia/nokia-home-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/nokia-home-84x48.bmp +const uint8_t Nokia_home_84x48[] PROGMEM = { + 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x78, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x78, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x08, 0xce, 0x66, 0xce, 0x00, + 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x0c, 0xdb, 0x6c, 0xdb, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, + 0x00, 0x0e, 0xdb, 0x78, 0xdb, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x0f, 0xdb, 0x70, 0xdb, + 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x0d, 0xdb, 0x78, 0xdf, 0x00, 0x00, 0x00, 0x70, 0x70, + 0x00, 0x00, 0x0c, 0xdb, 0x6c, 0xdb, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x0c, 0x4e, 0x66, + 0xdb, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x73, 0x9e, 0x6c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf6, 0xdb, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0xb7, 0xdb, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x36, 0x1b, + 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x33, 0xdb, 0x3c, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/hello-wemos.ino b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/hello-wemos.ino index c09489e..97caccd 100644 --- a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/hello-wemos.ino +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/hello-wemos.ino @@ -1,27 +1,28 @@ -/* -Hello WeMos -Displays a few WeMos bitmaps - -Connections: -WeMos Nokia 5110 Description -D1 Mini PCD8544 LCD -(ESP8266) - -D2 (GPIO4) 0 RST Output from ESP to reset display -D1 (GPIO5) 1 CE Output from ESP to chip select/enable display -D6 (GPIO12) 2 DC Output from display data/command to ESP -D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input -D5 (GPIO14) 4 Clk Output from ESP SPI clock -3V3 5 Vcc 3.3V from ESP to display -D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM -G 7 Gnd Ground - -Dependencies: -https://github.com/adafruit/Adafruit-GFX-Library -https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library -- This pull request adds ESP8266 support: -- https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 -*/ +/* Hello WeMos + * Displays a few WeMos bitmaps + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ #include @@ -29,18 +30,18 @@ https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library #include #include -// bitmaps +// Bitmaps #include "wemos-logo-84x48.h" #include "wemos-logo-84x28.h" #include "wemos-w-53x48.h" #include "wemos-w-84x48.h" -// pins +// Pins const int8_t RST_PIN = D2; const int8_t CE_PIN = D1; const int8_t DC_PIN = D6; -//const int8_t DIN_PIN = D7; // uncomment for Software SPI -//const int8_t CLK_PIN = D5; // uncomment for Software SPI +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI const int8_t BL_PIN = D0; @@ -63,10 +64,10 @@ void setup() { digitalWrite(BL_PIN, HIGH); display.begin(); - display.setContrast(60); // adjust for your display + display.setContrast(60); // Adjust for your display Serial.println("Show Adafruit logo bitmap"); - // show the Adafruit logo, which is preloaded into the buffer by their library + // Show the Adafruit logo, which is preloaded into the buffer by their library // display.clearDisplay(); delay(2000); } @@ -79,8 +80,8 @@ void loop() { delay(2000); display.clearDisplay(); - display.fillScreen(1); // black background - display.drawBitmap(0, 10, WeMos_logo_84x28, 84, 28, WHITE); // draw white pixels 'inverted' + display.fillScreen(1); // Black background + display.drawBitmap(0, 10, WeMos_logo_84x28, 84, 28, WHITE); // Draw white pixels 'inverted' display.display(); Serial.println("Show WeMos logo 84x28 bitmap"); delay(2000); @@ -92,8 +93,8 @@ void loop() { delay(2000); display.clearDisplay(); - display.fillScreen(1); // black background - display.drawBitmap(15, 0, WeMos_W_53x48, 53, 48, WHITE); // draw white pixels 'inverted' + display.fillScreen(1); // Black background + display.drawBitmap(15, 0, WeMos_W_53x48, 53, 48, WHITE); // Draw white pixels 'inverted' Serial.println("Show WeMos W logo 53x48 bitmap"); display.display(); delay(2000); diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x28.h b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x28.h index 074cc57..79b755e 100644 --- a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x28.h +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x28.h @@ -1,3 +1,4 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/wemos-logo-84x28.bmp const uint8_t WeMos_logo_84x28[] PROGMEM = { 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1e, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x0f, 0x1e, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf8, diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x48.h index 15bc043..0861f43 100644 --- a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x48.h +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-logo-84x48.h @@ -1,3 +1,4 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/wemos-logo-84x48.bmp // the logo is vertically centred with 10px of whitespace above and below // this is not very efficient - instead, use the next bitmap and render it 10px down const uint8_t WeMos_logo_84x48[] PROGMEM = { diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-53x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-53x48.h index 2efd9a8..30471a9 100644 --- a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-53x48.h +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-53x48.h @@ -1,3 +1,4 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/wemos-w-53x48.bmp const uint8_t WeMos_W_53x48[] PROGMEM = { 0x00, 0xe0, 0x00, 0x00, 0x01, 0x80, 0x07, 0x01, 0xf0, 0x00, 0x00, 0x07, 0xc0, 0x07, 0x03, 0xf8, 0x00, 0x00, 0x0f, 0xe0, 0x07, 0x07, 0xf8, 0x00, 0x00, 0x0f, 0xf0, 0x07, 0x07, 0xf0, 0x00, 0x00, diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-84x48.h index c009021..510ed10 100644 --- a/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-84x48.h +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-wemos/wemos-w-84x48.h @@ -1,3 +1,4 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/wemos-w-84x48.bmp // the logo is horizontally centred with 15px of whitespace left and 16px right // this is not very efficient - instead, use the next bitmap and render it 15px across const uint8_t WeMos_W_84x48[] PROGMEM = { diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/hello-world/hello-world.ino b/05.Displays/PCD8544-Nokia-5110-84x48/hello-world/hello-world.ino index 4c2cf41..29299e4 100644 --- a/05.Displays/PCD8544-Nokia-5110-84x48/hello-world/hello-world.ino +++ b/05.Displays/PCD8544-Nokia-5110-84x48/hello-world/hello-world.ino @@ -1,27 +1,28 @@ -/* -Hello World -Display a simple message on the first line of the screen - -Connections: -WeMos Nokia 5110 Description -D1 Mini PCD8544 LCD -(ESP8266) - -D2 (GPIO4) 0 RST Output from ESP to reset display -D1 (GPIO5) 1 CE Output from ESP to chip select/enable display -D6 (GPIO12) 2 DC Output from display data/command to ESP -D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input -D5 (GPIO14) 4 Clk Output from ESP SPI clock -3V3 5 Vcc 3.3V from ESP to display -D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM -G 7 Gnd Ground - -Dependencies: -https://github.com/adafruit/Adafruit-GFX-Library -https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library -- This pull request adds ESP8266 support: -- https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 -*/ +/* Hello World + * Display a simple message on the first line of the screen + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ #include @@ -29,12 +30,12 @@ https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library #include #include -// pins +// Pins const int8_t RST_PIN = D2; const int8_t CE_PIN = D1; const int8_t DC_PIN = D6; -//const int8_t DIN_PIN = D7; // uncomment for Software SPI -//const int8_t CLK_PIN = D5; // uncomment for Software SPI +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI const int8_t BL_PIN = D0; @@ -57,10 +58,10 @@ void setup() { digitalWrite(BL_PIN, HIGH); display.begin(); - display.setContrast(60); // adjust for your display + display.setContrast(60); // Adjust for your display Serial.println("Show Adafruit logo bitmap"); - // show the Adafruit logo, which is preloaded into the buffer by their library + // Show the Adafruit logo, which is preloaded into the buffer by their library // display.clearDisplay(); delay(2000); diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code-25x25.h b/05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code-25x25.h new file mode 100644 index 0000000..4454303 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code-25x25.h @@ -0,0 +1,28 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/qr-code-25x25.bmp +const uint8_t QR_Code_25x25[] PROGMEM = { + 0xfe, 0x23, 0x3f, 0x80, + 0x82, 0xe3, 0x20, 0x80, + 0xba, 0x81, 0x2e, 0x80, + 0xba, 0x46, 0x2e, 0x80, + 0xba, 0xed, 0x2e, 0x80, + 0x82, 0xaf, 0xa0, 0x80, + 0xfe, 0xaa, 0xbf, 0x80, + 0x00, 0xb3, 0x00, 0x00, + 0xd3, 0x16, 0xbb, 0x00, + 0xcc, 0x5e, 0xe0, 0x80, + 0xbe, 0x00, 0x49, 0x80, + 0x41, 0xf4, 0x70, 0x00, + 0x1e, 0xae, 0xf5, 0x80, + 0x34, 0x0a, 0x36, 0x80, + 0x96, 0x1a, 0xba, 0x80, + 0x7d, 0xd4, 0x89, 0x00, + 0xdb, 0x51, 0xfe, 0x00, + 0x00, 0xad, 0x8c, 0x80, + 0xfe, 0xe5, 0xad, 0x80, + 0x82, 0x4b, 0x8f, 0x00, + 0xba, 0x7c, 0xfc, 0x00, + 0xba, 0xca, 0x1e, 0x00, + 0xba, 0x07, 0x5a, 0x80, + 0x82, 0xfc, 0xc4, 0x00, + 0xfe, 0x81, 0xb1, 0x80 +}; diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code.ino b/05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code.ino new file mode 100644 index 0000000..972a9b7 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/qr-code/qr-code.ino @@ -0,0 +1,78 @@ +/* QR Code + * Displays a QR Code. + * You'll have to scan it to find out what it is. + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Bitmaps +#include "qr-code-25x25.h" + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); + + display.clearDisplay(); + display.drawBitmap(29, 11, QR_Code_25x25, 25, 25, 1); + display.display(); +} + +void loop() { +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/rotate/rotate.ino b/05.Displays/PCD8544-Nokia-5110-84x48/rotate/rotate.ino new file mode 100644 index 0000000..a6398b0 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/rotate/rotate.ino @@ -0,0 +1,105 @@ +/* Text Rotation + * Display some characters at 0, 90, 180 and 270 degrees + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // uncomment for Software SPI +//const int8_t CLK_PIN = D5; // uncomment for Software SPI +const int8_t BL_PIN = D0; + + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); + + display.clearDisplay(); + display.setTextSize(1); + display.setTextColor(BLACK); + display.display(); +} + +void loop() { + // setRotation(0) = 0 degrees + // setRotation(1) = 90 degrees counter clockwise + // setRotation(2) = 180 degrees counter clockwise + // setRotation(3) = 270 degrees counter clockwise + + for (uint8_t i = 0; i <= 3; i++) { + display.clearDisplay(); + display.setRotation(i); + display.setCursor(0,0); + // Print some ASCII characters (A-Z, a-z, 0-9, !-/, :-@) + for (char c = 'A'; c <= 'Z'; c++) { + display.print(c); + } + for (char c = 'a'; c <= 'z'; c++) { + display.print(c); + } + for (char c = '0'; c <= '9'; c++) { + display.print(c); + } + for (char c = 33; c <= 47; c++) { + display.print(c); + } + for (char c = 58; c <= 64; c++) { + display.print(c); + } + display.display(); + Serial.print(i * 90); + Serial.println(" degrees"); + delay(2000); + } +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/cool-smiley-15x15.h b/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/cool-smiley-15x15.h new file mode 100644 index 0000000..75f411c --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/cool-smiley-15x15.h @@ -0,0 +1,18 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/cool-smiley-15x15.bmp +const uint8_t Cool_Smiley_15x15[] PROGMEM = { + 0x07, 0xc1, + 0x18, 0x31, + 0x20, 0x09, + 0x40, 0x05, + 0x40, 0x05, + 0xff, 0xff, + 0xa7, 0x9b, + 0xae, 0xbb, + 0x9c, 0x73, + 0x80, 0x03, + 0x40, 0x25, + 0x43, 0xc5, + 0x20, 0x09, + 0x18, 0x31, + 0x07, 0xc1 +}; diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/screen-saver.ino b/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/screen-saver.ino new file mode 100644 index 0000000..02cacc0 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/screen-saver.ino @@ -0,0 +1,110 @@ +/* Screen Saver + * Move a bitmap around, bounce it off walls like an old screensaver + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Bitmaps +#include "cool-smiley-15x15.h" + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + +// 15x15 smiley +const int8_t ART_W = 15; +const int8_t ART_H = 15; + +// Area the smiley can move in +const int8_t BOUNDS_W = 69; // 84 - 15 +const int8_t BOUNDS_H = 33; // 48 - 15 + +// Direction smiley is moving +int8_t move_x = 1; +int8_t move_y = 1; + +// Pause between displaying frames +int pause = 500; + +// Start position +int8_t x = 1, y = 1; + + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); + + display.clearDisplay(); + display.display(); +} + +void loop() { + // Draw the bitmap + display.clearDisplay(); + display.drawBitmap(x, y, Cool_Smiley_15x15, 15, 15, 1); + display.display(); + delay(pause); + + // Move down right until hit bounds + // Then flip increment to decrement to bounce off the wall + x = x + move_x; + y = y + move_y; + if (x <= 0 || x >= BOUNDS_W) { + move_x = -move_x; + } + if (y <= 0 || y >= BOUNDS_H) { + move_y = -move_y; + } +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/smiley-9x9.h b/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/smiley-9x9.h new file mode 100644 index 0000000..d17614f --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/screen-saver/smiley-9x9.h @@ -0,0 +1,12 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/smiley-9x9.bmp +const uint8_t Smiley_9x9[] PROGMEM = { + 0x3e, 0x7f, + 0x41, 0x7f, + 0x94, 0xff, + 0x80, 0xff, + 0xbe, 0xff, + 0xbe, 0xff, + 0x9c, 0xff, + 0x41, 0x7f, + 0x3e, 0x7f +}; diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-1-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-1-84x48.h new file mode 100644 index 0000000..a929cea --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-1-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-1-84x48.bmp +const uint8_t Spiral_1_84x48[] PROGMEM = { + 0xf0, 0x1f, 0x81, 0xf8, 0x00, 0x00, 0x03, 0xe0, 0x7e, 0x07, 0xff, 0xe0, 0x3f, 0x03, 0xf0, 0x0f, + 0xfe, 0x01, 0xf8, 0x3e, 0x07, 0xff, 0xe0, 0x3e, 0x07, 0xc0, 0x7f, 0xff, 0xc0, 0x7c, 0x1f, 0x03, + 0xff, 0xc0, 0x7c, 0x0f, 0x81, 0xff, 0xbf, 0xf0, 0x3e, 0x0f, 0x83, 0xff, 0xc0, 0xfc, 0x1f, 0x07, + 0xe0, 0x00, 0xfc, 0x1f, 0x07, 0x81, 0xff, 0x80, 0xf8, 0x3c, 0x0f, 0x80, 0x00, 0x3e, 0x0f, 0x87, + 0xc1, 0xff, 0x01, 0xf0, 0x7c, 0x3e, 0x00, 0xf0, 0x0f, 0x87, 0x83, 0xc0, 0xff, 0x01, 0xf0, 0xf8, + 0x78, 0x0f, 0xff, 0x03, 0xc3, 0xc3, 0xe0, 0xff, 0x03, 0xe0, 0xf0, 0xf0, 0x7f, 0xff, 0xc1, 0xe1, + 0xe1, 0xe0, 0x7f, 0x03, 0xe1, 0xe1, 0xe0, 0xf8, 0x03, 0xf0, 0xf0, 0xe1, 0xf0, 0x7f, 0x07, 0xc1, + 0xe1, 0xc3, 0xe0, 0x00, 0x78, 0x70, 0xf0, 0xf0, 0x7f, 0x07, 0xc3, 0xc3, 0x87, 0x80, 0xe0, 0x3c, + 0x38, 0x70, 0xf0, 0x3f, 0x0f, 0x83, 0x87, 0x8f, 0x07, 0xfe, 0x0e, 0x3c, 0x78, 0x78, 0x3f, 0x0f, + 0x87, 0x87, 0x1e, 0x1f, 0xff, 0x87, 0x1c, 0x38, 0x78, 0x3f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x00, + 0x3f, 0x80, 0xf8, 0x1f, 0xcf, 0x80, 0x7c, 0x0f, 0x80, 0xff, 0xff, 0xfe, 0x03, 0xf0, 0x3f, 0x8f, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-2-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-2-84x48.h new file mode 100644 index 0000000..03b2504 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-2-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-2-84x48.bmp +const uint8_t Spiral_2_84x48[] PROGMEM = { + 0x80, 0x7e, 0x07, 0xe0, 0x0f, 0xfe, 0x00, 0xf8, 0x1f, 0x03, 0xff, 0x80, 0xfc, 0x0f, 0x80, 0x7f, + 0xff, 0xc0, 0x7c, 0x1f, 0x81, 0xff, 0x00, 0xf8, 0x1f, 0x03, 0xff, 0xff, 0xf0, 0x3e, 0x0f, 0x81, + 0xff, 0x01, 0xf8, 0x3e, 0x07, 0xf0, 0x01, 0xfc, 0x1f, 0x07, 0xc0, 0xff, 0x03, 0xf0, 0x7c, 0x1f, + 0x80, 0x00, 0x3e, 0x07, 0x83, 0xc0, 0xff, 0x03, 0xe0, 0xf8, 0x3e, 0x00, 0x00, 0x0f, 0x87, 0xc3, + 0xe0, 0x7f, 0x07, 0xc0, 0xf0, 0x78, 0x0f, 0xfe, 0x03, 0xc3, 0xc1, 0xe0, 0x7f, 0x07, 0xc1, 0xe0, + 0xf0, 0x7f, 0xff, 0xc1, 0xe1, 0xe1, 0xf0, 0x3f, 0x0f, 0x83, 0xc1, 0xe0, 0xfc, 0x07, 0xe0, 0xf0, + 0xe0, 0xf0, 0x3f, 0x0f, 0x83, 0xc3, 0xc3, 0xe0, 0x00, 0xf8, 0x70, 0xf0, 0xf8, 0x3f, 0x1f, 0x07, + 0x87, 0x87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ff, 0x07, 0xc1, 0xf0, 0x78, 0x0f, 0xff, 0xe0, + 0x3c, 0x0f, 0x03, 0xff, 0x07, 0xe0, 0xf8, 0x3e, 0x01, 0xfe, 0x00, 0xf8, 0x1f, 0x03, 0xff, 0x03, + 0xe0, 0x7c, 0x1f, 0x00, 0x00, 0x03, 0xf0, 0x3e, 0x07, 0xff, 0x03, 0xf0, 0x3e, 0x0f, 0xe0, 0x00, + 0x0f, 0xe0, 0x7c, 0x0f, 0xef, 0x01, 0xf8, 0x1f, 0x03, 0xfc, 0x00, 0x7f, 0x80, 0xf8, 0x0f, 0xef, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-3-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-3-84x48.h new file mode 100644 index 0000000..00a7d3b --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-3-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-3-84x48.bmp +const uint8_t Spiral_3_84x48[] PROGMEM = { + 0x01, 0xf8, 0x0f, 0x80, 0x7f, 0xff, 0x80, 0x7c, 0x0f, 0x80, 0xff, 0x01, 0xf8, 0x1f, 0x01, 0xff, + 0xff, 0xf0, 0x3e, 0x07, 0xc0, 0xff, 0x03, 0xf0, 0x3e, 0x07, 0xf8, 0x03, 0xf8, 0x1f, 0x07, 0xc0, + 0x7f, 0x07, 0xe0, 0x7c, 0x1f, 0x80, 0x00, 0x7e, 0x07, 0x83, 0xe0, 0x3f, 0x07, 0xc0, 0xf8, 0x3e, + 0x00, 0x00, 0x1f, 0x07, 0xc1, 0xf0, 0x3f, 0x0f, 0xc1, 0xf0, 0x78, 0x07, 0xfc, 0x07, 0xc3, 0xe1, + 0xf0, 0x3f, 0x0f, 0x83, 0xe0, 0xf0, 0x3f, 0xff, 0x81, 0xe1, 0xe0, 0xf8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f, + 0x0f, 0x03, 0xff, 0x03, 0xe1, 0xe1, 0xf0, 0x3f, 0x7e, 0x0f, 0x07, 0x87, 0x80, 0x00, 0x07, 0x83, + 0xc1, 0xf0, 0x3f, 0x3f, 0x07, 0x87, 0x83, 0xe0, 0x00, 0x1f, 0x07, 0x83, 0xe0, 0x7f, 0x3f, 0x07, + 0xc3, 0xc0, 0xfc, 0x00, 0xfe, 0x0f, 0x83, 0xc0, 0xff, 0x1f, 0x03, 0xc1, 0xf0, 0x7f, 0xff, 0xf8, + 0x1f, 0x07, 0xc0, 0xff, 0x1f, 0x81, 0xe0, 0xf8, 0x0f, 0xff, 0xe0, 0x3e, 0x0f, 0x81, 0xff, 0x0f, + 0xc1, 0xf0, 0x7c, 0x00, 0xfe, 0x00, 0xf8, 0x1f, 0x01, 0xff, 0x0f, 0xc0, 0xf8, 0x1f, 0x00, 0x00, + 0x03, 0xf0, 0x3f, 0x03, 0xff, 0x07, 0xe0, 0x7c, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x7e, 0x07, 0xff, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-4-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-4-84x48.h new file mode 100644 index 0000000..0bf7ad0 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-4-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-4-84x48.bmp +const uint8_t Spiral_4_84x48[] PROGMEM = { + 0x03, 0xf0, 0x3f, 0x01, 0xff, 0xff, 0xe0, 0x3e, 0x07, 0xe0, 0x3f, 0x07, 0xe0, 0x7c, 0x07, 0xfc, + 0x07, 0xf8, 0x0f, 0x03, 0xe0, 0x3f, 0x0f, 0xc0, 0xf8, 0x1f, 0xc0, 0x00, 0x7e, 0x07, 0x81, 0xf0, + 0x1f, 0x0f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, 0x0e, 0x1c, 0x1e, 0x0f, 0xf0, 0x38, 0x38, 0x70, + 0xf0, 0x00, 0x1c, 0x1c, 0x3c, 0x3e, 0x0f, 0xf8, 0x3c, 0x3c, 0x38, 0x7c, 0x00, 0x78, 0x38, 0x38, + 0x3c, 0x0f, 0xf8, 0x3c, 0x1c, 0x3c, 0x1f, 0x87, 0xf0, 0x70, 0x78, 0x7c, 0x0f, 0xf8, 0x1e, 0x1e, + 0x1e, 0x07, 0xff, 0xc0, 0xe0, 0xf0, 0x78, 0x0f, 0xfc, 0x1e, 0x0f, 0x0f, 0x00, 0xfc, 0x03, 0xc1, + 0xe0, 0xf8, 0x1f, 0xfc, 0x0f, 0x07, 0x87, 0xc0, 0x00, 0x0f, 0x83, 0xc0, 0xf0, 0x1f, 0x7e, 0x0f, + 0x83, 0xc1, 0xf0, 0x00, 0x3f, 0x07, 0xc1, 0xf0, 0x3f, 0x7e, 0x07, 0x83, 0xe0, 0xff, 0x01, 0xfc, + 0x0f, 0x83, 0xe0, 0x3f, 0x3f, 0x07, 0xc1, 0xf0, 0x3f, 0xff, 0xf0, 0x1f, 0x07, 0xc0, 0x7f, 0x3f, + 0x03, 0xe0, 0xf8, 0x07, 0xff, 0x80, 0x7e, 0x0f, 0xc0, 0x7f, 0x1f, 0x81, 0xf0, 0x3e, 0x00, 0x00, + 0x00, 0xf8, 0x0f, 0x80, 0xff, 0x1f, 0xc0, 0xf8, 0x1f, 0x80, 0x00, 0x03, 0xf0, 0x3f, 0x01, 0xff, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-5-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-5-84x48.h new file mode 100644 index 0000000..04dee4a --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-5-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral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diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-6-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-6-84x48.h new file mode 100644 index 0000000..8aca391 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-6-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-6-84x48.bmp +const uint8_t Spiral_6_84x48[] PROGMEM = { + 0x3f, 0x81, 0xf8, 0x0f, 0xe0, 0x01, 0xfe, 0x07, 0xc0, 0xfc, 0x0f, 0x7f, 0x01, 0xf0, 0x3f, 0x00, + 0x00, 0x3f, 0x03, 0xe0, 0x7c, 0x0f, 0x7e, 0x03, 0xe0, 0x7c, 0x00, 0x00, 0x07, 0xc1, 0xf0, 0x3e, + 0x0f, 0xfe, 0x07, 0xc1, 0xf0, 0x07, 0xfc, 0x03, 0xe0, 0xf8, 0x3f, 0x0f, 0xfc, 0x0f, 0x83, 0xe0, + 0x3f, 0xff, 0x80, 0xf0, 0x78, 0x1f, 0x0f, 0xfc, 0x0f, 0x07, 0xc1, 0xff, 0x1f, 0xe0, 0x78, 0x3c, + 0x1f, 0x8f, 0xf8, 0x1e, 0x0f, 0x03, 0xe0, 0x00, 0xf8, 0x3c, 0x3e, 0x0f, 0x8f, 0xf8, 0x3e, 0x0e, + 0x0f, 0x80, 0x00, 0x3c, 0x1e, 0x1e, 0x0f, 0x8f, 0xf0, 0x3c, 0x1e, 0x1e, 0x00, 0xf0, 0x0e, 0x0e, + 0x0f, 0x07, 0xcf, 0xf0, 0x78, 0x3c, 0x3c, 0x0f, 0xfe, 0x07, 0x07, 0x0f, 0x07, 0xcf, 0xe0, 0x78, + 0x78, 0x78, 0x3f, 0xff, 0x83, 0x87, 0x87, 0x87, 0xcf, 0xe0, 0xf8, 0x70, 0xf0, 0xf8, 0x03, 0xe1, + 0xc3, 0x87, 0x83, 0xef, 0xc0, 0xf0, 0xf0, 0xe1, 0xc0, 0x00, 0x70, 0xe3, 0xc3, 0x83, 0xef, 0xc0, + 0xf0, 0xe1, 0xc3, 0x81, 0xf0, 0x38, 0x61, 0xc3, 0x83, 0xef, 0xc1, 0xe1, 0xe3, 0x87, 0x0f, 0xfe, + 0x1c, 0x71, 0xc3, 0xc3, 0xef, 0xc1, 0xe1, 0xc3, 0x8e, 0x1e, 0x0f, 0x0c, 0x30, 0xe1, 0xc1, 0xef, + 0x81, 0xe1, 0xc3, 0x0c, 0x38, 0x03, 0x86, 0x38, 0xe1, 0xc1, 0xff, 0x83, 0xc3, 0xc7, 0x1c, 0x70, + 0x00, 0xc7, 0x18, 0xe1, 0xc1, 0xff, 0x83, 0xc3, 0x86, 0x18, 0xe3, 0xf8, 0xe3, 0x18, 0x71, 0xe1, + 0xff, 0x83, 0xc3, 0x86, 0x38, 0xc7, 0x9c, 0x63, 0x1c, 0x71, 0xe1, 0xff, 0x83, 0xc3, 0x8e, 0x31, + 0x8e, 0x06, 0x73, 0x1c, 0x71, 0xe1, 0xff, 0x83, 0xc3, 0x8e, 0x31, 0x8c, 0x46, 0x33, 0x9c, 0x71, + 0xe1, 0xff, 0x03, 0xc3, 0x8e, 0x73, 0x98, 0xf3, 0x31, 0x9c, 0x71, 0xe1, 0xff, 0x03, 0xc7, 0x8c, + 0x73, 0x19, 0xf3, 0x31, 0x9c, 0x71, 0xe1, 0xff, 0x03, 0x87, 0x0c, 0x73, 0x19, 0xb3, 0x33, 0x9c, + 0x71, 0xe1, 0xff, 0x03, 0x87, 0x0c, 0x73, 0x19, 0x86, 0x33, 0x9c, 0x71, 0xe1, 0xff, 0x03, 0xc7, + 0x8c, 0x73, 0x19, 0xce, 0x63, 0x1c, 0x71, 0xe1, 0xff, 0x03, 0xc3, 0x8e, 0x31, 0x98, 0xfc, 0x63, + 0x18, 0x61, 0xe1, 0xff, 0x03, 0xc3, 0x8e, 0x31, 0x8c, 0x00, 0xc7, 0x18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, + 0x1f, 0x03, 0xc0, 0x7f, 0xff, 0xfc, 0x07, 0x81, 0xf8, 0x0f, 0xfc, 0x0f, 0x81, 0xf0, 0x1f, 0xff, + 0xf0, 0x1f, 0x03, 0xf0, 0x0f, 0xfc, 0x07, 0xc0, 0xf8, 0x01, 0xff, 0x00, 0x3e, 0x03, 0xe0, 0x1f, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-7-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-7-84x48.h new file mode 100644 index 0000000..44c7bb4 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-7-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-7-84x48.bmp +const uint8_t Spiral_7_84x48[] PROGMEM = { + 0xfe, 0x03, 0xe0, 0x3f, 0x00, 0x00, 0x3f, 0x81, 0xf0, 0x3f, 0x0f, 0xfc, 0x07, 0xc0, 0xfc, 0x00, + 0x00, 0x0f, 0xc0, 0xf0, 0x3f, 0x0f, 0xfc, 0x0f, 0x81, 0xf0, 0x07, 0xf8, 0x03, 0xe0, 0x78, 0x1f, + 0x8f, 0xf8, 0x1f, 0x03, 0xe0, 0x3f, 0xff, 0x80, 0xf0, 0x7c, 0x0f, 0x8f, 0xf0, 0x1f, 0x07, 0x80, + 0xff, 0xff, 0xe0, 0x78, 0x3e, 0x0f, 0xcf, 0xf0, 0x3e, 0x0f, 0x03, 0xf0, 0x01, 0xf8, 0x3c, 0x1e, + 0x07, 0xcf, 0xe0, 0x7c, 0x1e, 0x0f, 0x80, 0x00, 0x3c, 0x1e, 0x0f, 0x07, 0xef, 0xe0, 0x78, 0x3c, + 0x1e, 0x00, 0x00, 0x1e, 0x0f, 0x0f, 0x07, 0xef, 0xc0, 0xf8, 0x38, 0x3c, 0x0f, 0xfe, 0x07, 0x87, + 0x07, 0x83, 0xef, 0xc0, 0xf0, 0x78, 0x78, 0x3f, 0xff, 0x83, 0xc3, 0x87, 0x83, 0xff, 0xc1, 0xf0, + 0xf0, 0xe0, 0xf8, 0x03, 0xe1, 0xc3, 0xc3, 0xc1, 0xff, 0x81, 0xe0, 0xe1, 0xe1, 0xe0, 0x00, 0xf0, + 0xe1, 0xc3, 0xc1, 0xff, 0x81, 0xe1, 0xe1, 0xc3, 0x80, 0xa0, 0x38, 0x71, 0xc1, 0xc1, 0xff, 0x83, + 0xe1, 0xc3, 0x87, 0x07, 0xfc, 0x1c, 0x70, 0xe1, 0xe1, 0xff, 0x03, 0xc3, 0xc7, 0x0e, 0x1f, 0xff, + 0x0e, 0x38, 0xe1, 0xe0, 0xff, 0x03, 0xc3, 0x87, 0x1c, 0x38, 0x03, 0x86, 0x18, 0x71, 0xe0, 0xff, + 0x07, 0x83, 0x86, 0x18, 0x70, 0x01, 0xc7, 0x18, 0x70, 0xe0, 0xff, 0x07, 0x87, 0x8e, 0x38, 0xe1, + 0xf0, 0xe3, 0x1c, 0x70, 0xe0, 0xff, 0x07, 0x87, 0x0e, 0x31, 0xc7, 0xfc, 0x63, 0x8c, 0x70, 0xf0, + 0xff, 0x07, 0x87, 0x0c, 0x71, 0x8e, 0x0e, 0x31, 0x8c, 0x30, 0xf0, 0xff, 0x07, 0x87, 0x1c, 0x73, + 0x9c, 0x07, 0x31, 0x8c, 0x30, 0xf0, 0xff, 0x07, 0x87, 0x1c, 0x63, 0x18, 0xe3, 0x31, 0x8e, 0x38, + 0xf0, 0xff, 0x0f, 0x87, 0x1c, 0x63, 0x39, 0xf3, 0x19, 0x8e, 0x38, 0xf0, 0xff, 0x0f, 0x07, 0x1c, + 0x63, 0x31, 0x33, 0x19, 0x8e, 0x38, 0xf0, 0xff, 0x0f, 0x07, 0x1c, 0x63, 0x33, 0x33, 0x31, 0x8e, + 0x38, 0xf0, 0xff, 0x0f, 0x07, 0x1c, 0x63, 0x33, 0x03, 0x31, 0x8c, 0x30, 0xf0, 0xff, 0x0f, 0x07, + 0x1c, 0x63, 0x31, 0x8e, 0x31, 0x8c, 0x70, 0xf0, 0xff, 0x0f, 0x07, 0x1c, 0x63, 0x18, 0xfc, 0x73, + 0x8c, 0x70, 0xe0, 0xff, 0x0f, 0x87, 0x1c, 0x63, 0x18, 0x78, 0x63, 0x1c, 0x70, 0xe0, 0xff, 0x07, + 0x87, 0x0c, 0x71, 0x8c, 0x01, 0xc7, 0x18, 0x70, 0xe0, 0xff, 0x07, 0x87, 0x0c, 0x31, 0x87, 0x03, + 0x86, 0x38, 0x61, 0xe0, 0xff, 0x07, 0x87, 0x0e, 0x30, 0xc3, 0xff, 0x0e, 0x38, 0xe1, 0xe1, 0xff, + 0x07, 0x87, 0x8e, 0x38, 0xe0, 0xfc, 0x1c, 0x70, 0xe1, 0xc1, 0xff, 0x07, 0x83, 0x87, 0x1c, 0x70, + 0x00, 0x38, 0x71, 0xc3, 0xc1, 0xff, 0x07, 0xc3, 0x87, 0x0c, 0x3c, 0x00, 0xf0, 0xe1, 0xc3, 0xc3, + 0xff, 0x03, 0xc3, 0xc3, 0x8e, 0x0f, 0xcf, 0xc1, 0xc3, 0x83, 0x83, 0xef, 0x03, 0xc1, 0xc3, 0x87, + 0x03, 0xff, 0x83, 0x87, 0x87, 0x83, 0xef, 0x03, 0xe1, 0xe1, 0xc3, 0xc0, 0x78, 0x07, 0x07, 0x0f, + 0x07, 0xef, 0x81, 0xe0, 0xe1, 0xe1, 0xe0, 0x00, 0x1e, 0x0e, 0x0f, 0x07, 0xcf, 0x81, 0xf0, 0xf0, + 0xf0, 0xf8, 0x00, 0x7c, 0x1e, 0x1e, 0x0f, 0xcf, 0x81, 0xf0, 0x78, 0x78, 0x3f, 0xff, 0xf0, 0x3c, + 0x1e, 0x0f, 0x8f, 0xc0, 0xf8, 0x78, 0x3c, 0x0f, 0xff, 0xc0, 0xf8, 0x3c, 0x1f, 0x8f, 0xc0, 0xf8, + 0x3c, 0x1e, 0x01, 0xfe, 0x01, 0xf0, 0x78, 0x1f, 0x0f, 0xc0, 0x7c, 0x1e, 0x0f, 0x80, 0x00, 0x07, + 0xc0, 0xf0, 0x3f, 0x0f, 0xe0, 0x7c, 0x0f, 0x03, 0xe0, 0x00, 0x1f, 0x81, 0xf0, 0x7e, 0x0f, 0xe0, + 0x3e, 0x07, 0x81, 0xfe, 0x01, 0xfe, 0x03, 0xe0, 0x7c, 0x0f, 0xf0, 0x1f, 0x03, 0xc0, 0x7f, 0xff, + 0xf8, 0x0f, 0xc0, 0xfc, 0x0f, 0xf0, 0x1f, 0x81, 0xf0, 0x0f, 0xff, 0xe0, 0x1f, 0x81, 0xf8, 0x0f, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-8-84x48.h b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-8-84x48.h new file mode 100644 index 0000000..3d92f5f --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-8-84x48.h @@ -0,0 +1,36 @@ +// See https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544/blob/master/bitmaps/spiral-8-84x48.bmp +const uint8_t Spiral_8_84x48[] PROGMEM = { + 0xf8, 0x0f, 0xc0, 0xfc, 0x00, 0x00, 0x0f, 0xc0, 0xf8, 0x1f, 0xcf, 0xf8, 0x1f, 0x81, 0xf8, 0x00, + 0xc0, 0x03, 0xe0, 0x7c, 0x0f, 0xcf, 0xf0, 0x1f, 0x03, 0xe0, 0x1f, 0xff, 0x01, 0xf0, 0x3c, 0x0f, + 0xef, 0xe0, 0x3e, 0x07, 0x80, 0xff, 0xff, 0xc0, 0x78, 0x3e, 0x07, 0xef, 0xe0, 0x7c, 0x0f, 0x03, + 0xfc, 0x07, 0xf0, 0x3c, 0x1f, 0x07, 0xef, 0xc0, 0x7c, 0x1e, 0x0f, 0xc0, 0x00, 0x7c, 0x1e, 0x0f, + 0x03, 0xff, 0xc0, 0x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xe1, 0xf0, 0x00, 0x3e, 0x0f, 0x0f, 0x03, 0xef, 0x03, 0xe0, 0xf0, 0xf0, 0x7e, 0x00, 0xfc, 0x1e, + 0x1f, 0x07, 0xef, 0x03, 0xe0, 0xf0, 0x78, 0x3f, 0xff, 0xf0, 0x3c, 0x1e, 0x07, 0xcf, 0x01, 0xf0, + 0x78, 0x3c, 0x07, 0xff, 0x80, 0xf8, 0x3c, 0x0f, 0xcf, 0x81, 0xf0, 0x3c, 0x1f, 0x00, 0x78, 0x01, + 0xf0, 0x7c, 0x1f, 0x8f, 0x80, 0xf8, 0x3e, 0x0f, 0xc0, 0x00, 0x07, 0xc0, 0xf8, 0x1f, 0x8f, 0xc0, + 0xfc, 0x1f, 0x03, 0xf0, 0x00, 0x3f, 0x81, 0xf0, 0x3f, 0x0f, 0xc0, 0x7c, 0x0f, 0x81, 0xff, 0x87, + 0xfe, 0x03, 0xe0, 0x7f, 0x0f, 0xe0, 0x3e, 0x07, 0xc0, 0x7f, 0xff, 0xf8, 0x0f, 0xc0, 0xfe, 0x0f, +}; \ No newline at end of file diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-animation.ino b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-animation.ino new file mode 100644 index 0000000..131c671 --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/spiral-animation/spiral-animation.ino @@ -0,0 +1,119 @@ +/* Spiral Animation + * Displays 8x bitmaps in a seemless loop + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include + +#include +#include +#include + +// Bitmaps +#include "spiral-1-84x48.h" +#include "spiral-2-84x48.h" +#include "spiral-3-84x48.h" +#include "spiral-4-84x48.h" +#include "spiral-5-84x48.h" +#include "spiral-6-84x48.h" +#include "spiral-7-84x48.h" +#include "spiral-8-84x48.h" + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + + +// Software SPI with explicit CE pin. +// Adafruit_PCD8544 display = Adafruit_PCD8544(CLK_PIN, DIN_PIN, DC_PIN, CE_PIN, RST_PIN); + +// Software SPI with CE tied to ground. Saves a pin but other pins can't be shared with other hardware. +// Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CE is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup() { + Serial.begin(9600); + Serial.println("\n\nWeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + display.begin(); + display.setContrast(60); // Adjust for your display + Serial.println("Show Adafruit logo bitmap"); + + // Show the Adafruit logo, which is preloaded into the buffer by their library + // display.clearDisplay(); + delay(2000); +} + +void loop() { + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_1_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_2_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_3_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_4_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_5_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_6_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_7_84x48, 84, 48, 1); + display.display(); + delay(50); + + display.clearDisplay(); + display.drawBitmap(0, 0, Spiral_8_84x48, 84, 48, 1); + display.display(); + delay(50); +} diff --git a/05.Displays/PCD8544-Nokia-5110-84x48/wifi-signal-strength/wifi-signal-strength.ino b/05.Displays/PCD8544-Nokia-5110-84x48/wifi-signal-strength/wifi-signal-strength.ino new file mode 100644 index 0000000..938bd1a --- /dev/null +++ b/05.Displays/PCD8544-Nokia-5110-84x48/wifi-signal-strength/wifi-signal-strength.ino @@ -0,0 +1,149 @@ +/* WiFi Signal Strength + * Shows RSSI of a predefined network with a graph + * + * RSSI is a percentage in the range -120db to 0db. + * The closer to 0 the better. + * + * Connections: + * WeMos D1 Mini Nokia 5110 Description + * (ESP8266) PCD8544 LCD + * + * D2 (GPIO4) 0 RST Output from ESP to reset display + * D1 (GPIO5) 1 CE Output from ESP to chip select/enable display + * D6 (GPIO12) 2 DC Output from display data/command to ESP + * D7 (GPIO13) 3 Din Output from ESP SPI MOSI to display data input + * D5 (GPIO14) 4 Clk Output from ESP SPI clock + * 3V3 5 Vcc 3.3V from ESP to display + * D0 (GPIO16) 6 BL 3.3V to turn backlight on, or PWM + * G 7 Gnd Ground + * + * More info: + * https://github.com/mcauser/WeMos-D1-mini-Nokia-5110-PCD8544 + * + * Dependencies: + * https://github.com/adafruit/Adafruit-GFX-Library + * https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library + * - This pull request adds ESP8266 support: + * - https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library/pull/27 + */ + +#include +#include +#include + +#include +#include +#include + +// Pins +const int8_t RST_PIN = D2; +const int8_t CE_PIN = D1; +const int8_t DC_PIN = D6; +//const int8_t DIN_PIN = D7; // Uncomment for Software SPI +//const int8_t CLK_PIN = D5; // Uncomment for Software SPI +const int8_t BL_PIN = D0; + +// Graph the RSSI of this WiFi +const char* myssid = "YOUR WIFI SSID"; +const char* mypass = "YOUR WIFI PASSWORD"; + +long rssi; +int8_t graph[83]; +uint8_t i, col, pos = 0; +bool scroll = false; + +// Software SPI with explicit CS pin. +//Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t CE_PIN, int8_t RST_PIN); + +// Software SPI with CS tied to ground. Saves a pin but other pins can't be shared with other hardware. +//Adafruit_PCD8544(int8_t CLK_PIN, int8_t DIN_PIN, int8_t DC_PIN, int8_t RST_PIN); + +// Hardware SPI based on hardware controlled SCK (SCLK) and MOSI (DIN) pins. CS is still controlled by any IO pin. +// NOTE: MISO and SS will be set as an input and output respectively, so be careful sharing those pins! +Adafruit_PCD8544 display = Adafruit_PCD8544(DC_PIN, CE_PIN, RST_PIN); + +void setup(void) { + Serial.begin(9600); + Serial.println("\nESP8266 WiFi Signal Strength Graph"); + Serial.println("WeMos D1 Mini + Nokia 5110 PCD8544 84x48 Monochrome LCD\nUsing Adafruit_PCD8544 and Adafruit_GFX libraries\n"); + + // Set WiFi to station mode and disconnect from an AP if it was previously connected + WiFi.mode(WIFI_STA); + WiFi.disconnect(); + delay(100); + + // Turn LCD backlight on + pinMode(BL_PIN, OUTPUT); + digitalWrite(BL_PIN, HIGH); + + // Configure LCD + display.begin(); + display.setContrast(60); // Adjust for your display + display.setTextSize(1); + display.setTextColor(BLACK); + display.setCursor(0,0); + display.clearDisplay(); + + WiFi.begin(myssid, mypass); + Serial.print("Connecting"); + display.print("Connecting"); + display.display(); + + // Wait for successful connection + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + display.print("."); + display.display(); + } + + Serial.print("\nConnected to: "); + Serial.println(myssid); + Serial.print("IP address: "); + Serial.println(WiFi.localIP()); + Serial.println(""); + + display.clearDisplay(); + display.println("Connected"); + display.display(); + delay(1000); +} + +void loop(void) { + rssi = WiFi.RSSI(); // eg. -63 + + // Convert to scale -48 to 0 eg. map(rssi, -100, 0, 0, -48); + // I used -100 instead of -120 because <= -95 is unusable + // Negative number so we can draw n pixels from the bottom in black + graph[pos] = (1.0 - (rssi / -100.0)) * -48.0; + + // Draw the RSSI eg. -63db + display.clearDisplay(); + display.printf("%ddb\n",rssi); + + // Draw the graph left to right until 84 columns visible + // After that shuffle the graph to the left and update the right most column + if (!scroll) { + for (i = 0; i <= pos; i++) { + display.drawFastVLine(i, LCDHEIGHT-1, graph[i], BLACK); + } + } + else { + for (i = 0; i < LCDWIDTH; i++) { + col = (i + pos + 1) % LCDWIDTH; + display.drawFastVLine(i, LCDHEIGHT-1, graph[col], BLACK); + } + } + display.display(); + + // After the first pass, scroll the graph to the left + if (pos == 83) { + pos = 0; + scroll = true; + } + else { + pos++; + } + + delay(100); // Adjust this to change graph speed +}