Compare commits

...

4 Commits

2 changed files with 21 additions and 3 deletions

2
.clangd Normal file
View File

@ -0,0 +1,2 @@
CompileFlags:
Remove: [-mlongcalls, -free, -mtext-section-literals, -fipa-pta]

View File

@ -1,9 +1,25 @@
#include <Arduino.h> #include <Arduino.h>
#include <DHT.h> #include <DHT.h>
void setup() { Serial.begin(9600); } #define DHTTYPE DHT11
#define DHTPIN 4
DHT dht(DHTPIN, DHTTYPE);
int fc28_pin = A0;
int soil_threshold = 40;
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() { void loop() {
Serial.println("Sup dude"); char buffer[200];
delay(1000); int analog_val = analogRead(fc28_pin);
int soil_percentage = map(analog_val, 0, 1023, 0, 100);
sprintf(buffer, "Temperature: %.2f°C Humidity: %.2f%% Soil humidity: %i%%",
dht.readTemperature(), dht.readHumidity(), soil_percentage);
Serial.println(buffer);
delay(30000);
} }