I have an Arduino Nano clone board and I have a program that I uploaded and used yesterday, the program itself has been uploaded to this board numerous times yesterday and worked every single time and had no issues at all.
I tried uploading the program again as the Lcd output wasn't showing anything once I powered it up as it should, and nothing is output to the serial monitor, I've uploaded other programs, such as the BMP180 test program and it worked perfectly with. However when I try to upload this specific program it doesn't work, the board is picked up by the serial port and I get no compiling errors or board errors when uploading, so it lets me upload the code but it does nothing.
Nothing is wired up extra or shorted, I even removed everything just to try and print to the serial port and even that gave me nothing.
I have the correct serial port selected, board and boot loader, everything fine and works with other programs, just seems to be this file which was working yesterday.
Here's my code if its the root of the problem
<#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_BMP085.h>
#include <DS3231.h>
Adafruit_BMP085 bmp;
DS3231 clock;
RTCDateTime dt;
String Min ;
String Sec ;
String Zero = "0";
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
Serial.begin(9600);
clock.begin();
lcd.begin();
Serial.println("Starting");
lcd.backlight();
lcd.clear();
lcd.setCursor(0,0);
if (!bmp.begin()) {
Serial.println("Could not find a valid BMP085 sensor, check wiring!");
//while (1) {}
}
}
void loop() {
dt = clock.getDateTime();
Min = String(dt.minute);
Sec = String(dt.second);
Serial.print("Temperature = ");
Serial.print(bmp.readTemperature());
Serial.println(" *C");
if ((dt.minute < 10) && (dt.second < 10)){
Min = Zero + Min;
Sec = Zero + Sec;
}else if ((dt.minute < 10) && (dt.second >= 10)){
Min = Zero + Min;
}else if ((dt.minute >= 10) && (dt.second < 10)){
Sec = Zero + Sec;
}
Serial.print(dt.year); Serial.print("-");
Serial.print(dt.month); Serial.print("-");
Serial.print(dt.day); Serial.print(" ");
Serial.print(dt.hour); Serial.print(":");
Serial.print(Min); Serial.print(":");
Serial.print(Sec); Serial.println("");
lcd.clear();
lcd.setCursor(0,0);
lcd.print(bmp.readTemperature(),1);
lcd.print(" *C");
lcd.setCursor(0,1);
lcd.print(dt.day);
lcd.print("-");
lcd.print(dt.month);
lcd.print(" ");
lcd.print(dt.hour);
lcd.print(":");
lcd.print(Min);
lcd.print(":");
lcd.print(Sec);
delay(999);
}
Again I had no issues at all yesterday, just today any help would be appreciated