ARDUICREATE
Published © GPL3+

NodeMCU and Blynk with LM35

LM35 data or temperature can be shown on phone from anywhere. An Example of how can we read data through the virtual pin.

IntermediateFull instructions provided1 hour9,662
NodeMCU and Blynk with LM35

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Gravity: Analog LM35 Temperature Sensor For Arduino
DFRobot Gravity: Analog LM35 Temperature Sensor For Arduino
×1

Software apps and online services

Blynk
Blynk
need to use it to read value
Arduino IDE
Arduino IDE

Story

Read more

Schematics

CIRCUIT DIAGRAM

Code

Interfierencing NODEMCU ,BLYNK AND LM35

Arduino
//Made for arduino
//by ArduiCreate
//if any problems pls email to sumithaak@gmail.com
//Thanks
#include <ESP8266WiFi.h>//Install these library
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>

#define BLYNK_PRINT Serial

float vref = 3.3;
float resolution = vref / 1023.0;
float temperature;

char auth[] = "auth";//yourauthtoken
char ssid[] = "name of wifi";//name of your wifi
char pass[] = "password";//password of wifi

SimpleTimer timer;

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(2000, sendUptime);
}

void sendUptime()
{
  float temperature = analogRead(A0);//lm35 is connected to pin A0 on NodeMcu
  temperature = (temperature * resolution);
  temperature = temperature * 100.0;
  Serial.print("LM35 temperature: ");//serial print the value 
  Serial.println(temperature);
  Blynk.virtualWrite(V0, temperature);//send the value to blynk application
}

void loop()
{
  Blynk.run();
  timer.run();
}
//Thanks for your use

Credits

ARDUICREATE

ARDUICREATE

1 project • 2 followers

Comments