nano won't display LCDs.

Tried moving working Uno sketches to Nano and can’t get lcd displays to work with Nano

IDE: 1.8.13
Processor: AtMega 328 (Old Bootlegger)
Programmer: AVRISP Markl
Port: Both CH340 & Com
NANO: HILetgo Using Atmel Atmega328P-AU MCU

LCD and LCDI2C displays don’t work even though sketches work if sensors directed to serial port. Displays worked on UNO.

For Nano I tried changing lcd variable to 03f etc. With 4 wires w/l2C not much confusion but rearranged various options.

The AVRISP occurred because I was playing option roulette trying to get Nano to work. The ‘old bootleggar’ for the same reason.

#include <LiquidCrystal_I2C.h>
#include <DallasTemperature.h>
#include <OneWire.h>

float myTemp;
float myHiTemp;
float myLowTemp;

#define One_Wire_Bus 4
OneWire oneWire(One_Wire_Bus);
DallasTemperature sensors(&oneWire);

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()

void loop()
  float currentTemp0;
  currentTemp0 = sensors.getTempCByIndex(0);
  float currentTemp1;
  currentTemp1 = sensors.getTempCByIndex(1);

  Serial.print("Temp0 = ");
  Serial.print(currentTemp0, 2);
  lcd.print("Low Temp = ");

  Serial.print("\Temp1 = ");
  Serial.println(currentTemp1, 2);

  Serial.print("\Temp2 = ");
  Serial.println(currentTemp1, 2);

  delay (1000);



Uno and Nano use the same processor so the code should be the same. My guess is that there is a wiring problem. So, yeah, what Perry said.

Programmer: AVRISP Markl

I will give you a medal if you have the original RS232 AVRISP Programmer.

This topic was automatically closed after 120 days. New replies are no longer allowed.