SHARE
TWEET

Untitled

a guest May 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <WiFiClient.h>
  2. #include <WiFiServer.h>
  3. #include <WiFiSSLClient.h>
  4. #include "WiFi101.h"
  5. #include "FastLED.h"  
  6. #include <SPI.h>
  7. #include <avr/pgmspace.h>
  8.  
  9. #define NUM_LEDS 512
  10. #define DATA_PIN 6  
  11.  
  12. CRGB leds[NUM_LEDS]; // array of leds
  13.  
  14. char ssid[] = "ASUS_D0"; // SSID
  15. char pass[] = "99887766"; // password
  16. bool val = true;
  17. int status = WL_IDLE_STATUS;
  18. WiFiServer server(80);
  19.  
  20. const long MARY1[] =
  21. {
  22. 0xdd8c57, 0xe59562, 0xde9465, 0xcd885e, 0xd3936d, 0xcd916d, 0xc58a68, 0xba825f, 0xb6805a, 0x99653e, 0x70401a, 0x5b300d, 0x654121, 0x806144, 0xa88e73, 0x968166,
  23. 0x5c3d21, 0x432105, 0x573215, 0x825735, 0xa27450, 0xb98860, 0xd4a079, 0xe7b18b, 0xdfa983, 0xd9a17c, 0xd39c75, 0xd59a70, 0xdd9f70, 0xd89463, 0xd28b55, 0xda8f58,
  24. 0xd89b62, 0xdda069, 0xdda46f, 0xf1bc8a, 0xedba8b, 0xf1be91, 0xf4c196, 0xf0bc94, 0xdfaa82, 0xdba67e, 0xaa734c, 0xbd8560, 0xaf7957, 0x8f5a3b, 0x895639, 0x5c290e,
  25. 0x8e4f30, 0x995a3b, 0xa76847, 0xc08462, 0xb27853, 0x89522b, 0xd8a47c, 0xf9c89f, 0xecbd91, 0xf1c596, 0xffd6a4, 0xf5cc98, 0xf2c792, 0xf7ca91, 0xedbf84, 0xd5a76b,
  26. 0xecce90, 0xe5c789, 0xfadca0, 0xe3c48b, 0xe7c891, 0xf7d6a1, 0xe3bf8d, 0xe7c192, 0xdfb68a, 0xb2855c, 0x5c2b03, 0x8e5631, 0xd19571, 0x8d4d2a, 0xa6623f, 0xbc7654,
  27. 0xca865f, 0xb7764e, 0x965833, 0xdaa27d, 0x814f2a, 0x592d08, 0x7a532a, 0xb59064, 0xf0cea0, 0xf1d19e, 0xebcc96, 0xf2d59d, 0xf3d99e, 0xecd498, 0xddc78b, 0xf6e0a4,
  28. 0xead49b, 0xefd69e, 0xe4ca91, 0xf6d9a1, 0xf6d59f, 0xeac692, 0xf9d5a5, 0xe2c093, 0x89663e, 0x623f19, 0x5a3410, 0x7c512e, 0xca9a74, 0x9e6a42, 0xb1784d, 0xcb9064,
  29. 0xdfab7c, 0xbb885b, 0x7e4e26, 0xc79b76, 0x7d5532, 0x6b4423, 0x5b3511, 0x7b542d, 0xd4a97f, 0xe8bc8d, 0xfacc9a, 0xf7cc97, 0xf4cd96, 0xf3d09a, 0xe7c892, 0xa78953,
  30. 0x7b501d, 0xc79965, 0xf0be89, 0xffca96, 0xffc492, 0xffc192, 0xf1b488, 0xdca27c, 0x925d3b, 0x734222, 0x815435, 0xa27755, 0xc19771, 0x73481e, 0xdfb082, 0xf0c291,
  31. 0xe7bd8b, 0xeec494, 0x9e7549, 0x784e26, 0xa97d5a, 0x956443, 0x794321, 0x905430, 0xe8a77f, 0xefaa80, 0xde9867, 0xefac78, 0xefb07b, 0xcf965f, 0xb7824c, 0xb5824d,
  32. 0xfdc990, 0xb07740, 0xb2753e, 0xc17e47, 0xdc955f, 0xce8552, 0xd99063, 0xce8960, 0xbb7b57, 0x7b401e, 0xa4724f, 0x764922, 0xa1764c, 0xd9b084, 0xf2ca99, 0xe9c18e,
  33. 0xf0cf9c, 0xf9d5a5, 0xf8d3a6, 0xe7c095, 0xab8056, 0xac7c54, 0x8f5831, 0xbe8057, 0xb37045, 0xbb7746, 0xcc8652, 0xac6932, 0xd89a61, 0xebb378, 0xf2be84, 0xd6a469,
  34. 0xb88e54, 0xdfb277, 0xd7a66c, 0xe8b67b, 0xefb87f, 0xe2a972, 0xe5ab79, 0xdfa778, 0xdba87b, 0xddae84, 0xe8be94, 0xffdaae, 0xf6d5a8, 0xeecfa1, 0xeace9e, 0xe5c999,
  35. 0xf0daab, 0xecd6a7, 0xe8d0a4, 0xeed1a5, 0xe0c195, 0xedcb9e, 0xf8d2a5, 0xebc093, 0xefc190, 0xddae7a, 0xd7a872, 0xefc28b, 0xe7bc85, 0xd8af77, 0xf9d299, 0xffdba1,
  36. 0xeccb98, 0xf3d29d, 0xfad6a2, 0xefcb97, 0xeac591, 0xe5c08c, 0xbf9968, 0xae8a5a, 0xd2b082, 0xf5d6a8, 0xe1c498, 0xe9cea3, 0xead1a8, 0xf0d9af, 0xf7e1b8, 0xf1deb4,
  37. 0xe8d6ae, 0xebd8b0, 0xead4ab, 0xe9d2a9, 0xf5dcb3, 0xe9cca2, 0xbe9f73, 0x7e5d30, 0x654316, 0x9c7a4c, 0xdcb78a, 0xf6d4a6, 0xeecc9e, 0xfcdcad, 0xebcb9c, 0xf3d3a4,
  38. 0xf5d6a8, 0xebca9d, 0xebca9f, 0xe0bd93, 0xe5be95, 0xa17a53, 0x7e542e, 0x68411a, 0x6e4821, 0x87643c, 0xe1c097, 0xe4c79f, 0xeed5ad, 0xead4ad, 0xe6d2ad, 0xe5d3ad,
  39. 0xe9d7b1, 0xebd8b0, 0xeed6b0, 0xe9d0a8, 0xf1d1aa, 0xcba983, 0x734d28, 0x966e4a, 0x673c19, 0x4e2300, 0x774c29, 0xc59d79, 0xeecba5, 0xdfbe95, 0xefcfa6, 0xe1c296,
  40. 0xd8bb93, 0xdebe97, 0xeac8a2, 0xdeba96, 0xb7916d, 0xa67e5b, 0x431b00, 0x815936, 0xa07855, 0x724c27, 0xb08e68, 0xf2d5ad, 0xedd1aa, 0xead2ac, 0xecd6af, 0xecd6af,
  41. 0xecd6ad, 0xe7d0a7, 0xf2d9b1, 0xe9cda6, 0xf2d4ae, 0xceae88, 0x5a3612, 0xb18d69, 0x7c5632, 0x6f4b27, 0x825e3a, 0xc6a47f, 0xd4b48e, 0xe7c7a1, 0xdfc29a, 0xbfa37b,
  42. 0x553c14, 0x796038, 0xb0946f, 0xd9bd98, 0xbd9f7b, 0x5c3b18, 0x81603d, 0xae8d6a, 0x92704d, 0x785734, 0xe7c6a3, 0xe4c6a0, 0xf2d6af, 0xead1a9, 0xffe7bf, 0xe0c79f,
  43. 0xc7b087, 0xead3aa, 0xdbc39d, 0xe2c8a3, 0xceb18f, 0xe5c8a6, 0xb69977, 0x644725, 0xa48767, 0x876d4a, 0x816744, 0x8c744e, 0x59411b, 0x543e17, 0x58421b, 0x67542c,
  44. 0x6d5e37, 0x65562f, 0x594a23, 0x483612, 0x362400, 0x483411, 0x5e4a29, 0x6a5333, 0x90795a, 0xbca385, 0xbfa687, 0xe0c7a8, 0xe1c9a7, 0xd3bb99, 0xddc5a1, 0xe6ceaa,
  45. 0x7b6647, 0x968162, 0xa18c6f, 0xa48f72, 0x9c876c, 0x655136, 0x564227, 0x4b3a1e, 0x362507, 0x3a2b0a, 0x423411, 0x716441, 0x847754, 0x8c825e, 0x8e8460, 0x9c926e,
  46. 0xd5d0b0, 0xd8d3b3, 0xccc8a5, 0xc8c2a0, 0xaba583, 0x9a9172, 0x857c5f, 0x60543a, 0x211200, 0x493824, 0x43321e, 0x261501, 0x3d2b15, 0x4c3a24, 0x523e26, 0x3d2910,
  47. 0x54442d, 0x41311a, 0x3b2a16, 0x574835, 0x564636, 0x382b1a, 0x736653, 0x978c76, 0xbeb79b, 0xada88a, 0xd4cfaf, 0xc7c4a3, 0xc9c6a5, 0xd7d4b5, 0xd7d4b5, 0xdddcbe,
  48. 0xb1b094, 0xb7b69a, 0xb6b596, 0xc5c2a3, 0xccc9a8, 0xc6c1a1, 0xc5c0a2, 0xaea78b, 0x918972, 0x4c412d, 0x4e4130, 0x5e4e3e, 0x61523f, 0x645542, 0x9d8e79, 0xd6c6af,
  49. 0xbcaf8f, 0xded0b3, 0xc7b99e, 0xa4967c, 0x9c8e74, 0x74684e, 0x6c6346, 0x746e4e, 0x5f5935, 0x817d57, 0x908c66, 0x78764f, 0x82805a, 0x858563, 0x939273, 0x9e9f80,
  50. 0x807d5a, 0x95936d, 0x9b9a6e, 0x969464, 0x9b9767, 0x87814f, 0x948e5c, 0xaea675, 0xb7af81, 0x685c32, 0x52461e, 0x80724b, 0x463811, 0x6d6036, 0x5f5226, 0x493c10,
  51. 0xcdc386, 0xc3b97c, 0x998f54, 0x4f420b, 0xa49760, 0x9b8e57, 0x72682d, 0x5d5316, 0x4d4506, 0x5c5415, 0x5c5717, 0x625e21, 0x66642b, 0x625f2a, 0x737141, 0x807d50,
  52. 0xd4d19a, 0xdbd69e, 0xdcd698, 0xcec783, 0xcbc37a, 0xb8b163, 0xc4bb6c, 0xc8bf70, 0xd3c77b, 0xd2c67c, 0xe0d48c, 0xdcd088, 0x70641c, 0xb7ae63, 0xd5cc7f, 0xcdc475,
  53. 0xd7d078, 0xdfd880, 0xc5bb66, 0x655a08, 0xbeb162, 0xd2c576, 0xd3c775, 0xe3d783, 0xcfc56e, 0xdbd17a, 0xdad27d, 0xccc575, 0xcac47a, 0xcbc682, 0xb8b475, 0xd1cd90
  54. };
  55.  
  56. const long MARY2[] =
  57. {
  58. 0xdd8c57, 0xe59562, 0xde9465, 0xcd885e, 0xd3936d, 0xcd916d, 0xc58a68, 0xba825f, 0xb6805a, 0x99653e, 0x70401a, 0x5b300d, 0x654121, 0x806144, 0xa88e73, 0x968166,
  59. 0x5c3d21, 0x432105, 0x573215, 0x825735, 0xa27450, 0xb98860, 0xd4a079, 0xe7b18b, 0xdfa983, 0xd9a17c, 0xd39c75, 0xd59a70, 0xdd9f70, 0xd89463, 0xd28b55, 0xda8f58,
  60. 0xd89b62, 0xdda069, 0xdda46f, 0xf1bc8a, 0xedba8b, 0xf1be91, 0xf4c196, 0xf0bc94, 0xdfaa82, 0xdba67e, 0xaa734c, 0xbd8560, 0xaf7957, 0x8f5a3b, 0x895639, 0x5c290e,
  61. 0x8e4f30, 0x995a3b, 0xa76847, 0xc08462, 0xb27853, 0x89522b, 0xd8a47c, 0xf9c89f, 0xecbd91, 0xf1c596, 0xffd6a4, 0xf5cc98, 0xf2c792, 0xf7ca91, 0xedbf84, 0xd5a76b,
  62. 0xecce90, 0xe5c789, 0xfadca0, 0xe3c48b, 0xe7c891, 0xf7d6a1, 0xe3bf8d, 0xe7c192, 0xdfb68a, 0xb2855c, 0x5c2b03, 0x8e5631, 0xd19571, 0x8d4d2a, 0xa6623f, 0xbc7654,
  63. 0xca865f, 0xb7764e, 0x965833, 0xdaa27d, 0x814f2a, 0x592d08, 0x7a532a, 0xb59064, 0xf0cea0, 0xf1d19e, 0xebcc96, 0xf2d59d, 0xf3d99e, 0xecd498, 0xddc78b, 0xf6e0a4,
  64. 0xead49b, 0xefd69e, 0xe4ca91, 0xf6d9a1, 0xf6d59f, 0xeac692, 0xf9d5a5, 0xe2c093, 0x89663e, 0x623f19, 0x5a3410, 0x7c512e, 0xca9a74, 0x9e6a42, 0xb1784d, 0xcb9064,
  65. 0xdfab7c, 0xbb885b, 0x7e4e26, 0xc79b76, 0x7d5532, 0x6b4423, 0x5b3511, 0x7b542d, 0xd4a97f, 0xe8bc8d, 0xfacc9a, 0xf7cc97, 0xf4cd96, 0xf3d09a, 0xe7c892, 0xa78953,
  66. 0x7b501d, 0xc79965, 0xf0be89, 0xffca96, 0xffc492, 0xffc192, 0xf1b488, 0xdca27c, 0x925d3b, 0x734222, 0x815435, 0xa27755, 0xc19771, 0x73481e, 0xdfb082, 0xf0c291,
  67. 0xe7bd8b, 0xeec494, 0x9e7549, 0x784e26, 0xa97d5a, 0x956443, 0x794321, 0x905430, 0xe8a77f, 0xefaa80, 0xde9867, 0xefac78, 0xefb07b, 0xcf965f, 0xb7824c, 0xb5824d,
  68. 0xfdc990, 0xb07740, 0xb2753e, 0xc17e47, 0xdc955f, 0xce8552, 0xd99063, 0xce8960, 0xbb7b57, 0x7b401e, 0xa4724f, 0x764922, 0xa1764c, 0xd9b084, 0xf2ca99, 0xe9c18e,
  69. 0xf0cf9c, 0xf9d5a5, 0xf8d3a6, 0xe7c095, 0xab8056, 0xac7c54, 0x8f5831, 0xbe8057, 0xb37045, 0xbb7746, 0xcc8652, 0xac6932, 0xd89a61, 0xebb378, 0xf2be84, 0xd6a469,
  70. 0xb88e54, 0xdfb277, 0xd7a66c, 0xe8b67b, 0xefb87f, 0xe2a972, 0xe5ab79, 0xdfa778, 0xdba87b, 0xddae84, 0xe8be94, 0xffdaae, 0xf6d5a8, 0xeecfa1, 0xeace9e, 0xe5c999,
  71. 0xf0daab, 0xecd6a7, 0xe8d0a4, 0xeed1a5, 0xe0c195, 0xedcb9e, 0xf8d2a5, 0xebc093, 0xefc190, 0xddae7a, 0xd7a872, 0xefc28b, 0xe7bc85, 0xd8af77, 0xf9d299, 0xffdba1,
  72. 0xeccb98, 0xf3d29d, 0xfad6a2, 0xefcb97, 0xeac591, 0xe5c08c, 0xbf9968, 0xae8a5a, 0xd2b082, 0xf5d6a8, 0xe1c498, 0xe9cea3, 0xead1a8, 0xf0d9af, 0xf7e1b8, 0xf1deb4,
  73. 0xe8d6ae, 0xebd8b0, 0xead4ab, 0xe9d2a9, 0xf5dcb3, 0xe9cca2, 0xbe9f73, 0x7e5d30, 0x654316, 0x9c7a4c, 0xdcb78a, 0xf6d4a6, 0xeecc9e, 0xfcdcad, 0xebcb9c, 0xf3d3a4,
  74. 0xf5d6a8, 0xebca9d, 0xebca9f, 0xe0bd93, 0xe5be95, 0xa17a53, 0x7e542e, 0x68411a, 0x6e4821, 0x87643c, 0xe1c097, 0xe4c79f, 0xeed5ad, 0xead4ad, 0xe6d2ad, 0xe5d3ad,
  75. 0xe9d7b1, 0xebd8b0, 0xeed6b0, 0xe9d0a8, 0xf1d1aa, 0xcba983, 0x734d28, 0x966e4a, 0x673c19, 0x4e2300, 0x774c29, 0xc59d79, 0xeecba5, 0xdfbe95, 0xefcfa6, 0xe1c296,
  76. 0xd8bb93, 0xdebe97, 0xeac8a2, 0xdeba96, 0xb7916d, 0xa67e5b, 0x431b00, 0x815936, 0xa07855, 0x724c27, 0xb08e68, 0xf2d5ad, 0xedd1aa, 0xead2ac, 0xecd6af, 0xecd6af,
  77. 0xecd6ad, 0xe7d0a7, 0xf2d9b1, 0xe9cda6, 0xf2d4ae, 0xceae88, 0x5a3612, 0xb18d69, 0x7c5632, 0x6f4b27, 0x825e3a, 0xc6a47f, 0xd4b48e, 0xe7c7a1, 0xdfc29a, 0xbfa37b,
  78. 0x553c14, 0x796038, 0xb0946f, 0xd9bd98, 0xbd9f7b, 0x5c3b18, 0x81603d, 0xae8d6a, 0x92704d, 0x785734, 0xe7c6a3, 0xe4c6a0, 0xf2d6af, 0xead1a9, 0xffe7bf, 0xe0c79f,
  79. 0xc7b087, 0xead3aa, 0xdbc39d, 0xe2c8a3, 0xceb18f, 0xe5c8a6, 0xb69977, 0x644725, 0xa48767, 0x876d4a, 0x816744, 0x8c744e, 0x59411b, 0x543e17, 0x58421b, 0x67542c,
  80. 0x6d5e37, 0x65562f, 0x594a23, 0x483612, 0x362400, 0x483411, 0x5e4a29, 0x6a5333, 0x90795a, 0xbca385, 0xbfa687, 0xe0c7a8, 0xe1c9a7, 0xd3bb99, 0xddc5a1, 0xe6ceaa,
  81. 0x7b6647, 0x968162, 0xa18c6f, 0xa48f72, 0x9c876c, 0x655136, 0x564227, 0x4b3a1e, 0x362507, 0x3a2b0a, 0x423411, 0x716441, 0x847754, 0x8c825e, 0x8e8460, 0x9c926e,
  82. 0xd5d0b0, 0xd8d3b3, 0xccc8a5, 0xc8c2a0, 0xaba583, 0x9a9172, 0x857c5f, 0x60543a, 0x211200, 0x493824, 0x43321e, 0x261501, 0x3d2b15, 0x4c3a24, 0x523e26, 0x3d2910,
  83. 0x54442d, 0x41311a, 0x3b2a16, 0x574835, 0x564636, 0x382b1a, 0x736653, 0x978c76, 0xbeb79b, 0xada88a, 0xd4cfaf, 0xc7c4a3, 0xc9c6a5, 0xd7d4b5, 0xd7d4b5, 0xdddcbe,
  84. 0xb1b094, 0xb7b69a, 0xb6b596, 0xc5c2a3, 0xccc9a8, 0xc6c1a1, 0xc5c0a2, 0xaea78b, 0x918972, 0x4c412d, 0x4e4130, 0x5e4e3e, 0x61523f, 0x645542, 0x9d8e79, 0xd6c6af,
  85. 0xbcaf8f, 0xded0b3, 0xc7b99e, 0xa4967c, 0x9c8e74, 0x74684e, 0x6c6346, 0x746e4e, 0x5f5935, 0x817d57, 0x908c66, 0x78764f, 0x82805a, 0x858563, 0x939273, 0x9e9f80,
  86. 0x807d5a, 0x95936d, 0x9b9a6e, 0x969464, 0x9b9767, 0x87814f, 0x948e5c, 0xaea675, 0xb7af81, 0x685c32, 0x52461e, 0x80724b, 0x463811, 0x6d6036, 0x5f5226, 0x493c10,
  87. 0xcdc386, 0xc3b97c, 0x998f54, 0x4f420b, 0xa49760, 0x9b8e57, 0x72682d, 0x5d5316, 0x4d4506, 0x5c5415, 0x5c5717, 0x625e21, 0x66642b, 0x625f2a, 0x737141, 0x807d50,
  88. 0xd4d19a, 0xdbd69e, 0xdcd698, 0xcec783, 0xcbc37a, 0xb8b163, 0xc4bb6c, 0xc8bf70, 0xd3c77b, 0xd2c67c, 0xe0d48c, 0xdcd088, 0x70641c, 0xb7ae63, 0xd5cc7f, 0xcdc475,
  89. 0xd7d078, 0xdfd880, 0xc5bb66, 0x655a08, 0xbeb162, 0xd2c576, 0xd3c775, 0xe3d783, 0xcfc56e, 0xdbd17a, 0xdad27d, 0xccc575, 0xcac47a, 0xcbc682, 0xb8b475, 0xd1cd90
  90. };
  91.  
  92. const long MARY3[] =
  93. {
  94. 0xdd8c57, 0xe59562, 0xde9465, 0xcd885e, 0xd3936d, 0xcd916d, 0xc58a68, 0xba825f, 0xb6805a, 0x99653e, 0x70401a, 0x5b300d, 0x654121, 0x806144, 0xa88e73, 0x968166,
  95. 0x5c3d21, 0x432105, 0x573215, 0x825735, 0xa27450, 0xb98860, 0xd4a079, 0xe7b18b, 0xdfa983, 0xd9a17c, 0xd39c75, 0xd59a70, 0xdd9f70, 0xd89463, 0xd28b55, 0xda8f58,
  96. 0xd89b62, 0xdda069, 0xdda46f, 0xf1bc8a, 0xedba8b, 0xf1be91, 0xf4c196, 0xf0bc94, 0xdfaa82, 0xdba67e, 0xaa734c, 0xbd8560, 0xaf7957, 0x8f5a3b, 0x895639, 0x5c290e,
  97. 0x8e4f30, 0x995a3b, 0xa76847, 0xc08462, 0xb27853, 0x89522b, 0xd8a47c, 0xf9c89f, 0xecbd91, 0xf1c596, 0xffd6a4, 0xf5cc98, 0xf2c792, 0xf7ca91, 0xedbf84, 0xd5a76b,
  98. 0xecce90, 0xe5c789, 0xfadca0, 0xe3c48b, 0xe7c891, 0xf7d6a1, 0xe3bf8d, 0xe7c192, 0xdfb68a, 0xb2855c, 0x5c2b03, 0x8e5631, 0xd19571, 0x8d4d2a, 0xa6623f, 0xbc7654,
  99. 0xca865f, 0xb7764e, 0x965833, 0xdaa27d, 0x814f2a, 0x592d08, 0x7a532a, 0xb59064, 0xf0cea0, 0xf1d19e, 0xebcc96, 0xf2d59d, 0xf3d99e, 0xecd498, 0xddc78b, 0xf6e0a4,
  100. 0xead49b, 0xefd69e, 0xe4ca91, 0xf6d9a1, 0xf6d59f, 0xeac692, 0xf9d5a5, 0xe2c093, 0x89663e, 0x623f19, 0x5a3410, 0x7c512e, 0xca9a74, 0x9e6a42, 0xb1784d, 0xcb9064,
  101. 0xdfab7c, 0xbb885b, 0x7e4e26, 0xc79b76, 0x7d5532, 0x6b4423, 0x5b3511, 0x7b542d, 0xd4a97f, 0xe8bc8d, 0xfacc9a, 0xf7cc97, 0xf4cd96, 0xf3d09a, 0xe7c892, 0xa78953,
  102. 0x7b501d, 0xc79965, 0xf0be89, 0xffca96, 0xffc492, 0xffc192, 0xf1b488, 0xdca27c, 0x925d3b, 0x734222, 0x815435, 0xa27755, 0xc19771, 0x73481e, 0xdfb082, 0xf0c291,
  103. 0xe7bd8b, 0xeec494, 0x9e7549, 0x784e26, 0xa97d5a, 0x956443, 0x794321, 0x905430, 0xe8a77f, 0xefaa80, 0xde9867, 0xefac78, 0xefb07b, 0xcf965f, 0xb7824c, 0xb5824d,
  104. 0xfdc990, 0xb07740, 0xb2753e, 0xc17e47, 0xdc955f, 0xce8552, 0xd99063, 0xce8960, 0xbb7b57, 0x7b401e, 0xa4724f, 0x764922, 0xa1764c, 0xd9b084, 0xf2ca99, 0xe9c18e,
  105. 0xf0cf9c, 0xf9d5a5, 0xf8d3a6, 0xe7c095, 0xab8056, 0xac7c54, 0x8f5831, 0xbe8057, 0xb37045, 0xbb7746, 0xcc8652, 0xac6932, 0xd89a61, 0xebb378, 0xf2be84, 0xd6a469,
  106. 0xb88e54, 0xdfb277, 0xd7a66c, 0xe8b67b, 0xefb87f, 0xe2a972, 0xe5ab79, 0xdfa778, 0xdba87b, 0xddae84, 0xe8be94, 0xffdaae, 0xf6d5a8, 0xeecfa1, 0xeace9e, 0xe5c999,
  107. 0xf0daab, 0xecd6a7, 0xe8d0a4, 0xeed1a5, 0xe0c195, 0xedcb9e, 0xf8d2a5, 0xebc093, 0xefc190, 0xddae7a, 0xd7a872, 0xefc28b, 0xe7bc85, 0xd8af77, 0xf9d299, 0xffdba1,
  108. 0xeccb98, 0xf3d29d, 0xfad6a2, 0xefcb97, 0xeac591, 0xe5c08c, 0xbf9968, 0xae8a5a, 0xd2b082, 0xf5d6a8, 0xe1c498, 0xe9cea3, 0xead1a8, 0xf0d9af, 0xf7e1b8, 0xf1deb4,
  109. 0xe8d6ae, 0xebd8b0, 0xead4ab, 0xe9d2a9, 0xf5dcb3, 0xe9cca2, 0xbe9f73, 0x7e5d30, 0x654316, 0x9c7a4c, 0xdcb78a, 0xf6d4a6, 0xeecc9e, 0xfcdcad, 0xebcb9c, 0xf3d3a4,
  110. 0xf5d6a8, 0xebca9d, 0xebca9f, 0xe0bd93, 0xe5be95, 0xa17a53, 0x7e542e, 0x68411a, 0x6e4821, 0x87643c, 0xe1c097, 0xe4c79f, 0xeed5ad, 0xead4ad, 0xe6d2ad, 0xe5d3ad,
  111. 0xe9d7b1, 0xebd8b0, 0xeed6b0, 0xe9d0a8, 0xf1d1aa, 0xcba983, 0x734d28, 0x966e4a, 0x673c19, 0x4e2300, 0x774c29, 0xc59d79, 0xeecba5, 0xdfbe95, 0xefcfa6, 0xe1c296,
  112. 0xd8bb93, 0xdebe97, 0xeac8a2, 0xdeba96, 0xb7916d, 0xa67e5b, 0x431b00, 0x815936, 0xa07855, 0x724c27, 0xb08e68, 0xf2d5ad, 0xedd1aa, 0xead2ac, 0xecd6af, 0xecd6af,
  113. 0xecd6ad, 0xe7d0a7, 0xf2d9b1, 0xe9cda6, 0xf2d4ae, 0xceae88, 0x5a3612, 0xb18d69, 0x7c5632, 0x6f4b27, 0x825e3a, 0xc6a47f, 0xd4b48e, 0xe7c7a1, 0xdfc29a, 0xbfa37b,
  114. 0x553c14, 0x796038, 0xb0946f, 0xd9bd98, 0xbd9f7b, 0x5c3b18, 0x81603d, 0xae8d6a, 0x92704d, 0x785734, 0xe7c6a3, 0xe4c6a0, 0xf2d6af, 0xead1a9, 0xffe7bf, 0xe0c79f,
  115. 0xc7b087, 0xead3aa, 0xdbc39d, 0xe2c8a3, 0xceb18f, 0xe5c8a6, 0xb69977, 0x644725, 0xa48767, 0x876d4a, 0x816744, 0x8c744e, 0x59411b, 0x543e17, 0x58421b, 0x67542c,
  116. 0x6d5e37, 0x65562f, 0x594a23, 0x483612, 0x362400, 0x483411, 0x5e4a29, 0x6a5333, 0x90795a, 0xbca385, 0xbfa687, 0xe0c7a8, 0xe1c9a7, 0xd3bb99, 0xddc5a1, 0xe6ceaa,
  117. 0x7b6647, 0x968162, 0xa18c6f, 0xa48f72, 0x9c876c, 0x655136, 0x564227, 0x4b3a1e, 0x362507, 0x3a2b0a, 0x423411, 0x716441, 0x847754, 0x8c825e, 0x8e8460, 0x9c926e,
  118. 0xd5d0b0, 0xd8d3b3, 0xccc8a5, 0xc8c2a0, 0xaba583, 0x9a9172, 0x857c5f, 0x60543a, 0x211200, 0x493824, 0x43321e, 0x261501, 0x3d2b15, 0x4c3a24, 0x523e26, 0x3d2910,
  119. 0x54442d, 0x41311a, 0x3b2a16, 0x574835, 0x564636, 0x382b1a, 0x736653, 0x978c76, 0xbeb79b, 0xada88a, 0xd4cfaf, 0xc7c4a3, 0xc9c6a5, 0xd7d4b5, 0xd7d4b5, 0xdddcbe,
  120. 0xb1b094, 0xb7b69a, 0xb6b596, 0xc5c2a3, 0xccc9a8, 0xc6c1a1, 0xc5c0a2, 0xaea78b, 0x918972, 0x4c412d, 0x4e4130, 0x5e4e3e, 0x61523f, 0x645542, 0x9d8e79, 0xd6c6af,
  121. 0xbcaf8f, 0xded0b3, 0xc7b99e, 0xa4967c, 0x9c8e74, 0x74684e, 0x6c6346, 0x746e4e, 0x5f5935, 0x817d57, 0x908c66, 0x78764f, 0x82805a, 0x858563, 0x939273, 0x9e9f80,
  122. 0x807d5a, 0x95936d, 0x9b9a6e, 0x969464, 0x9b9767, 0x87814f, 0x948e5c, 0xaea675, 0xb7af81, 0x685c32, 0x52461e, 0x80724b, 0x463811, 0x6d6036, 0x5f5226, 0x493c10,
  123. 0xcdc386, 0xc3b97c, 0x998f54, 0x4f420b, 0xa49760, 0x9b8e57, 0x72682d, 0x5d5316, 0x4d4506, 0x5c5415, 0x5c5717, 0x625e21, 0x66642b, 0x625f2a, 0x737141, 0x807d50,
  124. 0xd4d19a, 0xdbd69e, 0xdcd698, 0xcec783, 0xcbc37a, 0xb8b163, 0xc4bb6c, 0xc8bf70, 0xd3c77b, 0xd2c67c, 0xe0d48c, 0xdcd088, 0x70641c, 0xb7ae63, 0xd5cc7f, 0xcdc475,
  125. 0xd7d078, 0xdfd880, 0xc5bb66, 0x655a08, 0xbeb162, 0xd2c576, 0xd3c775, 0xe3d783, 0xcfc56e, 0xdbd17a, 0xdad27d, 0xccc575, 0xcac47a, 0xcbc682, 0xb8b475, 0xd1cd90
  126. };
  127.  
  128. void setup()
  129. {
  130.         FastLED.addLeds<NEOPIXEL,DATA_PIN>(leds, NUM_LEDS);
  131.         FastLED.setBrightness(9);
  132.         Serial.begin(9600); // initialize serial communication
  133.         Serial.print("Start Serial ");
  134.         pinMode(ledpin, OUTPUT); // set the LED pin mode
  135.         Serial.print("WiFi101 shield: ");   // Check for the presence of the shield
  136.         if (WiFi.status() == WL_NO_SHIELD)
  137.     {
  138.               Serial.println("NOT PRESENT");
  139.               return; // don't continue
  140.         }
  141.         Serial.println("DETECTED");
  142.         // attempt to connect to Wifi network:
  143.         while ( status != WL_CONNECTED)
  144.     {
  145.               digitalWrite(ledpin, LOW);
  146.               Serial.print("Attempting to connect to Network named: ");
  147.               Serial.println(ssid); // print the SSID
  148.               digitalWrite(ledpin, HIGH);
  149.               status = WiFi.begin(ssid, pass);
  150.               // wait 10 seconds for connection:
  151.               delay(10000);
  152.         }
  153.         server.begin(); //
  154.         printWifiStatus(); //  print out the status
  155.         digitalWrite(ledpin, HIGH);
  156. }
  157.  
  158.  
  159. void loop()
  160. {
  161.       WiFiClient client = server.available(); //incoming clients
  162.  
  163.       if (client) { // if you get a client,
  164.         Serial.println("new client"); // print a message out the serial port
  165.             String currentLine = ""; // make a String to hold incoming data from the client
  166.             while (client.connected()) { // loop while the client's connected
  167.             if (client.available())  // if there's bytes to read from the client,
  168.         {
  169.                  char c = client.read(); // read a byte, then
  170.                 Serial.write(c); // print it out the serial monitor
  171.             }
  172.         if (currentLine.length() == 0) {
  173.         client.println("HTTP/1.1 200 OK"); // HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
  174.             client.println("Content-type:text/html");    // and a content-type
  175.             client.println();
  176.            
  177.             client.print("Click <a href=\"/H\">here</a> turn the matrix on <br>");
  178.             client.print("Click <a href=\"/L\">here</a> turn the matrix off<br>");
  179.            
  180.             // The HTTP response ends with another blank line:
  181.             client.println();
  182.             // break out of the while loop:
  183.             break;
  184.       }
  185.       else
  186.     { // if got a newline, then clear currentLine:
  187.             currentLine = "";
  188.       }
  189.        
  190.       // Check to see if the client request was "GET /H" or "GET /L":
  191.       if (currentLine.endsWith("GET /H")) {
  192.          for(int passtime = 0; passtime < 8; passtime++)
  193.     {
  194.                     FastLED.clear();
  195.                     for(int i = 0; i < NUM_LEDS; i++)
  196.              {
  197.                         leds[i] = pgm_read_dword(&(MARY1[i]));  // Read array from Flash
  198.                       }
  199.                    
  200.                     FastLED.show();
  201.                     delay(500);
  202.              
  203.                 FastLED.clear();
  204.                     for(int i = 0; i < NUM_LEDS; i++)
  205.             {
  206.                         leds[i] = pgm_read_dword(&(MARY2[i]));  // Read array from Flash
  207.                       }
  208.                    
  209.                     FastLED.show();
  210.                     delay(500);
  211.                    
  212.                      FastLED.clear();
  213.                     for(int i = 0; i < NUM_LEDS; i++)
  214.              {
  215.                         leds[i] = pgm_read_dword(&(MARY3[i]));  // Read array from Flash
  216.                       }
  217.                    
  218.                     FastLED.show();
  219.                     delay(500);
  220.         }
  221.        
  222.               if (currentLine.endsWith("GET /L")) {
  223.                     FastLED.clear(); // GET /L turns the LED off
  224.               }
  225.       }
  226.      
  227.           // close the connection:
  228.           client.stop();
  229.           Serial.println("client disonnected");
  230.      
  231.       }
  232.      
  233. void printWifiStatus() {
  234.      
  235.       Serial.print("SSID: "); // print the SSID of the network
  236.       Serial.println(WiFi.SSID());
  237.      
  238.       IPAddress ip = WiFi.localIP();     // print WiFi shield's IP address:
  239.       Serial.print("IP Address: ");
  240.       Serial.println(ip);
  241.  
  242.       long rssi = WiFi.RSSI();       // print the received signal strength:
  243.       Serial.print("signal strength (RSSI):");
  244.       Serial.print(rssi);
  245.       Serial.println(" dBm");
  246.  
  247.       Serial.print("To see this page in action, open a browser to http://");       // print where to go in a browser:
  248.       Serial.println(ip);
  249. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top