The system purpose is solution for weather monitoring that uses IoT to make its real time data easily accessible over a very wide range.
There is no arduino?
Will you require the laptop or PC to send the data to the internet?
Looks like he used an ESP module or is it Node MCU? कौन सा है @Farhan
ya there is no arduino right now but I use it later with ESP-01(wifi module), right now I am using Node MCU only for testing purpose , sending data through WIFI module(Node MCU) .
Sir I use Node MCU becouse it has already ESP8266 module.
Cool! So, what are you planning to do further, @Farhan?
Looks like आप आराम से temperature और humdity measure कर रहे हो!
My further plan is-
Arduino UNO+ ESP-01 ko interface kr k Server(ThingsBoard) pay data send kr na hai. or Rain Gauge bana reha hu
This looks cool!
The object or the instrument (maybe) that is swinging in the video, what is it?
@Farhan
Please check [color=#]Tipping bucket rain gauge working principle[/color]
So, you can now sense temperature, humidity and rainfall! What else are you planning besides these, @Farhan?
I’m using Arduino UNO and ESP-01 and sending data to ThingsBoard server when I had this problem,
[WiFiEsp] Data packet send error (2)
[WiFiEsp] Failed to write to socket 3
[WiFiEsp] Disconnecting 3
Code
#include "DHT.h"
#include <WiFiEspClient.h>
#include <WiFiEsp.h>
#include <WiFiEspUdp.h>
#include "SoftwareSerial.h"
#include <ThingsBoard.h>
#define WIFI_AP "YOUR_WIFI_AP"
#define WIFI_PASSWORD "YOUR_WIFI_PASSWORD"
#define TOKEN "YOUR_ACCESS_TOKEN"
// DHT
#define DHTPIN 4
#define DHTTYPE DHT22
char thingsboardServer[] = "YOUR_THINGSBOARD_HOST_OR_IP";
// Initialize the Ethernet client object
WiFiEspClient espClient;
// Initialize DHT sensor.
DHT dht(DHTPIN, DHTTYPE);
ThingsBoard tb(espClient);
SoftwareSerial soft(2, 3); // RX, TX
int status = WL_IDLE_STATUS;
unsigned long lastSend;
void setup() {
// initialize serial for debugging
Serial.begin(9600);
dht.begin();
InitWiFi();
lastSend = 0;
}
void loop() {
status = WiFi.status();
if ( status != WL_CONNECTED) {
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(WIFI_AP);
// Connect to WPA/WPA2 network
status = WiFi.begin(WIFI_AP, WIFI_PASSWORD);
delay(500);
}
Serial.println("Connected to AP");
}
if ( !tb.connected() ) {
reconnect();
}
if ( millis() - lastSend > 1000 ) { // Update and send only after 1 seconds
getAndSendTemperatureAndHumidityData();
lastSend = millis();
}
tb.loop();
}
void getAndSendTemperatureAndHumidityData()
{
Serial.println("Collecting temperature data.");
// Reading temperature or humidity takes about 250 milliseconds!
float humidity = dht.readHumidity();
// Read temperature as Celsius (the default)
float temperature = dht.readTemperature();
// Check if any reads failed and exit early (to try again).
if (isnan(humidity) || isnan(temperature)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.println("Sending data to ThingsBoard:");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" *C ");
tb.sendTelemetryFloat("temperature", temperature);
tb.sendTelemetryFloat("humidity", humidity);
}
void InitWiFi()
{
// initialize serial for ESP module
soft.begin(9600);
// initialize ESP module
WiFi.init(&soft);
// check for the presence of the shield
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println("WiFi shield not present");
// don't continue
while (true);
}
Serial.println("Connecting to AP ...");
// attempt to connect to WiFi network
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(WIFI_AP);
// Connect to WPA/WPA2 network
status = WiFi.begin(WIFI_AP, WIFI_PASSWORD);
delay(500);
}
Serial.println("Connected to AP");
}
void reconnect() {
// Loop until we're reconnected
while (!tb.connected()) {
Serial.print("Connecting to ThingsBoard node ...");
// Attempt to connect (clientId, username, password)
if ( tb.connect(thingsboardServer, TOKEN) ) {
Serial.println( "[DONE]" );
} else {
Serial.print( "[FAILED]" );
Serial.println( " : retrying in 5 seconds" );
// Wait 5 seconds before retrying
delay( 5000 );
}
}
}
There was a memory problem using the ESP-01 and the Arduino, so I am using the ESP-32,
Today(5 oct) we @karnamdpdurga @ravi312 discussed the following topics:
-
Discussion of schematic imported in KiCAD
-
Footprints assignment of various components of weather station on ESP 32
-
Rendering 3D view in KiCAD
4.PCB
Missed joining today, but if you need any help with the hardware / KiCad, let me know.
Thank you Sir,
Now everything is going well, if there is any problem then I will definitely ask you @Anool Sir
Nice. Now try and create a footprint, a skill needed very often.
Today I completed the Weather Station Project.
@jtd @Anool @Ashish_Pardeshi @karnamdpdurga @GN @ravi312
Thank you so much sir for helping me.