Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BLYNK_PRINT Serial
- #include <ESP8266WiFi.h>
- #include <BlynkSimpleEsp8266.h>
- #include <Servo.h>
- // You should get Auth Token in the Blynk App.
- // Go to the Project Settings (nut icon).
- char auth[] = "YourAuthToken";
- // Your WiFi credentials.
- // Set password to "" for open networks.
- char ssid[] = "YourNetworkName";
- char pass[] = "YourPassword";
- Servo servo;
- BLYNK_WRITE(V3)
- {
- servo.write(param.asInt());
- }
- void setup()
- {
- // Debug console
- 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);
- servo.attach(2);
- }
- void loop()
- {
- Blynk.run();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement