1- #include < SlicingDice.h>
1+ #include " SlicingDice.h"
22#include < ArduinoJson.h>
33
4- SlicingDice sd = SlicingDice(" mytoken" );
4+ // Demo API key, if you need a new demo API key visit: https://panel.slicingdice.com/docs/#api-details-api-connection-api-keys-demo-key
5+ const char * apiKey = " eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfX3NhbHQiOiJkZW1vNTZtIiwicGVybWlzc2lvbl9sZXZlbCI6MywicHJvamVjdF9pZCI6MjE3LCJjbGllbnRfaWQiOjEwfQ.rKHWahhcTN8Hvhns8-O2_KwjC_b3SFHd3kqZLyDMrfc" ;
6+ const char * host = " api.slicingdice.com" ;
7+ int port = 8080 ;
8+ // test = 1 indicates that will use test endpoint, 0 indicates will use production end-point
9+ int test = 1 ;
10+ SlicingDice sd = SlicingDice(apiKey, host, port, test);
511
612void setup () {
713 // Open serial communications and wait for port to open:
@@ -11,8 +17,8 @@ void setup() {
1117
1218 // Arduino network settings, should match your internet connection properties
1319 byte mac[] = { 0xDE , 0xAD , 0xBE , 0xEF , 0xFE , 0xED };
14- byte ip[] = { 192 , 168 , 1 , 10 };
15- byte gateway[] = { 192 , 168 , 1 , 1 };
20+ byte ip[] = { 192 , 168 , 0 , 10 };
21+ byte gateway[] = { 192 , 168 , 0 , 1 };
1622 byte subnet[] = { 255 , 255 , 255 , 0 };
1723 byte dnxs[] = { 8 , 8 , 8 , 8 };
1824 Ethernet.begin (mac, ip, dnxs, gateway, subnet);
0 commit comments