Arduino: Difference between revisions
Jump to navigation
Jump to search
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==BlynkSimpleEsp8266== | |||
Sketch > Include Library > Manage Libraries [Wait for the download to finish] | |||
In the "Filter your search" field, type "blynk". [Press Enter] | |||
Click on "Blynk by Volodymyr Shymanskyy". | |||
Click the "Install" button. [Wait for the installation to finish] | |||
Click the "Close" button. | |||
<source lang="cpp"> | |||
void setup() { | |||
pinMode(D4, OUTPUT); | |||
} | |||
void loop() { | |||
digitalWrite(D4, LOW); | |||
delay(1000); | |||
digitalWrite(D4, HIGH); | |||
delay(1000); | |||
} | |||
</source> | |||
<source lang="cpp"> | |||
#define BLYNK_PRINT Serial | |||
#include <ESP8266WiFi.h> | |||
#include <BlynkSimpleEsp8266.h> | |||
char auth[] = "S1DnsyFZlCEzWYArOvA-szNpU_j5XHYb"; | |||
char ssid[] = "Academia"; | |||
char pass[] = "chorke"; | |||
BLYNK_WRITE(V1){ | |||
int pinValue = param.asInt(); | |||
} | |||
void setup() { | |||
// debug console | |||
Serial.begin(9600); | |||
Blynk.begin(auth, ssid, pass); | |||
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80); | |||
//Blynk.begin(auth, ssid, pass, IPAddress(19,83,10,99), 8080); | |||
} | |||
void loop() { | |||
Blynk.run(); | |||
} | |||
</source> | |||
<source lang="cpp"> | |||
#include <ESP8266WiFi.h> | |||
#include <BlynkSimpleEsp8266.h> | |||
char auth[] = "S1DnsyFZlCEzWYArOvA-szNpU_j5XHYb"; | |||
char ssid[] = "Academia"; | |||
char pass[] = "chorke"; | |||
BlynkTimer timer; | |||
BLYNK_WRITE(V1) { | |||
int pinValue = param.asInt(); | |||
digitalWrite(D0, pinValue); | |||
digitalWrite(D4, pinValue); | |||
digitalWrite(D5, pinValue); | |||
digitalWrite(D6, pinValue); | |||
digitalWrite(D7, pinValue); | |||
} | |||
void setup() { | |||
Blynk.begin(auth, ssid, pass); | |||
pinMode(D0, OUTPUT); | |||
pinMode(D4, OUTPUT); | |||
pinMode(D5, OUTPUT); | |||
pinMode(D6, OUTPUT); | |||
pinMode(D7, OUTPUT); | |||
digitalWrite(D5, LOW); | |||
} | |||
void loop(){ | |||
//TODO | |||
} | |||
</source> | |||
==References== | ==References== | ||
* [https://medium.com/@loginov_rocks/quick-start-with-nodemcu-v3-esp8266-arduino-ecosystem-and-platformio-ide-b8415bf9a038 Quick Start with NodeMCU V3 ESP8266] | |||
* [https://forum.arduino.cc/index.php?topic=628717.0 Blynk Simple ESP8266 Header] | * [https://forum.arduino.cc/index.php?topic=628717.0 Blynk Simple ESP8266 Header] | ||
* [https://github.com/esp8266/Arduino Arduino core for ESP8266] | * [https://github.com/esp8266/Arduino Arduino core for ESP8266] | ||
* [https://www.electronicshub.org/connect-esp8266-to-wifi Connect ESP8266 to WiFi] | |||
* [https://my.cytron.io/p-nodemcu-lua-v3-esp8266-wifi-with-ch340c NodeMCU V3 ESP8266] | |||
* [[NodeMCU V3 ESP8266]] | |||
* [https://github.com/blynkkk/blynk-library/blob/master/src/BlynkSimpleEsp8266.h Blynk C++ Library] | |||
* [https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=More%2FDHT11 Blynk Example] | |||
* [https://www.arduino.cc/en/Main/Software Arduino IDE] | * [https://www.arduino.cc/en/Main/Software Arduino IDE] |
Latest revision as of 11:56, 16 March 2020
BlynkSimpleEsp8266
Sketch > Include Library > Manage Libraries [Wait for the download to finish] In the "Filter your search" field, type "blynk". [Press Enter] Click on "Blynk by Volodymyr Shymanskyy". Click the "Install" button. [Wait for the installation to finish] Click the "Close" button.
void setup() {
pinMode(D4, OUTPUT);
}
void loop() {
digitalWrite(D4, LOW);
delay(1000);
digitalWrite(D4, HIGH);
delay(1000);
}
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "S1DnsyFZlCEzWYArOvA-szNpU_j5XHYb";
char ssid[] = "Academia";
char pass[] = "chorke";
BLYNK_WRITE(V1){
int pinValue = param.asInt();
}
void setup() {
// debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(19,83,10,99), 8080);
}
void loop() {
Blynk.run();
}
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "S1DnsyFZlCEzWYArOvA-szNpU_j5XHYb";
char ssid[] = "Academia";
char pass[] = "chorke";
BlynkTimer timer;
BLYNK_WRITE(V1) {
int pinValue = param.asInt();
digitalWrite(D0, pinValue);
digitalWrite(D4, pinValue);
digitalWrite(D5, pinValue);
digitalWrite(D6, pinValue);
digitalWrite(D7, pinValue);
}
void setup() {
Blynk.begin(auth, ssid, pass);
pinMode(D0, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
pinMode(D7, OUTPUT);
digitalWrite(D5, LOW);
}
void loop(){
//TODO
}