Hackster is hosting Hackster Holidays, Ep. 5: Livestream & Giveaway Drawing. Watch now!Tune in to Hackster Holidays, Ep. 5 now!
NeoSteamLabs
Published © CC BY-SA

Project #15: Environment - SparkFun Thing Plus - ESP32 WROOM

#DonLuc #Environment #Electronics #Microcontrollers #ESP32 #SparkFun #Fritzing #Programming #Adafruit #Arduino #Consultant #Vlog #Aphasia

BeginnerWork in progress1 hour617
Project #15: Environment - SparkFun Thing Plus - ESP32 WROOM

Things used in this project

Hardware components

SparkFun Thing Plus - ESP32 WROOM
SparkFun Thing Plus - ESP32 WROOM
×1
Adafruit SHARP Memory Display
×1
5 mm LED: Green
5 mm LED: Green
×1
Adafruit Jumper Wires 3in M/M
×4
SparkFun Wire Solid Core - 22 AWG
×5
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1
SparkFun Cerberus USB Cable - 6ft
SparkFun Cerberus USB Cable - 6ft
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Fritzing

Code

DL2004Mk04p.ino

Arduino
// ***** Don Luc Electronics Β© *****
// Software Version Information
// Project #15: Environment - SparkFun Thing Plus - ESP32 WROOM - Mk01
// 04-04
// DL2004Mk04p.ino 15-01
// EEPROM with Unique ID
// 1 x SparkFun Thing Plus - ESP32 WROOM
// 1 x Adafruit SHARP Memory Display
// 1 x LED Green
// 4 x Jumper Wires 3in M/M
// 5 x Wire Solid Core - 22 AWG
// 1 x Half-Size Breadboard
// 1 x SparkFun Cerberus USB Cable

// Include the library code:
// EEPROM library to read and write EEPROM with unique ID for unit
#include "EEPROM.h"
#include <Adafruit_SharpMem.h>
#include <Adafruit_GFX.h>

// LED Green
int iLEDGreen = 21;

// 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 - 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

// Software Version Information
#define EEPROM_SIZE 64
String sver = "15-01";
// Unit ID information
String uid = "";

void loop() {

  // Return
  
}

getDisplay.ino

Arduino
// Display
// SHARP Memory Display - UID
void isDisplayUID() {

    // text display EEPROM
    display.setRotation(4);
    display.setTextSize(3);
    display.setTextColor(BLACK);
    display.setCursor(0,20);
    display.println( "Don Luc" );
    display.setTextSize(2);
    display.setCursor(0,50);
    display.println( "Electronics" );
    display.setTextSize(3);
    display.setCursor(0,80);   
    display.println( sver );
    display.setCursor(0,120);
    display.println( uid );
    display.refresh();
    delay( 100 );
    
}

getEEPROM.ino

Arduino
// EEPROM
// isUID
void isUID()
{
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 5; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

setup.ino

Arduino
// Setup
void setup() {

  // EEPROM with unique ID
  EEPROM.begin(EEPROM_SIZE);
  
  // EEPROM Unit ID
  isUID();
  
  // SHARP Display start & clear the display
  display.begin();
  display.clearDisplay();

  isDisplayUID();

  delay( 5000 );
  
  // LED Green
  pinMode(iLEDGreen, OUTPUT);
  digitalWrite(iLEDGreen, HIGH);

}

Credits

NeoSteamLabs

NeoSteamLabs

40 projects β€’ 14 followers
Luc Paquin Microcontrollers, IoT, Robotics Experts https://www.donluc.com https://www.donluc.com/luc https://www.linkedin.com/in/jlucpaquin

Comments