Tom van Loon
Published © CC BY-NC-SA

Using SPI Port 2 for Nokia LCD

An SPI config change for using a Nokia LCD.

IntermediateShowcase (no instructions)3 hours3,125
Using SPI Port 2 for Nokia LCD

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic

Code

Part of INI

C/C++
//
// SPI port 2 for Nokia LCD by @TOM - info at aquapoeder.nl
// https://www.hackster.io/Tom_van_Loon/using-spi-port-2-for-nokia-lcd-02e44b
//
// https://creativecommons.org/licenses/by-nc-sa/2.0/
// Feel free to send me your adaptions
//
// Part of INI


#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>


// LCD setup change
// Reset = 10
// CE    = gnd
// DC    = 11
// Din   = 12
// CLK   = 13

Adafruit_PCD8544 display = Adafruit_PCD8544(13, 12, 11, 8, 10);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH  16

Part of SETUP

C/C++
Part of setup
// Part of SETUP

void setup()   {
  
  Serial.begin(9600);

  display.begin();
  
  // init done you can change the contrast for the best viewing!
  
  display.setContrast(55);
  

Part of LOOP

C/C++
Part of MAIN
void loop() {

display.display();

    display.setTextSize(1);
    display.setTextColor(BLACK);
    display.setCursor(0,0);
   
    display.println("T2 =");
    
}

Library 1

Library 1

Library 2

Library 2

Credits

Tom van Loon
4 projects • 2 followers
Sr Test Technician - OPS
Contact
Thanks to Avd.

Comments

Please log in or sign up to comment.