Hari
Published © Apache-2.0

Water Level Sensor with NodeMCU ESP8266 and KiwisIoT

Water level sensor to a NodeMCU ESP8266 and used KiwisIoT to monitor the water level sensor reading online.

IntermediateFull instructions provided1 hour28
Water Level Sensor with NodeMCU ESP8266 and KiwisIoT

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Grove - Water Sensor
Seeed Studio Grove - Water Sensor
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1

Software apps and online services

Arduino IDE
Arduino IDE
KiwisIoT
Kiwistron KiwisIoT

Story

Read more

Schematics

Water Level Sensor with NodeMCU ESP8266

Code

Water Level Sensor with NodeMCU ESP8266 and KiwisIoT Dashboard

C/C++
#include <KiwisIoT.h>

const char* ssid  = "YOUR_WIFI_NAME";
const char* pass  = "YOUR_WIFI_PASSWORD";
const char* topic = "YOUR_TOPIC_ID";

KiwisIoT kiwisiot(ssid, pass, topic);

#define WATER_LEVEL_PIN A0

void setup() {
  Serial.begin(9600);
  kiwisiot.begin();
}

void loop() {
  kiwisiot.run();

  int waterValue = analogRead(WATER_LEVEL_PIN);

  kiwisiot.send("1", waterValue);

  Serial.print("Water Level Value = ");
  Serial.println(waterValue);

  delay(1000);
}

Credits

Hari
14 projects • 1 follower

Comments