How to measure led volts whit analogread()

int sensorValue = analogRead(sensorPin);
float sensorVoltage = map(sensorValue, 0, 1023, 0, 2.9);  // Convert to Voltage (assuming analog reference is set to 2.9v)
Serial.print(sensorVoltage);

You didn't show all your code so I'm guessing your mistake is declaring sensorValue as 'int' and then trying to store a 'float' in it.