Skip to content

Commit

Permalink
Merge pull request #5 from Plaenkler/firmware-example
Browse files Browse the repository at this point in the history
[FIX] Superfluous components
  • Loading branch information
Plaenkler authored Apr 26, 2024
2 parents 1d567dc + 1402cba commit d0042d3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#ifndef _800x480_H_
#define _800x480_H_
#ifndef _750_T7_H_
#define _750_T7_H_

#include <pgmspace.h>
#include <GxEPD2_BW.h>

GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> display(
GxEPD2_750_T7(6, 7, 10, 3)
);

const unsigned char image[] PROGMEM = {
0x55, 0x55, 0x55, 0x6d, 0xb6, 0xdb, 0x6d, 0xb5, 0x6a, 0xbf, 0xf5, 0x22,
Expand Down Expand Up @@ -4006,4 +4010,4 @@ const unsigned char image[] PROGMEM = {
0x28, 0x02, 0x40, 0x0a, 0x76, 0xff, 0xfa, 0xde, 0xda, 0xa0, 0x14, 0xab
};

#endif // 800x480_H_F
#endif // _750_T7_H_
18 changes: 2 additions & 16 deletions Gulu_ESP32-C3_ePaper_Firmware/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,11 @@
; https://docs.platformio.org/page/projectconf.html

[env:gulu_esp32-c3_epaper]
; -- Build options --
platform = espressif32
board = esp32-c3-devkitc-02
framework = arduino
lib_deps =
zinggjm/GxEPD2@^1.5.1
build_type = debug
zinggjm/GxEPD2@^1.5.6
build_flags =
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
; -- Upload options --
; upload_port = COMX
upload_speed = 115200
; -- Monitor options --
; monitor_port = COMX
monitor_speed = 115200
; monitor_rts = 0
; monitor_dtr = 0
monitor_filters =
time
colorize
esp32_exception_decoder
-D ARDUINO_USB_CDC_ON_BOOT=1
18 changes: 6 additions & 12 deletions Gulu_ESP32-C3_ePaper_Firmware/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#include <Arduino.h>
#include <GxEPD2_BW.h>

#include "800x480.h"

GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT>
display(GxEPD2_750_T7(6, 7, 10, 3));
#include "750_T7.h"

void setup() {
pinMode(0, OUTPUT);
Expand All @@ -13,10 +7,10 @@ void setup() {

void loop() {
display.drawImage(image, 0, 0, 800, 480);
digitalWrite(0, HIGH);
delay(1000);
digitalWrite(0, LOW);
delay(1000);
esp_sleep_enable_timer_wakeup(10e6);
display.hibernate();
digitalWrite(0, 1);
delay(1e3);
digitalWrite(0, 0);
esp_sleep_enable_timer_wakeup(1e7);
esp_deep_sleep_start();
}

0 comments on commit d0042d3

Please sign in to comment.