Hi everyone I’m trying to use thinger.io with my new Arduino bored Arduino Uno WiFi Rev2 with thinger.io, so when I run the code its says in the serial monitor that “Auth Failed! Check username, device id, or device credentials” can anyone help me?
#include <WiFiNINA.h>
#define _DEBUG_
// the rest of your sketch goes here
#include <SPI.h>
#include <ThingerWifi.h>
#define USERNAME "USERNAME"
#define DEVICE_ID "DEVICE_ID"
#define DEVICE_CREDENTIAL "DEVICE_CREDENTIAL"
#define SSID "SSID"
#define SSID_PASSWORD "PASSWORD"
#define relay1 3
#define relay2 4
ThingerWifi thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
int pwm=0;
void setup() {
Serial.begin(9600);
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
// configure wifi network
thing.add_wifi(SSID, SSID_PASSWORD);
// pin control example (i.e. turning on/off a light, a relay, etc)
thing["led"] << digitalPin(LED_BUILTIN);
thing["relay1"] << digitalPin(relay1);
thing["relay2"] << digitalPin(relay2);
thing["pwm"] << inputValue(pwm, {
analogWrite(2,pwm);
});
thing["analog"] >> outputValue(analogRead(0));
// more details at http://docs.thinger.io/arduino/
}
void loop() {
thing.handle();
}