Error compiling with CAYENNE_IN(1)

Hello. Please help me.
I insert in my sketch file
CAYENNE_IN(1)
{
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”);
}
and have compiling error

MyWeatherStation-PxMatrix-Cayenne:149:20: error: variable or field ‘InputHandler1’ declared void

MyWeatherStation-PxMatrix-Cayenne:149:20: error: ‘Request’ was not declared in this scope

MyWeatherStation-PxMatrix-Cayenne:149:29: error: ‘request’ was not declared in this scope

MyWeatherStation-PxMatrix-Cayenne:149:38: error: ‘CayenneMessage’ was not declared in this scope

MyWeatherStation-PxMatrix-Cayenne:149:54: error: ‘getValue’ was not declared in this scope

if i compiling sample file esp32, this compiling with out error

you can replace it with:

CAYENNE_IN(1)
{
  int currentValue = getValue.asInt();
}

if you want to read the value on the channel 1

the same error (

can you share the entire code.

MyWeatherStation-PxMatrix-Cayenne.txt (25.6 KB) utf8rus.txt (742 Bytes)
This is my sketch

Sorry.I do not understand. But i copy past my sketch in new by block. And now compilling with out error.
Thanks all.

2 Likes

glad to hear it is working now.