Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**************************************************************
- * Blynk is a platform with iOS and Android apps to control
- * Arduino, Raspberry Pi and the likes over the Internet.
- * You can easily build graphic interfaces for all your
- * projects by simply dragging and dropping widgets.
- *
- * Downloads, docs, tutorials: http://www.blynk.cc
- * Blynk community: http://community.blynk.cc
- * Social networks: http://www.fb.com/blynkapp
- * http://twitter.com/blynk_app
- *
- * Blynk library is licensed under MIT license
- * This example code is in public domain.
- *
- **************************************************************
- *
- * This is an example for Intel Edison (WiFi).
- *
- * Feel free to apply it to any other example. It's simple!
- *
- **************************************************************/
- #define BLYNK_PRINT Serial // Comment this out to disable prints and save space
- #include <WiFi.h>
- #include <BlynkSimpleIntelEdisonWiFi.h>
- // You should get Auth Token in the Blynk App.
- // Go to the Project Settings (nut icon).
- char auth[] = "459777816b034c278f6adccc243d6398";
- // Your WiFi credentials
- char ssid[] = "Arduino_Server";
- char pass[] = "happylol56"; // Set to "" for open networks
- const int relaypin1 = 4; //the Relay1 is attached to D4
- const int relaypin2 = 5; //the Relay1 is attached to D5
- const int relaypin3 = 6; //the Relay1 is attached to D6
- const int relaypin4 = 7; //the Relay1 is attached to D7
- //const int ledpin = 3; //The LED module is attached to D3
- void setup()
- {
- Serial.begin(115200);
- //Blynk.begin(auth, ssid, pass);
- Blynk.begin(auth, ssid, pass, IPAddress(192,168,146,102));
- pinMode(13, OUTPUT); //for led test
- pinMode(relaypin1, OUTPUT); //sets relay to output
- pinMode(relaypin2, OUTPUT); //sets relay to output
- pinMode(relaypin3, OUTPUT); //sets relay to output
- pinMode(relaypin4, OUTPUT); //sets relay to output
- }
- void loop()
- {
- Blynk.run();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement