I am using Arduino Uno r3 with Wifi shield WINC1500 which works as expected.
However when I added my Arduino to Cayenne and tried to use LED or photoresistor I am getting code without any extra code to add this devices.
/*
Cayenne Photoresistor Example
This sketch shows how to automatically send data to a Photoresistor Sensor in the Cayenne Dashboard.
The Cayenne Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.
Steps:
- In the Cayenne Dashboard add a new Photoresistor widget.
- Set the widget to Value Display.
- Select the Integrated ADC and a pin number.
- Attach a photoresistor to the analog pin on your Arduino matching the selected pin.
Make sure to use an analog pin, not a digital pin.
Schematic:
[Ground] – [10k-resistor] – | – [Photoresistor] – [5V]
|
Analog Pin - Set the token variable to match the Arduino token from the Dashboard.
- Compile and upload this sketch.
- Once the Arduino connects to the Dashboard it should automatically update the Photoresistor widget with data.
*/
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
// If you’re not using the Ethernet W5100 shield, change this to match your connection type. See Communications examples.
//#include <CayenneEthernet.h>
#include <CayenneWiFi101.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “MYTOKEN”;
char ssid = “MYWIFINETWORK”;
char password = “MYSUPRSECRETPASSWORD”;
void setup()
{
WiFi.setPins(8,7,4);
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
Cayenne.run();
}
what is happening? do I miss something obvious? My understanding is that Cayenne should add all code I need for me.