mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 12:11:00 +00:00
.
This commit is contained in:
@@ -7,12 +7,16 @@
|
|||||||
;
|
;
|
||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
; esp32-c3-devkitc-02
|
||||||
|
; esp32-c3-devkitm-1
|
||||||
|
;
|
||||||
|
; seeed_xiao_esp32c3
|
||||||
|
|
||||||
[env:esp32-c3-devkitc-02]
|
[env:esp32-c3-devkitc-02]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32-c3-devkitc-02
|
board = lolin_c3_mini
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 9600
|
||||||
lib_deps =
|
lib_deps =
|
||||||
adafruit/Adafruit BME280 Library@^2.2.2
|
adafruit/Adafruit BME280 Library@^2.2.2
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <WiFiClientSecure.h>
|
#include <WiFiClientSecure.h>
|
||||||
|
#include <Wire.h>
|
||||||
#include <Adafruit_BME280.h>
|
#include <Adafruit_BME280.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -8,7 +9,7 @@
|
|||||||
Adafruit_BME280 bme;
|
Adafruit_BME280 bme;
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(9600);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println("Setting up GPIOs ...");
|
Serial.println("Setting up GPIOs ...");
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ void setup() {
|
|||||||
|
|
||||||
Serial.println("GPIO setup done");
|
Serial.println("GPIO setup done");
|
||||||
|
|
||||||
/*Serial.println("Setting up BME280 sensor");
|
Serial.println("Setting up BME280 sensor");
|
||||||
unsigned status = bme.begin(0x76); // 0x76
|
unsigned status = bme.begin(0x76); // 0x76
|
||||||
if (!status) {
|
if (!status) {
|
||||||
Serial.println("Could not find a valid BME/BMP280 sensor, check wiring!");
|
Serial.println("Could not find a valid BME/BMP280 sensor, check wiring!");
|
||||||
@@ -25,17 +26,24 @@ void setup() {
|
|||||||
Serial.print(" ID of 0x56-0x58 represents a BMP 280,\n");
|
Serial.print(" ID of 0x56-0x58 represents a BMP 280,\n");
|
||||||
Serial.print(" ID of 0x60 represents a BME 280.\n");
|
Serial.print(" ID of 0x60 represents a BME 280.\n");
|
||||||
Serial.print(" ID of 0x61 represents a BME 680.\n");
|
Serial.print(" ID of 0x61 represents a BME 680.\n");
|
||||||
while (1);
|
while (1) {
|
||||||
}*/
|
digitalWrite(LED_PIN, LOW);
|
||||||
|
delay(250);
|
||||||
|
digitalWrite(LED_PIN, HIGH);
|
||||||
|
delay(250);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
digitalWrite(LED_PIN, HIGH);
|
|
||||||
delay(250);
|
|
||||||
digitalWrite(LED_PIN, LOW);
|
digitalWrite(LED_PIN, LOW);
|
||||||
delay(250);
|
delay(250);
|
||||||
digitalWrite(LED_PIN, HIGH);
|
digitalWrite(LED_PIN, HIGH);
|
||||||
delay(250);
|
delay(250);
|
||||||
digitalWrite(LED_PIN, LOW);
|
digitalWrite(LED_PIN, LOW);
|
||||||
|
delay(250);
|
||||||
|
digitalWrite(LED_PIN, HIGH);
|
||||||
|
delay(750);
|
||||||
|
Serial.println("Main loop");
|
||||||
}
|
}
|
Reference in New Issue
Block a user