Hello
I am using an IC2 LCD 16 x 2 module with a Arduino Uno R4 and have followed this guide here I2C Liquid Crystal Displays | Arduino Project Hub in order to try displaying simple text.
When I run my code this error message appears:
..\Documents\Arduino\libraries\Wire\utility\twi.c:25:10: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
I am using the LiquidCrystal_I2C library by Frank de Brabander. Can anyone point me in the right direction of a I2C library that is compatible with the uno r4 or any way to change my code to work without an avr processor.
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
//initialize the liquid crystal library
//the first parameter is the I2C address
//the second parameter is how many rows are on your screen
//the third parameter is how many columns are on your screen
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
//initialize lcd screen
lcd.init();
// turn on the backlight
lcd.backlight();
}
void loop() {
//wait for a second
delay(1000)
// tell the screen to write on the top row
lcd.setCursor(0,0);
// tell the screen to write “hello, from” on the top row
lcd.print(“Hello, From”);
// tell the screen to write on the bottom row
lcd.setCursor(0,1);
// tell the screen to write “Arduino_uno_guy” on the bottom row
// you can change whats in the quotes to be what you want it to be!
lcd.print(“Arduino_uno_guy”);
}
Apologies if anything I have said is stupid as I am quite new to coding.
Thank you for your help.