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:
Bruno Terlizzi de Renzo 2023-05-13 17:00:54 +02:00
parent 277ab92a63
commit b6bf69355e
2 changed files with 8 additions and 7 deletions

View File

@ -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() {

View File

@ -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();