You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using setTime causes wiered results on printing time on an arduino nano every.
Output is: System current: 12:12:10 134 13 2021
Day would be 134 and month is 13.
Expected: Day 11 and month 6
Steps To Reproduce Problem
simply set the time using setTime and compare the time set with the time you get from the time functions.
Hardware & Software
Visual Studio Code (newest version) with platform io
Arduino Nano Every
Arduino Sketch
#include<Wire.h>// must be included here so that Arduino library object file references work
#include<RtcDS3231.h>
#include<RotaryEncoder.h>
#include"Arduino.h"
#include"FastLED.h"
#include<TimeLib.h>voidsetup() {
setTime(12, 12, 10, 11, 6, 2021);
Serial.print("System current: ");
// digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print("");
Serial.print(day());
Serial.print("");
Serial.print(month());
Serial.print("");
Serial.print(year());
Serial.println();
}
voidloop() {
}
Errors or Incorrect Output
Output is: System current: 12:12:10 134 13 2021
The text was updated successfully, but these errors were encountered:
Description
using setTime causes wiered results on printing time on an arduino nano every.
Output is:
System current: 12:12:10 134 13 2021
Day would be 134 and month is 13.
Expected: Day 11 and month 6
Steps To Reproduce Problem
simply set the time using setTime and compare the time set with the time you get from the time functions.
Hardware & Software
Visual Studio Code (newest version) with platform io
Arduino Nano Every
Arduino Sketch
Errors or Incorrect Output
Output is:
System current: 12:12:10 134 13 2021
The text was updated successfully, but these errors were encountered: