Hi, I'm using a relay to turn off/on my i2c display to save power
I'm using arduino nano, the lcd i2c is connected on A4, A5
in the setup i use this:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//LiquidCrystal_I2C lcd(0x27); // Set the LCD I2C address
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address -> lcd_Addr, EN, RW, RS, D4, D5, D6, D7
#include <LCD.h>
const int lcdon = 12;
void setup() {
digitalWrite(lcdon, HIGH);
delay(300);
lcd.begin(16, 2); // initialize the lcd for 16 chars 2 lines, turn on backlight
lcd.setCursor(1, 0); //Start at character 4 on line 0
lcd.print("Initialisation:");
...
and it works !
then, after power it down using digitalWrite lcdon LOW and after a few sec turning back on using the same code from the setup, the lcd won't initialize itself, is turning on but no text
Beside of that, the arduino is freezing too (no more loops)
Also, if i put my arduino to fully sleep mode (using a lowpower library) when waking up, the LCD is TURNING on with text and no problem..
What can be the problem ?