Hi,
I am new to Ubidots and was hoping someone could help me out. I have a CC3000 with an Arduino Uno and I can get the single variable upload to work, but when I try to add a second variable the code hangs. I setup a second variable on the website and used that ID. Can I do this with a free account or do I need to purchase an account to pull in more than one variable per device?
Thanks for any help!!
Jon
code is as follows:
#include <UbidotsCC3000.h>
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
//#include "utility/debug.h" // Uncomment this line to set DEBUG on
#define WLAN_SSID "xxxxxx" // Your WiFi SSID, cannot be longer than 32 characters!
#define WLAN_PASS "xxxxxx" // Replace it with your WiFi pass
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
#define TOKEN "xxxxxx" // Replace it with your Ubidots token
#define ID "xxxxxxx" // Replace it with your Ubidots' variable ID
#define ID2 "xxxxxx"
Ubidots client(TOKEN);
void setup() {
Serial.begin(115200);
client.initialize();
client.wifiConnection(WLAN_SSID, WLAN_PASS, WLAN_SECURITY);
}
void loop() {
float value = analogRead(A0);
float value2 = analogRead(A1);
client.add(ID,value);
client.add(ID2,value2);
client.sendAll();
}