Advertisement
Guest User

Untitled

a guest
Feb 21st, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. /**************************************************************
  2. * Blynk is a platform with iOS and Android apps to control
  3. * Arduino, Raspberry Pi and the likes over the Internet.
  4. * You can easily build graphic interfaces for all your
  5. * projects by simply dragging and dropping widgets.
  6. *
  7. * Downloads, docs, tutorials: http://www.blynk.cc
  8. * Blynk community: http://community.blynk.cc
  9. * Social networks: http://www.fb.com/blynkapp
  10. * http://twitter.com/blynk_app
  11. *
  12. * Blynk library is licensed under MIT license
  13. * This example code is in public domain.
  14. *
  15. **************************************************************
  16. *
  17. * This is an example for Intel Edison (WiFi).
  18. *
  19. * Feel free to apply it to any other example. It's simple!
  20. *
  21. **************************************************************/
  22.  
  23. #define BLYNK_PRINT Serial // Comment this out to disable prints and save space
  24. #include <WiFi.h>
  25. #include <BlynkSimpleIntelEdisonWiFi.h>
  26.  
  27.  
  28. // You should get Auth Token in the Blynk App.
  29. // Go to the Project Settings (nut icon).
  30. char auth[] = "459777816b034c278f6adccc243d6398";
  31.  
  32. // Your WiFi credentials
  33. char ssid[] = "Arduino_Server";
  34. char pass[] = "happylol56"; // Set to "" for open networks
  35.  
  36.  
  37. const int relaypin1 = 4; //the Relay1 is attached to D4
  38. const int relaypin2 = 5; //the Relay1 is attached to D5
  39. const int relaypin3 = 6; //the Relay1 is attached to D6
  40. const int relaypin4 = 7; //the Relay1 is attached to D7
  41. //const int ledpin = 3; //The LED module is attached to D3
  42.  
  43.  
  44.  
  45. void setup()
  46. {
  47. Serial.begin(115200);
  48. //Blynk.begin(auth, ssid, pass);
  49. Blynk.begin(auth, ssid, pass, IPAddress(192,168,146,102));
  50.  
  51. pinMode(13, OUTPUT); //for led test
  52. pinMode(relaypin1, OUTPUT); //sets relay to output
  53. pinMode(relaypin2, OUTPUT); //sets relay to output
  54. pinMode(relaypin3, OUTPUT); //sets relay to output
  55. pinMode(relaypin4, OUTPUT); //sets relay to output
  56.  
  57.  
  58.  
  59. }
  60.  
  61.  
  62.  
  63. void loop()
  64. {
  65. Blynk.run();
  66.  
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement