I am using Arduino Uno with W5100 ethernet shield
I am using the Web dashboard
When trying to activate a thermistor widget on a digital pin, the system gives 3 alternatives, virtual, analog and digital. It lets me choose digital pin, but when the script is produced it is for analog pin and not digital.
Here is part of the script:
1. In the Cayenne Dashboard add a new Thermistor widget.
2. Set the widget to Value Display.
3. Select Virtual Pins and a virtual pin number.
4. Set VIRTUAL_PIN to the pin number you selected.
5. Attach a thermistor to an analog pin on your Arduino. Make sure to use an analog pin, not a digital pin.
[Ground] -- [10k-resistor] -- | -- [Thermistor] -- [5V]
6. Set the thermistorPin variable to match the pin used to connect the thermistor.
7. Set the token variable to match the Arduino token from the Dashboard.
8. Compile and upload this sketch.
9. Once the Arduino connects to the Dashboard it should automatically update the Thermistor 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.
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = "xxxxxxxxxx";
// Virtual Pin of the Thermistor widget.
define VIRTUAL_PIN V1
// Analog pin the thermistor is connected to.
const int thermistorPin = 0;
// Resistance of the resistor. Currently set to 10k but this can be set to the measured resistance of your
// resistor for greater accuracy.
const float resistance = 10000;
Thermistor thermistor(thermistorPin, resistance);