declare a variable as a analog input
*you may need to import ioio.api.Analoglnput
private DigitalOutput led_;
private AnalogInput waterLevelSensor_;
waterLevelSensor_ = ioio.openAnalogInput(33);
read the pin and write it to the screen
Use a Try/Catch statement
try
{
}
catch
waterLevelSensor_.getVoltage();
textOnScreen_.setText("" + waterLevelSensor_ + " " + units);
catch (InterruptedException e1)
e1.printStackTrace();