Hello Everyone,
I’ve created a project with arduino UNO + ethernetshield.
I’ve added a graph widget to make a temperature graph. But its not showing any graph,
Though my device is connected. Here is my code:
From Loop function:
void loop()
{
Cayenne.run();
}
// This function is called when the Cayenne widget requests data for the Virtual Pin.
CAYENNE_OUT(VIRTUAL_PIN)
{
int sensorReading = analogRead(tmpPin);
Serial.print(“From Sensor:”);
Serial.println(sensorReading);
float temperature = sensorReading / 9.31;
Serial.print(“Temperature:”);
Serial.println(temperature);
Cayenne.celsiusWrite(VIRTUAL_PIN, temperature);
}
Its not entering into CAYENNE_OUT(VIRTUAL_PIN) function.
Pls help me.
Best Regards.
Ban