User Manual

Next, open the Applications/SendTweet example for WICED or create a new sketch with the following code, updating
it with your access point details, as well as the Consumer and Access Tokens generated above:
/*********************************************************************
This is an example for our Feather WIFI modules
Pick one up today in the adafruit shop!
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
MIT license, check LICENSE for more information
All text above, and the splash screen below must be included in
any redistribution
*********************************************************************/
#include "adafruit_feather.h"
#include "adafruit_http.h"
#include "adafruit_twitter.h"
/* This example demonstrates how to use AdafrtuiTwitter class
* to send out a tweet
*
* To run this demo:
* 1. Goto https://apps.twitter.com/ and login
* 2. Create an application to use with this WICED Feather
* 3. (Optional) You could change the access level to give the applicaion
* permission to send DM. It is advised to do so, do that you could use WICED
* to send DM in other example
* 4. In the app management click "manage keys and access tokens"
* and then click "Create my access token"
* 5. Change CONSUMER_KEY, CONSUMER_SECRET, TOKEN_ACCESS, TOKEN_SECRET accordingly
* 6. Change your TWEET status
* 7. Compile and run, if you run this sketch too often, Twitter server may reject
* your connection request, just wait a few minutes and try again.
*/
// Network
#define WLAN_SSID "yourSSID"
#define WLAN_PASS "yourPassword"
// Twitter Account
#define CONSUMER_KEY "YOUR_CONSUMER_KEY"
#define CONSUMER_SECRET "YOUR_CONSUMER_SECRET"
#define TOKEN_ACCESS "YOUR_TOKEN_ACCESS"
#define TOKEN_SECRET "YOUR_TOKEN_SECRET"
#define TWEET "Hello from Adafruit WICED Feather"
AdafruitTwitter Twitter;
/**************************************************************************/
/*!
@brief The setup function runs once when reset the board
*/
/**************************************************************************/
void setup()
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 147 of 202