Line Chart issues

So I am having a pretty basic problem…

I currently have a DHT22 temp/humidity sensor hooked up to my Arduino UNO, with a 5500 Ethernet shield on top. I have it connect and sending both temp and humidity data to my dashboard

However, I cannot get a Line Chart working, at all. I would like to show both the temp and humidity together on the same graph. I have gone through the different tutorials offered on the website, but they tell you to set the data type to either “virtual” or “I/O”…neither of which exist, as a sensor/data type.

Currently, I set my sensor as “Temperature” and the channel to V0. See my (simple) code below:
How do I get this working?

    #include "DHT.h"
    #include <CayenneMQTTEthernet.h>

    //#define CAYENNE_DEBUG       // Uncomment to show debug messages
    #define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
    #define DHTPIN 6     // what digital pin we're connected to
    #define DHTTYPE DHT22   // DHT 22 
    #define VIRTUAL_CHANNEL V0
    #define VIRTUAL_humid

    // Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
    char username[] = "";
    char password[] = "";
    char clientID[] = "";
    DHT dht(DHTPIN, DHTTYPE);

    void setup() {
    	Serial.begin(115200);
    	Cayenne.begin(username, password, clientID);
      dht.begin();
    }

    void loop()
    {
      Cayenne.loop();
    }
    // Default function for sending sensor data at intervals to Cayenne.
    // You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.
    CAYENNE_OUT(V0)
    {
    	float f = dht.readTemperature(true);
      Cayenne.virtualWrite(V0, f);
    }
    CAYENNE_OUT(V1)
    {
      float h = dht.readHumidity();
      Cayenne.virtualWrite(V1, h);
    }

have a look at this Release Notes February 23th 2018 - NEW FEATURES!

2 Likes

So I looked at the release notes…but still cannot get the line chart to work. Here’s screenshots of my setup. I have data coming in, but the chart will not populate…the sensor has been running for two days, so it’s not an issue of not waiting long enough. I must be missing something super simple.

#include “DHT.h”
#include <CayenneMQTTEthernet.h>

//#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#define DHTPIN 6 // what digital pin we’re connected to
#define DHTTYPE DHT22 // DHT 22
#define VIRTUAL_CHANNEL V0
#define VIRTUAL_CHANNEL V1

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “29f388e0-1b06-11e8-b59c-db84183bf26b”;
char password = “5d534fb4daa39c09b563b3f9495db235c6653a92”;
char clientID = “0c0d9fc0-1b3b-11e8-a21e-7395420787ce”;
DHT dht(DHTPIN, DHTTYPE);

void setup() {
Serial.begin(115200);
Cayenne.begin(username, password, clientID);
dht.begin();
}

void loop()
{
Cayenne.loop();
}
// Default function for sending sensor data at intervals to Cayenne.
// You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.
CAYENNE_OUT(V0)
{
float f = dht.readTemperature(true);
Cayenne.virtualWrite(V0, f);
}
CAYENNE_OUT(V1)
{
float h = dht.readHumidity();
Cayenne.virtualWrite(V1, h);
}

Hi @dfigravity,

To use the 2 data point graphs, you must edit your current widget (see below), into a Line Graph, then you can click “Add Data Point” and select the Humidity sensor. You will then see the Temp widget transform into a line graph with 2 data points.

image
image

nvm…I’m an idiot. :slight_smile:

Hi @dfigravity,

Oh no worries. It happens to the best of us :slight_smile: