Hi,
new project using a esp8266-12 standalone with a temperature sensor LM35
I just published my project on instructable
ESP8266-12 blynk wireless temperature LM35 sensor
connections
ESP8266-12
VCC +3,3v
CH-PD +3.3v
ADC ---- pin2 (LM35)
GND ground
GPIO5 ground
LM35 sensor
pin 1 +3,3v
pin 2 output .---- ADC (ESP8266-12)
pin 3 ground
note
ADC
If you use ide arduino ADC ---- pin 17
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxx"; //insert here your token generated by Blynk
float temp;
int tempPin = 17; // ADC pin
SimpleTimer timer;
void setup()
{
Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth, "ssid", "password!"); //insert here your SSID and password
// Setup a function to be called every second
timer.setInterval(1000L, sendUptime);
}
// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void sendUptime()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(10, temp); // virtual pin 10
}
void loop()
{
Blynk.run(); // Initiates Blynk
timer.run(); // Initiates SimpleTimer
temp = analogRead(tempPin);
temp = temp * 0.09765625; // costance (1/1024*100)
}