write value to port screen but i can’t send cayenne value
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>
#include <Mhz16.h>
char ssid = “TTNET_ZyXEL_49V9”;
char wifiPassword = “0426d59274fDD”;
char username = “b2da45c0-cd01-11e7-b67f-67bba95345316”;
char password = “c0de33728a812a8d6b06739444881c148d74838b”;
char clientID = “5491b450-b2f8-11ea-883c-638d8ce4c23d”;
Mhz16 mhz16(D1, D2);
unsigned long lastMillis = 0;
void setup() {
mhz16.begin(9600);
Serial.begin(9600);
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}
void loop() {
Cayenne.loop();
int co2text = mhz16.readGasConcentration();
Serial.println(co2text);
delay(1000);
}
CAYENNE_OUT_DEFAULT()
{
Cayenne.virtualWrite(1, co2text,);
}
CAYENNE_IN_DEFAULT()
{
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError(“Error message”);
}