Adopting suggestions from @gaelbenoit
- Moving PIN_BUTTON definitions to wManager.h - Using "TFT_BL" macro instead of the direct int representation in NerdMinerV2.ino.cpp
This commit is contained in:
parent
277ab92a63
commit
b6bf69355e
@ -1,6 +1,4 @@
|
||||
//Botón configuración
|
||||
#define PIN_BUTTON_1 0
|
||||
#define PIN_BUTTON_2 14
|
||||
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <WiFi.h>
|
||||
@ -40,10 +38,10 @@ unsigned long start = millis();
|
||||
//void runMonitor(void *name);
|
||||
|
||||
void alternate_screen_state() {
|
||||
int screen_state= digitalRead(38);
|
||||
int screen_state= digitalRead(TFT_BL);
|
||||
//Serial.printf("Screen state is '%s', switching to '%s'", screen_state, !screen_state);
|
||||
Serial.println("Switching display state");
|
||||
digitalWrite(38, !screen_state);
|
||||
digitalWrite(TFT_BL, !screen_state);
|
||||
}
|
||||
|
||||
void alternate_screen_rotation() {
|
||||
|
@ -1,3 +1,6 @@
|
||||
//Botón configuración
|
||||
#define PIN_BUTTON_1 0
|
||||
#define PIN_BUTTON_2 14
|
||||
#define PIN_ENABLE5V 15
|
||||
|
||||
void init_WifiManager();
|
||||
|
Loading…
Reference in New Issue
Block a user