I am using a dht22 sensor connected to the arduino like in the photo. I also attached a wifi module (ESP01 8266) to the circuit. How could I test the connection to the wifi module and how could I make sure the data is sent from the sensor via WIFI?
I tested the sensor on the arduino board and could plot its values in the serial monitor. I sent these values over the serial connection. How could I send the data via wifi?
The code for the dht 22 sensor:
#define DHTPIN 3
#include "DHT.h"
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
dht.begin();
delay(500); //Delay to let system boot
}
void loop() {
read_temp_umid();
}
void read_temp_umid()
{
float temperature = dht.readTemperature();
float humidity = dht.readHumidity();
Serial.print(temperature);
Serial.print(humidity);
delay(1000);//read every second
}
