Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1426541

Browse files
committed
Added Ethernet Shield 2 example.
1 parent 5fc5884 commit 1426541

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
Cayenne Ethernet Shield 2 Example
3+
Adapted from Blynk's Arduino_Ethernet Example
4+
5+
This sketch connects to the Cayenne server using an Arduino Ethernet Shield 2
6+
and runs the main communication loop.
7+
8+
For Cayenne Dashboard widgets using digital or analog pins this sketch will automatically
9+
send data on those pins to the Cayenne server. If the widgets use Virtual Pins, data
10+
should be sent to those pins using virtualWrites. Examples for sending and receiving
11+
Virtual Pin data are under the Basics folder.
12+
*/
13+
14+
//#define CAYENNE_DEBUG // Uncomment to show debug messages
15+
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
16+
#include <CayenneEthernetW5500.h>
17+
18+
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
19+
char token[] = "AuthenticationToken";
20+
21+
void setup()
22+
{
23+
Serial.begin(9600);
24+
Cayenne.begin(token);
25+
}
26+
27+
void loop()
28+
{
29+
Cayenne.run();
30+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Cayenne Ethernet Shield 2 Example
2+
3+
This sketch connects to the Cayenne server using an Arduino Ethernet Shield 2
4+
and runs the main communication loop.
5+
6+
For Cayenne Dashboard widgets using digital or analog pins this sketch will automatically
7+
send data on those pins to the Cayenne server. If the widgets use Virtual Channels, data
8+
should be sent to those channels using virtualWrites. Examples for sending and receiving
9+
Virtual Pin data are under the Basics folder..

0 commit comments

Comments
 (0)