Skip to content

Instantly share code, notes, and snippets.

@neonil123
Created October 21, 2018 21:58
Show Gist options
  • Save neonil123/ea1e57233f3376faa3076561e2dd0381 to your computer and use it in GitHub Desktop.
Save neonil123/ea1e57233f3376faa3076561e2dd0381 to your computer and use it in GitHub Desktop.
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = "********************************";
char ssid[] = "********************************";
char pass[] = "********************************";
int n;
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
pinMode(16,OUTPUT);
pinMode(5,OUTPUT);
timer.setInterval(1000L, sendUptime);
}
void sendUptime()
{
Blynk.virtualWrite(V1, n);
}
void loop()
{
Blynk.run();
timer.run();
n=analogRead(A0);
Serial.println(n);
if(n>190)
{
digitalWrite(16,LOW);
digitalWrite(5,HIGH);
}
if(n<190)
{
digitalWrite(16,HIGH);
digitalWrite(5,LOW);
}
}
link for boards
http://arduino.esp8266.com/versions/2.4.2/package_esp8266com_index.json
@neonil123
Copy link
Author

neonil123 commented Dec 15, 2019 via email

@arya970
Copy link

arya970 commented Dec 15, 2019

I have successfully uploaded the coding, but why on blynk it says it's not online yet?

@neonil123
Copy link
Author

neonil123 commented Dec 15, 2019 via email

@arya970
Copy link

arya970 commented Dec 16, 2019

340941
sir, i use MQ2 sensor for the project but, why gauge on the blynk stuck in 7?

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@arya970
Copy link

arya970 commented Dec 16, 2019

its already connected but still stuck in 5,6,7 or 8
340974

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@arya970
Copy link

arya970 commented Dec 16, 2019

its something wrong?
340976

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@arya970
Copy link

arya970 commented Dec 16, 2019

its following your video and schematic
340993
340994
340995

@arya970
Copy link

arya970 commented Dec 16, 2019

do you have any solution/advice for that?

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@arya970
Copy link

arya970 commented Dec 16, 2019

vcc of the sensor is already connected to the vin pin of nodemcu

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@arya970
Copy link

arya970 commented Dec 16, 2019

i have check the sensor and its working and no problem with the sensor

@neonil123
Copy link
Author

neonil123 commented Dec 16, 2019 via email

@arya970
Copy link

arya970 commented Dec 17, 2019

I have changed the pin gauge into analog 0. But, the number stuck in 6 in gauge

@neonil123
Copy link
Author

neonil123 commented Dec 17, 2019 via email

@arya970
Copy link

arya970 commented Dec 17, 2019

do you think is possible if the problem is from blynk?

@neonil123
Copy link
Author

neonil123 commented Dec 17, 2019 via email

@arya970
Copy link

arya970 commented Dec 17, 2019

i try to change the wire connection from the sensor, its connected to blynk but its swap in the gauge
64104
its the picture the condition is no gas but the gauge display 1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment