I am trying to connect to internet using chipKit Wi-Fire board with ubidots code but I get an “Unable to connection, status: 268450048” error every time i try to send value to ubidots. i am using the code provided on the ubidots website for wifi connection and uploading variable to server.
I don’t know what the status mean. Can anyone please tell me how to resolve this issue or any information on the status that might lead me to resolve this issue will be very helpful.
Yes i saw the problem, I will fix it right now, try with this code:
// This example is to send one varable to the Ubidots API
#include <MRF24G.h>
#include <UbidotsWiFire.h>
#define ID "Your_variable_ID_here" // Put here your Ubidots variable ID
#define TOKEN "Your_token_here" // Put here your Ubidots TOKEN
#define SSIDWIFI "Your_WiFi_SSID_here" // Put here your WiFi SSID
#define PASS "Your_WiFi_PASS_here" // Put here your WiFi password
Ubidots client(TOKEN);
void setup(){
Serial.begin(9600);
client.setWifiConnection(SSIDWIFI, PASS);
}
void loop(){
float value = analogRead(A12);
client.add(ID, value);
client.sendAll();
}