446925884 by Unknown

446925884 by Unknown

Author:Unknown
Language: eng
Format: epub


//Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.

if (millis() - lastMillis > 10000)

{

lastMillis = millis();

//Write data to Cayenne here. This example just sends the current uptime in milliseconds.

send_data(); // call function here

Cayenne.virtualWrite(0, IR1_data); // write data on channel 0 of cayenne APP

}

}

CAYENNE_IN_DEFAULT()

{

CAYENNE_LOG(“CAYENNE_IN_DEFAULT(%u) - %s, %s”, request.channel, getValue.getId(), getValue.asString());

//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError(“Error message”);

}

Cayenne APP for Data logging

The following are the steps to add NodeMCU in the cayenne cloud:

Install the Arduino IDE and add Cayenne MQTT Library to the Arduino IDE.

Install the ESP8266 board package inthe Arduino IDE.

Install the required USB driver on the computer to program ESP8266.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.