O.K., I know that answer is technically correct but doesn't help you.
Depending on how the code for outputting the result is structured, it may be as simple as replacing the calls to the serial output routine by calls to an equivalent LCD routine (there should be a library for this type of LCD).
You probably will have to take care for the positioning of the write cursor (the location where the text is displayed) as this would not be handled by the serial routines.
// Initialize Pins
int analogPin = 0;
int chargePin = 13;
int dischargePin = 11; //speeds up discharging process, not necessary though
// Initialize Resistor
int resistorValue = 10000;
// Initialize Timer
unsigned long startTime;
unsigned long elapsedTime;
// Initialize Capacitance Variables
Serial.begin(9600); // Necessary to print data to serial monitor over USB
digitalWrite(chargePin, HIGH); // Begins charging the capacitor
startTime = millis(); // Begins the timer
while(analogRead(analogPin) < 648)
// Does nothing until capacitor reaches 63.2% of total voltage
elapsedTime= millis() - startTime; // Determines how much time it took to charge capacitor
microFarads = ((float)elapsedTime / resistorValue) * 1000;
Serial.print(" mS ");
if (microFarads > 1) // Determines if units should be micro or nano and prints accordingly
nanoFarads = microFarads * 1000.0;
digitalWrite(chargePin, LOW); // Stops charging capacitor
digitalWrite(dischargePin, LOW); // Allows capacitor to discharge
while(analogRead(analogPin) > 0)
// Do nothing until capacitor is discharged
pinMode(dischargePin, INPUT); // Prevents capacitor from discharging
I have both I2C and serial versions of the LCD1602. I prefer to use the I2C but serial will be ok too. However, my goal is to use a Pro Mini or Pro Micro for this project as I want to place this into an enclosure.
as I suspected the code plainly sends the results via serial.print to the serial port without any formatting.
What you need is a library for controlling this kind of LCD. I'm sure you can find one on the internet (e.g. here or here - the latter one is in German but Google translate can help you. Or look for another source in English). Otherwise you'd have to do the coding completely from scratch which will take a bit more time and a deeper understanding of the LCD.
You will also have to take care of the correct connection of the LCD to the arduino and you may have to set some defines in the code accordingly (both are explained in the German link).
What you have to do is replace the serial.print statements by calls to the LCD library telling the LCD to display the data. As data to an LCD is typically written at the position of a cursor, you will have to place the cursor to the start of the LCD's screen before outputting new data (over a serial connection the receiving program or terminal emulator will do this for you, here you'll have to do it yourself).