File tree Expand file tree Collapse file tree 5 files changed +17
-8
lines changed
Expand file tree Collapse file tree 5 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 11#include " ThinknodeM5Board.h"
22
33
4-
54void ThinknodeM5Board::begin () {
65 pinMode (PIN_VEXT_EN, OUTPUT);
76 digitalWrite (PIN_VEXT_EN, !PIN_VEXT_EN_ACTIVE); // force power cycle
87 delay (20 ); // allow power rail to discharge
98 digitalWrite (PIN_VEXT_EN, PIN_VEXT_EN_ACTIVE); // turn backlight back on
109 delay (120 ); // give display time to bias on cold boot
1110 ESP32Board::begin ();
12- pinMode (PIN_STATUS_LED, OUTPUT); // init power led
11+ // pinMode(PIN_STATUS_LED, OUTPUT); // init power led
1312 }
1413
1514 void ThinknodeM5Board::enterDeepSleep (uint32_t secs, int pin_wake_btn) {
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ build_flags = ${esp32_base.build_flags}
1919 -D P_LORA_MISO =7
2020 -D P_LORA_MOSI =15
2121 -D PIN_USER_BTN =21
22- -D PIN_STATUS_LED =1
23- -D LED_STATE_ON =HIGH
24- -D PIN_LED =3
22+ # -D PIN_STATUS_LED=1 ; leds are on PCA !!!
23+ # -D LED_STATE_ON=HIGH
24+ # -D PIN_LED=3
2525 -D DISPLAY_ROTATION =4
2626 -D DISPLAY_CLASS =GxEPDDisplay
2727 -D EINK_DISPLAY_MODEL =GxEPD2_154_D67
@@ -45,6 +45,7 @@ build_src_filter = ${esp32_base.build_src_filter}
4545lib_deps = ${esp32_base.lib_deps}
4646 zinggjm/GxEPD2 @ 1.6.2
4747 bakercp/CRC32 @ ^2.0.0
48+ maxpromer/PCA9557-arduino
4849
4950[env:ThinkNode_M5_Repeater]
5051extends = ThinkNode_M5
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ WRAPPER_CLASS radio_driver(radio, board);
1515ESP32RTCClock fallback_clock;
1616AutoDiscoverRTCClock rtc_clock (fallback_clock);
1717SensorManager sensors;
18+ PCA9557 expander (0x18 , &Wire1);
1819
1920#ifdef DISPLAY_CLASS
2021 DISPLAY_CLASS display;
@@ -26,6 +27,11 @@ bool radio_init() {
2627 rtc_clock.begin (Wire);
2728// pinMode(21, INPUT);
2829// pinMode(48, OUTPUT);
30+ Wire1.begin (48 , 47 );
31+ expander.pinMode (4 , OUTPUT); // eink
32+ expander.pinMode (5 , OUTPUT); // peripherals
33+ expander.digitalWrite (4 , HIGH);
34+ expander.digitalWrite (5 , HIGH);
2935 #if defined(P_LORA_SCLK)
3036 spi.begin (P_LORA_SCLK, P_LORA_MISO, P_LORA_MOSI);
3137 return radio.std_init (&spi);
Original file line number Diff line number Diff line change 1212 #include <helpers/ui/GxEPDDisplay.h>
1313 #include <helpers/ui/MomentaryButton.h>
1414#endif
15+ #include <Wire.h>
16+ #include <PCA9557.h>
1517
1618extern ThinknodeM5Board board ;
1719extern WRAPPER_CLASS radio_driver ;
1820extern AutoDiscoverRTCClock rtc_clock ;
1921extern SensorManager sensors ;
22+ extern PCA9557 expander ;
2023
2124#ifdef DISPLAY_CLASS
2225 extern DISPLAY_CLASS display ;
Original file line number Diff line number Diff line change 77#define PIN_VEXT_EN_ACTIVE HIGH
88#define PIN_VEXT_EN 46
99#define PIN_USER_BTN 21
10- #define PIN_LED 3
11- #define PIN_STATUS_LED 1
10+ // #define PIN_LED 3
11+ // #define PIN_STATUS_LED 1
1212#define PIN_PWRBTN 14
1313
1414#define PIN_DISPLAY_MISO (-1)
1818#define PIN_DISPLAY_DC (40)
1919#define PIN_DISPLAY_RST (41)
2020#define PIN_DISPLAY_BUSY (42)
21- #define DISP_BACKLIGHT (5)
21+ // #define DISP_BACKLIGHT (5)
You can’t perform that action at this time.
0 commit comments