Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
NeoSteamLabs
Published © CC BY

Project #11: ESP32 Feather - SHARP Display - Mk01

Adafruit HUZZAH32 ESP32 Feather Board and Adafruit SHARP Memory Display Breakout

BeginnerFull instructions provided9 minutes1,411
Project #11: ESP32 Feather - SHARP Display - Mk01

Things used in this project

Hardware components

Adafruit HUZZAH32 ESP32
×1
Adafruit SHARP Display
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Fritzing

Code

http://www.donluc.com/DLHackster/DL1908Mk01/DL1908Mk01p/DL1908Mk01p.ino

Arduino
// ***** Don Luc Electronics  *****
// Software Version Information
// Project #11: HUZZAH32 ESP32 Feather - SHARP Display - Mk01
// 08-01
// DonLuc1908Mk01p.ino 11-01
// Adafruit HUZZAH32 ESP32 Feather Board
// SHARP Display
// LED Green

// include Library Code
#include <Adafruit_SharpMem.h>
#include <Adafruit_GFX.h>

// SHARP Memory Display
// any pins can be used
#define SHARP_SCK  13
#define SHARP_MOSI 12
#define SHARP_SS   27
// Set the size of the display here, e.g. 144x168!
Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);
// The currently-available SHARP Memory Display (144x168 pixels)
// requires > 4K of microcontroller RAM; it WILL NOT WORK on Arduino Uno
// or other <4K "classic" devices!
#define BLACK 0
#define WHITE 1
int minorHalfSize; // 1/2 of lesser of display width or height

// LED Green
int iLEDGreen =  21;          // LED Green

void loop() {

  // iLEDGreen Off
  digitalWrite(iLEDGreen, LOW);
  // SHARP Memory Display Off
  isDisplayOff();
  delay(2000);
  // iLEDGreen On
  digitalWrite(iLEDGreen, HIGH);
  // SHARP Memory Display On
  isDisplayOn();
  delay(2000);
  
}

getDisplay.ino

Arduino
// Display
// SHARP Memory Display On
void isDisplayOn() {

    // Clear Display
    display.clearDisplay();
    // text display tests
    display.setRotation(4);
    //display.clearDisplay();
    display.setTextSize(5);
    display.setTextColor(BLACK);
    display.setCursor(10,25);
    display.println("LED");
    display.setCursor(10,75);
    display.println("On");
    display.refresh();

}
// SHARP Memory Display Off
void isDisplayOff() {

    // Clear Display
    display.clearDisplay();
    // text display tests
    display.setRotation(4);
    //display.clearDisplay();
    display.setTextSize(5);
    display.setTextColor(BLACK);
    display.setCursor(10,25);
    display.println("LED");
    display.setCursor(10,75);
    display.println("Off");
    display.refresh();

}

setup.ino

Arduino
// Setup
void setup() {

  // SHARP Display start & clear the display
  display.begin();
  display.clearDisplay();
  
  // Initialize the LED Green
  pinMode(iLEDGreen, OUTPUT);
    
}

Credits

NeoSteamLabs
40 projects • 15 followers
Luc Paquin Microcontrollers, IoT, Robotics Experts https://www.donluc.com https://www.donluc.com/luc https://www.linkedin.com/in/jlucpaquin
Contact

Comments

Please log in or sign up to comment.