Need some help

Wrote some code to get started on a project and in the beginning stages.

running I2C to an lcd.

right now, i’m simply trying to increment a variable and print variable every time the LED lights up.

The problem is, instead of getting the number on my lcd screen every time it’s incremented, i’m getting this weird output.

It’s incrementing and adding but no numbers, it’s giving me “||” in each cell until the lcd is full instead of the aforementioned numbers.

Here is my code:

// Blinking LED
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);

int i = 0;
while(LED == HIGH)
{
i++;
}
Wire.beginTransmission(0x28);
Wire.write(i);
Wire.endTransmission();
delay(5);

}

First, your code is incomplete and cannot be compiled by the rest of us. Second, you need to read the two posts at the top of this Forum. They will tell you the proper way to post your code. This will make it easier for us to help you.

@econojack, You are too kind...

click the MODIFY button in the upper right of the post window. Highlight all you code. click the "#" CODE TAGS button on the toolbar above just to the left of the QUOTE button. click SAVE (at the bottom). When you post code on the forum, please make a habit of using the code tags "#" button.