Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include<SPI.h>
  2. #include<Ethernet.h>
  3.  
  4. byte mac[]={0xAA, 0xAB, 0xAC,0xAD, 0xAE, 0xAF};
  5. IPAddress ip(192, 168, 1, 86);
  6. EthernetClient client;
  7. byte server[]={192, 168, 1, 61};
  8.  
  9. void setup()
  10. {
  11. Serial.begin(9600);
  12. delay(1000);
  13. Ethernet.begin(mac, ip);
  14. }
  15.  
  16. void loop()
  17. {
  18. if(client.connect(server, 80))
  19. {
  20. client.println("GET /ardunio/ardComm.php?param=ping");
  21. client.println();
  22. client.stop();
  23. }
  24. Serial.println(millis);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement