Using WiDo with Plot.ly, tutorials?

I purchased a WiDo the other day with the intention of making the arduino based weather station I'm working on wireless. Is anyone aware of any tutorials to connect the WiDo to Plot.ly so I can graph my collected data?
Thanks.
Thanks.
2014-12-17 11:57:45 Thanks again for your reply, Grey.
The BuildTest example works as it should; over serial it lists the available networks, connects to my network and pings Bing.
The sketch I'm running contains my network name and password, and my Plotly user name, API key and tokens. I just edited them out for the forum post ;)
It's always helpful to check the obvious stuff though, any other suggestions would be greatly appreciated!
Rozz
The BuildTest example works as it should; over serial it lists the available networks, connects to my network and pings Bing.
The sketch I'm running contains my network name and password, and my Plotly user name, API key and tokens. I just edited them out for the forum post ;)
It's always helpful to check the obvious stuff though, any other suggestions would be greatly appreciated!

2014-12-17 06:36:21 Hello Rozz,
It is better to test the hardware first. When you upload the test code "Buildtest", is there anything in the serial port?
Have you change your network configuration?
[code]#define WLAN_SSID "myNetwork"
#define WLAN_PASS "myPassword"[/code]
It should be a special API for every client. but I haven't seen any information about your account. dfrobot something?
Grey.CC
It is better to test the hardware first. When you upload the test code "Buildtest", is there anything in the serial port?
Have you change your network configuration?
[code]#define WLAN_SSID "myNetwork"
#define WLAN_PASS "myPassword"[/code]
It should be a special API for every client. but I haven't seen any information about your account. dfrobot something?

2014-12-16 17:35:43 Ok, so I'm still having no luck with this project.
I've taken the code from the WiDo examples in the Adafruit_CC3000.h library (downloaded from the WiDo wiki) and spliced it into one of the Plotly sketches (Specifically this [url=https://raw.githubusercontent.com/plotly/workshop/master/arduino/lightsensor/lightsensor_cc3000.ino]sketch[/url] from this [url=https://plot.ly/arduino/photoresistor-tutorial/]example[/url]).
The issue is I don't fully understand what the code is doing to connect the WiDo to the network.
I've ended up with the following sketch:
[code]#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#define Wido_IRQ 7
#define Wido_VBAT 5
#define Wido_CS 10
#include <plotly_streaming_cc3000.h>
#define photoresistor_pin 0 //analog pin 0
Adafruit_CC3000 Wido = Adafruit_CC3000(Wido_CS, Wido_IRQ, Wido_VBAT,SPI_CLOCK_DIVIDER); // you can change this clock speed
#define WLAN_SSID "myNetwork"
#define WLAN_PASS "myPassword"
#define WLAN_SECURITY WLAN_SEC_WPA2
#define TCP_TIMEOUT 3000
// Sign up to plotly here: https://plot.ly
// View your API key and streamtokens here: https://plot.ly/settings
#define nTraces 1
// View your tokens here: https://plot.ly/settings
// Supply as many tokens as data traces
// e.g. if you want to ploty A0 and A1 vs time, supply two tokens
char *tokens[nTraces] = {"PlotlyToken"};
// arguments: username, api key, streaming token, filename
plotly graph("PlotlyUsername", "PlolyAPIKey", tokens, "filename", nTraces);
void wifi_connect(){
/* Initialise the module */
Serial.println(F("\n... Initializing..."));
if (!Wido.begin())
{
Serial.println(F("... Couldn't begin()! Check your wiring?"));
while(1);
}
// Optional SSID scan
// listSSIDResults();
if (!Wido.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("... Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("... Request DHCP"));
while (!Wido.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
}
void setup() {
graph.maxpoints = 100;
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
wifi_connect();
bool success;
success = graph.init();
if(!success){while(true){}}
graph.openStream();
}
void loop() {
int sensor_reading = analogRead(photoresistor_pin);
graph.plot(millis(), sensor_reading, tokens[0]);
delay(500);
}[/code]
Nothing appears on the serial monitor when I upload the sketch. I have also tried including the connection code in the setup as is done in the WiDo examples but I get the sample problem.
Can you see any obvious problems with the code I have posted? Do you have any suggestions on how I should proceed from here?
Rozz
I've taken the code from the WiDo examples in the Adafruit_CC3000.h library (downloaded from the WiDo wiki) and spliced it into one of the Plotly sketches (Specifically this [url=https://raw.githubusercontent.com/plotly/workshop/master/arduino/lightsensor/lightsensor_cc3000.ino]sketch[/url] from this [url=https://plot.ly/arduino/photoresistor-tutorial/]example[/url]).
The issue is I don't fully understand what the code is doing to connect the WiDo to the network.
I've ended up with the following sketch:
[code]#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#define Wido_IRQ 7
#define Wido_VBAT 5
#define Wido_CS 10
#include <plotly_streaming_cc3000.h>
#define photoresistor_pin 0 //analog pin 0
Adafruit_CC3000 Wido = Adafruit_CC3000(Wido_CS, Wido_IRQ, Wido_VBAT,SPI_CLOCK_DIVIDER); // you can change this clock speed
#define WLAN_SSID "myNetwork"
#define WLAN_PASS "myPassword"
#define WLAN_SECURITY WLAN_SEC_WPA2
#define TCP_TIMEOUT 3000
// Sign up to plotly here: https://plot.ly
// View your API key and streamtokens here: https://plot.ly/settings
#define nTraces 1
// View your tokens here: https://plot.ly/settings
// Supply as many tokens as data traces
// e.g. if you want to ploty A0 and A1 vs time, supply two tokens
char *tokens[nTraces] = {"PlotlyToken"};
// arguments: username, api key, streaming token, filename
plotly graph("PlotlyUsername", "PlolyAPIKey", tokens, "filename", nTraces);
void wifi_connect(){
/* Initialise the module */
Serial.println(F("\n... Initializing..."));
if (!Wido.begin())
{
Serial.println(F("... Couldn't begin()! Check your wiring?"));
while(1);
}
// Optional SSID scan
// listSSIDResults();
if (!Wido.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("... Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("... Request DHCP"));
while (!Wido.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
}
void setup() {
graph.maxpoints = 100;
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
wifi_connect();
bool success;
success = graph.init();
if(!success){while(true){}}
graph.openStream();
}
void loop() {
int sensor_reading = analogRead(photoresistor_pin);
graph.plot(millis(), sensor_reading, tokens[0]);
delay(500);
}[/code]
Nothing appears on the serial monitor when I upload the sketch. I have also tried including the connection code in the setup as is done in the WiDo examples but I get the sample problem.
Can you see any obvious problems with the code I have posted? Do you have any suggestions on how I should proceed from here?

2014-12-11 14:34:45 Hi Grey!
They have API for Arduino which can be found here: https://github.com/plotly/arduino-api
They also have several tutorials for small projects which include sketches for use with the Adafruit CC3000 WiFi Shield.
I figured that since the WiDo's wifi library is based on the Adafruit CC3000 library it would be relatively easy to adapt these sketches for use with the WiDo.
As it stands, my WiDo won't connect to the network when using these sketches with my current adaptations.
Rozz
They have API for Arduino which can be found here: https://github.com/plotly/arduino-api
They also have several tutorials for small projects which include sketches for use with the Adafruit CC3000 WiFi Shield.
I figured that since the WiDo's wifi library is based on the Adafruit CC3000 library it would be relatively easy to adapt these sketches for use with the WiDo.
As it stands, my WiDo won't connect to the network when using these sketches with my current adaptations.

2014-12-11 06:23:04 Polt.ly? I heard this website before.
It is a platform which you could update the data and make a graph. It should be very interesting.
Is there any API for Arduino? Have you tried it?
Grey.CC
It is a platform which you could update the data and make a graph. It should be very interesting.
Is there any API for Arduino? Have you tried it?
