File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Connections/ArduinoEthernet2 Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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..
You can’t perform that action at this time.
0 commit comments