blynk & neopixelring & w7500
Dependencies: BlynkNeopixelW7500 Blynk_Example_WIZwiki-W7500 WIZnetInterface_ WS2812 mbed
Fork of Blynk_Example_WIZwiki-W7500 by
Diff: main.cpp
- Revision:
- 0:decc160be69d
- Child:
- 1:030843f74e27
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Aug 02 02:04:39 2017 +0000 @@ -0,0 +1,66 @@ +/************************************************************* + Download latest Blynk library here: + https://github.com/blynkkk/blynk-library/releases/latest + 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 + Sketch generator: http://examples.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 example shows how to use Arduino.org Ethernet Shield 2 (W5500) + to connect your project to Blynk. + NOTE: You may have to install Arduino.ORG IDE to get it working: + http://www.arduino.org/software + Pins 10, 11, 12 and 13 are reserved for Ethernet module. + DON'T use them in your sketch directly! + Feel free to apply it to any other example. It's simple! + *************************************************************/ + +/* Comment this out to disable prints and save space */ +#define BLYNK_PRINT Serial + +#include "mbed.h" +#include <SPI.h> +#include "EthernetInterface.h" +#include <BlynkSimpleEthernet2.h> + + +EthernetInterface eth; + +// You should get Auth Token in the Blynk App. +// Go to the Project Settings (nut icon). +char auth[] = "f6e02fba337e45f19f9c51567323ea8d"; + + +void setup() +{ + uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0xff, 0xff, 0x25}; + eth.init(mac_addr); + eth.connect(); + + Blynk.begin(auth); + // You can also specify server: + //Blynk.begin(auth, "blynk-cloud.com", 8442); + //Blynk.begin(auth, IPAddress(192,168,1,100), 8442); + // For more options, see Boards_Ethernet/Arduino_Ethernet_Manual example +} + +void loop() +{ + //Blynk.run(); +} + +int main(void) { + printf("Hello\r\n"); + setup(); + printf("Blynk init!\r\n"); + while(1){ + loop(); + } +} \ No newline at end of file