Cayenne_in error

Hello. My problem is that i can’t get a value from the slider in my program. I’m using arnuino uno and ethernet shield W5100.


image

try with this code:

CAYENNE_IN(2)
{
  int x = getValue.asInt();
   analogWrite(ACTUATOR_PIN, x);
  Serial.println(x);
}

Add a slider from Add new > device/widget > Actuator > Generic > PWM fill all the details and select channel 2.