Sending photoresistor value to cayenne with esp32

Hello I am looking for some help I can not get a photoresistor values to show up on cayenne using a esp32. Here is the code I’m using:

#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#define EspSerial Serial
#include <CayenneMQTTESP32.h>
#include <WiFi.h>
#include <ESP32Servo.h>
#include <analogWrite.h>

const char* ssid = “SLCPublic”;
const char* password = “”;

char ssidc = “SLCPulbic”;
char passwordc = “”;

char username = “9f2655e0-530e-11ec-bbfc-979c23804144”;
char wifipassword = “1d8266a0170ad3cc2bb68c6b63a8f28a97e90eea”;
char clientID = “06445880-530f-11ec-bbfc-979c23804144”;

int SENSORPIN = 34;
int sensorValue;
Servo servo1;#define SENSOR_PIN (39)
#define VIRTUAL_CHANNEL 3

void setup()
{
// put your setup code here, to run once:
Serial.begin(115200);
servo1.attach(16);
Cayenne.begin(username, wifipassword, clientID, ssidc, passwordc);

}
void loop(){ {
// put your main code here, to run repeatedly:

Cayenne.loop();

}

sensorValue = analogRead(SENSORPIN);
sensorValue = map(sensorValue, 0, 4095, 0, 180);
servo1.write(sensorValue);

CAYENNE_OUT(VIRTUAL_CHANNEL);

Cayenne.virtualWrite(3, currentResistance);
}

where you are getting the value from?

I am trying to get a value through a value widget on cayenne but it will not display through the widget but i can get a value through the serial monitor

sorry, i dint understand it. can you share the code which has serial outputs?

#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <CayenneMQTTEthernet.h>

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “9f2655e0-530e-11ec-bbfc-979c23804144”;
char password = “1d8266a0170ad3cc2bb68c6b63a8f28a97e90eea”;
char clientID = “06445880-530f-11ec-bbfc-979c23804144”;

#define SENSOR_PIN 0
#define VIRTUAL_CHANNEL 1

void setup()
{
Serial.begin(9600);

}

void loop(){

int value = analogRead(2);
Serial.println("Analog value : ");
Serial.println(value);
delay(250);
}

To the send the data to cayenne:-

CAYENNE_OUT(3);
int value = analogRead(2);
Serial.println("Analog value : ");
Serial.println(value);
Cayenne.virtualWrite(3, value);
}