This commit is contained in:
Alexander 2024-07-15 00:55:26 -04:00
parent e92d831e7a
commit 7e2688fd40
3 changed files with 18 additions and 7 deletions

View File

@ -7,10 +7,6 @@
; ;
; Please visit documentation for the other options and examples ; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html ; https://docs.platformio.org/page/projectconf.html
; esp32-c3-devkitc-02
; esp32-c3-devkitm-1
;
; seeed_xiao_esp32c3
[env:esp32-c3-devkitc-02] [env:esp32-c3-devkitc-02]
platform = espressif32 platform = espressif32
@ -22,6 +18,8 @@ lib_deps =
adafruit/Adafruit GFX Library@^1.11.5 adafruit/Adafruit GFX Library@^1.11.5
adafruit/Adafruit BusIO@^1.14.1 adafruit/Adafruit BusIO@^1.14.1
adafruit/Adafruit BME280 Library@^2.2.2 adafruit/Adafruit BME280 Library@^2.2.2
zinggjm/GxEPD2@^1.5.8
zinggjm/GxEPD@^3.1.3
[platformio] [platformio]
description = ESP32 C3 Sensors node description = ESP32 C3 Sensors node

View File

@ -19,6 +19,7 @@
#include <GxIO/GxIO.h> #include <GxIO/GxIO.h>
#include <SD.h> #include <SD.h>
#include <SPI.h> #include <SPI.h>
#include <Adafruit_GFX.h> // Core graphics library
//#if defined(ESP8266) //#if defined(ESP8266)
//GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class //GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class
@ -31,8 +32,19 @@
//GxIO_Class io(SPI, SS, 22, 21); //GxIO_Class io(SPI, SS, 22, 21);
//GxEPD_Class display(io, 16, 4); //GxEPD_Class display(io, 16, 4);
GxIO_Class io(SPI, /* CS=SS=5 */ 7, /* DC=1 */ 6, /* RST=2 */ 5); //GxIO_Class io(SPI, /* CS=SS=5 */ SS, /* DC=1 */ 6, /* RST=2 */ 7);
GxEPD_Class display(io, /* RST=2;9 */ 5, /* BUSY=3;7 */ 4); //GxEPD_Class display(io, /* RST=2;9 */ 7, /* BUSY=3;7 */ 4);
#define BUSY_PIN 7
#define RST_PIN 9
#define DC_PIN 6
#define CS_PIN 5
#define SCL_PIN 4
#define SDA_PIN 6
GxIO_Class io(SPI, /* CS=SS=5 */ SS, /* DC=1 */ 6, /* RST=2 */ 7);
GxEPD_Class display(io);//, CS_PIN, DC_PIN, RST_PIN, BUSY_PIN);
/* /*
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32C3) #elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32C3)

View File

@ -108,6 +108,7 @@ void loop() {
Serial.println("Loop"); Serial.println("Loop");
Serial.print("SS = "); Serial.print("SS = ");
Serial.println(SS); Serial.println(SS);
Serial.println(SPI);
sleep(1); sleep(1);
} }