float voltage = (sensorVal/1024) * 5.0;
The quoted line is not correct semantically --
If 1024 steps produce 5.0V, then 'sensorVal' step(s) should give : (5.0/1024)*sensorVal volt
//(testing)connect 3.3V of UNO with A0-pin
int sensorVall = analogRead(A0);
float voltage = (5.0/1024)*sensorVal;
Serial.println(voltage, 2); // prints: 3.23; no need to cast (float) as one factor (5.0) is already float