私は問題を抱えていましたが、コードを使用してUbidotsにデータを送信するのに成功しましたが、今送信できません。別のUbidotsアカウントを使用しようとしました。また働いていません。誰かがこれを手伝ってくれますか、どうもありがとうございます。 PS。コードは、デバイスをWIFIに接続することができますが、Ubidotsにデータを送信することはできません。Wizfi250のArduino UNO(9600)はUbidotsにデータを送信できません
#include "UbidotsWizFi250.h"
#define TOKEN "YNbIJdlwtH8s9p4xYNlZTuqhB6bfYY" // Replace it with your Ubidots token
#define ID "5795e2f876254249c8ce246a" // Replace it with your Ubidots' variable ID
#define WLAN_SSID "XXXXX" // Your WiFi SSID, cannot be longer than 32 characters!
#define WLAN_PASS "xxxxxxxxx" // Replace it with your WiFi pass
// Security can be OPEN, WEP, WPA, WPAAES, WPA2AES, WPA2TKIP, WPA2
#define WLAN_SECURITY "WPA2"
Ubidots client(TOKEN);
void setup() {
Serial.begin(9600);
while(!client.wifiConnection(WLAN_SSID, WLAN_PASS, WLAN_SECURITY));
}
void loop() {
int value = analogRead(A4);
client.add(ID,value);
client.sendAll();
Serial.println("--------------------");
delay(1000);
}
https://github.com/NaSao/MoistureAlarm/blob/master/pushUbidotsData.inoここに私のコードがあります –