readpin implementation
Some checks failed
Build and deploy Docs site to GitHub Pages / github-pages (push) Has been cancelled
PR Build Check / build (Heltec_v3_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (Heltec_v3_repeater) (push) Has been cancelled
PR Build Check / build (Heltec_v3_room_server) (push) Has been cancelled
PR Build Check / build (LilyGo_Tlora_C6_repeater_) (push) Has been cancelled
PR Build Check / build (PicoW_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (RAK_4631_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_room_server) (push) Has been cancelled
PR Build Check / build (wio-e5-mini_repeater) (push) Has been cancelled
Some checks failed
Build and deploy Docs site to GitHub Pages / github-pages (push) Has been cancelled
PR Build Check / build (Heltec_v3_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (Heltec_v3_repeater) (push) Has been cancelled
PR Build Check / build (Heltec_v3_room_server) (push) Has been cancelled
PR Build Check / build (LilyGo_Tlora_C6_repeater_) (push) Has been cancelled
PR Build Check / build (PicoW_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (RAK_4631_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_room_server) (push) Has been cancelled
PR Build Check / build (wio-e5-mini_repeater) (push) Has been cancelled
This commit is contained in:
@@ -48,6 +48,25 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
// Implement an actual getGpio for ESP32 boards
|
||||
uint32_t getGpio() override {
|
||||
uint32_t state = 0;
|
||||
for (int pin = 0; pin < 32; pin++) {
|
||||
if (digitalRead(pin) == HIGH) {
|
||||
state |= (1 << pin);
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
// Read the state of a single pin
|
||||
public:
|
||||
// Liest den Zustand eines einzelnen Pins (0-31)
|
||||
bool readPin(uint8_t pin) {
|
||||
if (pin >= 32) return false; // Ungültiger Pin
|
||||
return digitalRead(pin) == HIGH;
|
||||
}
|
||||
|
||||
// Temperature from ESP32 MCU
|
||||
float getMCUTemperature() override {
|
||||
uint32_t raw = 0;
|
||||
|
||||
Reference in New Issue
Block a user