If I upload from Arduino IDE, everything works fine, if I upload from PlatformIO it just freezes the Arduino. PlatformIO says that an upload was successful, but the Arduino doesn’t reset and pressing reset has no effect, and no changes have been made. This is the only error and I can’t resolve it.
src\main.cpp:10:32: warning: invalid conversion from ‘int’ to ‘PCF8574_address’ [-fpermissive]
LiquidCrystal_I2C lcd(0x27,16,2);// Change to (0x27,16,2) for 16x2 LCD.
^
In file included from src\main.cpp:6:0:
.pio\libdeps\uno\LiquidCrystal_I2C\src/LiquidCrystal_I2C.h:173:4: note: initializing argument 1 of ‘LiquidCrystal_I2C::LiquidCrystal_I2C(PCF8574_address, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, backlightPolarity)’
LiquidCrystal_I2C(PCF8574_address = PCF8574_ADDR_A21_A11_A01, uint8_t P0 = 4, uint8_t P1 = 5, uint8_t P2 = 6, uint8_t P3 = 16, uint8_t P4 = 11, uint8_t P5 = 12, uint8_t P6 = 13, uint8_t P7 = 14, backlightPolarity = POSITIVE);
I’m doing a basic Hello World sketch:
/* I2C LCD with Arduino example code. More info: https://www.makerguides.com */
// Include the libraries:
// LiquidCrystal_I2C.h: https://github.com/johnrickman/LiquidCrystal_I2C
// Library for I2C communication
#include <LiquidCrystal_I2C.h> // Library for LCD
// Wiring: SDA pin is connected to A4 and SCL pin to A5.
// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered)
LiquidCrystal_I2C lcd(0x27,16,2);// Change to (0x27,16,2) for 16x2 LCD.
void setup() {
// Initiate the LCD:
lcd.backlight();
}
void loop() {
// Print 'Hello World!' on the first line of the LCD:
lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
lcd.print("Hello World!");// Print the string "Hello World!"
lcd.setCursor(2, 1);
lcd.print("Testing...");
//lcd.setCursor(2, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
//lcd.print("LCD tutorial");
}