small changes and many new sensors

This commit is contained in:
2023-10-30 14:30:02 +01:00
parent 07917fe5ba
commit aad07c1b0a
21 changed files with 1642 additions and 297 deletions

View File

@@ -100,6 +100,7 @@
#include "driver/gpio.h"
#include "esp8266/gpio_struct.h"
struct MyGPIO {
static inline bool get(const uint8_t num) {
@@ -166,6 +167,11 @@
ESP_ERROR_CHECK(gpio_config(&io_conf));
}
static void setBuiltInLED(bool on) {
setOutput(GPIO_NUM_2);
if (on) {clear(GPIO_NUM_2);} else {set(GPIO_NUM_2);}
}
static void toggleBuiltInLED() {
static bool level = false;
setOutput(GPIO_NUM_2);
@@ -179,6 +185,7 @@
#elif IS_ESP32
#include "driver/gpio.h"
#include "soc/gpio_reg.h"
// NOTE from the manual
// GPIO 6-11 are usually used for SPI flash.