Created
October 21, 2018 21:58
-
-
Save neonil123/ea1e57233f3376faa3076561e2dd0381 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
link for boards | |
http://arduino.esp8266.com/versions/2.4.2/package_esp8266com_index.json |
yes it can be a blynk problem
Il mar 17 dic 2019, 08:56 arya970 <notifications@github.com> ha scritto:
… do you think is possible if the problem is from blynk?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/ea1e57233f3376faa3076561e2dd0381?email_source=notifications&email_token=AJINXIU3SLZGJAJZYXRAECTQZBZ3PA5CNFSM4J3ALO3KYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6BK2#gistcomment-3113645>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJINXIU6VOV7BUILFBM74T3QZBZ3PANCNFSM4J3ALO3A>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
do you think is possible if the problem is from blynk?