Need help with sketch?

Hi.

I have written a sketch for a Tipping Rain Bucket, and Arduino UNO, my problem is, i cannot get the LCD to display any info at all. I am using an LCD 20,4 (2004A). I have used Nick Gammons i2c test sketch, and my serial monitor picks it up straight away, and give an address of 0x27. I have obviously overlooked something, but after many hours trying different things, i think i need help, i am still a newbie.

I have uploaded my sketch

// Rain Bucket Sketch.

//Libraries.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4);     // set the LCD address to 0x27 for a 20 chars and 4 line display.


float rainfall = 0;
int rain_sensor = 2;                //set rainsensor to pin 2

void setup() {
  
digitalWrite(rain_sensor, LOW);     //set pin 2 low
pinMode(rain_sensor, INPUT);        //set pin 2 as an input

lcd.begin(20,4);
lcd.setBacklight(HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Todays Rain");
lcd.setCursor(5,1);
lcd.print(rainfall);
lcd.print(" mm");
}

float get_rainfall()
{
 a:  if (digitalRead(rain_sensor) == HIGH)
          {
           return 0.8;
          }     
 delay(200);         
 goto a;      
      
}

void loop() {
  
get_rainfall();
rainfall = rainfall + get_rainfall();
lcd.setCursor(5,1);
lcd.print(rainfall);
lcd.print(" ");

delay (1000);
}

a:Uh-oh.

get_rainfall();
rainfall = rainfall + get_rainfall();

Why do you ignore the first return value?

Does your sketch even display the prints in setup()?
Can you turn the backlight on and off?

gresleyman:
I have used Nick Gammons i2c test sketch, and my serial monitor picks it up straight away, and give an address of 0x27.

I have uploaded my sketch

LiquidCrystal_I2C lcd(0x3f,20,4);     // set the LCD address to 0x3f for a 20 chars and 4 line display.

If the address is 0x27, why are you using the address 0x3F?!?

Sorry about that, i am using address 0x27, the 0x3f refers to another LCD i have tried.

AWOL, what do you mean by OO - OH ?

(deleted)