Commit e7139c91 authored by Eric Duminil's avatar Eric Duminil
Browse files

Finally!

parent 828696f7
......@@ -4,7 +4,6 @@
#include "ntp.h"
#include "led_effects.h"
#include "sensor_console.h"
#include <Wire.h>
#include "src/lib/S8_UART/s8_uart.h"
......@@ -18,7 +17,15 @@ namespace config {
const bool debug_sensor_states = false; // If true, log state transitions over serial console
}
#if defined(ESP8266)
// ???
#endif
#if defined(ESP32)
// For ESP32 : RX on GPIO17, TX on GPIO16
# define S8_UART_PORT 2
namespace sensor {
HardwareSerial S8_serial(S8_UART_PORT);
S8_UART *sensor_S8;
S8_sensor s8;
uint16_t co2 = 0;
......@@ -57,13 +64,6 @@ namespace sensor {
void setAutoCalibration(int32_t autoCalibration);
void initialize() {
#if defined(ESP8266)
Wire.begin(12, 14); // ESP8266 - D6, D5;
#endif
#if defined(ESP32)
// For ESP32 : RX on GPIO17, TX on GPIO16
# define S8_UART_PORT 2
HardwareSerial S8_serial(S8_UART_PORT);
S8_serial.begin(S8_BAUDRATE);
sensor_S8 = new S8_UART(S8_serial);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment