Smart Projects
Published © GPL3+

Moisture sensor for IoT and Telegram Alert

You will learn how to use the moisture sensor for IoT to monitor soil moisture and send a low humidity alert to your telegram.

BeginnerFull instructions provided2 hours2,778
Moisture sensor for IoT and Telegram Alert

Things used in this project

Story

Read more

Custom parts and enclosures

PCBGOGO - Gerber Files

https://www.pcbgogo.com/

Schematics

Electronic Schematic Design

Code

Ubidots - Code

Arduino
www.ubidots.com
#include "UbidotsMicroESP8266.h"
#define TOKEN "seu token aqui" // Ubidots TOKEN
#define WIFISSID "nome da rede wifi" // Wi-Fi SSID
#define PASSWORD "senha da rede wifi" // WIFI Password

Ubidots client(TOKEN);

void setup()
{
Serial.begin(115200);
client.wifiConnection(WIFISSID, PASSWORD);
}

void loop()
{
amostra_umid = analogRead(0);
//We will use the map function to map the values read on the analog input range from 0 to 1023, and will be remapped to another range from 0 to 100%.

float value1 = map ( amostra_umid, 0, 1023, 0, 100 );

client.add("Umidade", value1);
client.sendAll(true);

delay(5000);
}

Credits

Smart Projects

Smart Projects

9 projects • 11 followers

Comments