Hardware Reference
In-Depth Information
MAC address, just use the default one that comes in the example sketch.) Your
API key and Feed ID can be found on the Xively web page that you kept open
from before. Find the “API Keys” section (see Figure 14-8).
Figure 14-8:
Xively Feed and API Info
This section provides the Feed ID (the first number) and the API key (the second
number) to insert into your sketch. The following code snippets show the lines
of code that you will need to update with the appropriate values. Listing 14-3
shows an example of the complete sketch with all the values inserted (your
values will be different than the ones shown in the listing).
Replace the MAC Address with your own:
// MAC address for your Ethernet shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
Replace the Xively API key with your own:
// Your Xively key to let you upload data
char xivelyKey[] = "YOUR_XIVELY_API_KEY";
Replace the Feed ID (15552 in the example) with your own (yours may have
a different number of digits):
// Finally, wrap the datastreams into a feed
XivelyFeed feed(15552, datastreams, 1 /* number of datastreams */);
Listing 14-3 shows the completed program.
Search WWH ::
Custom Search