leonvandenbeukel / Round-LED-Clock

Wi-Fi connected round LED Clock
Apache License 2.0
134 stars 64 forks source link

Hour LED moving between hours #7

Closed tomtaa closed 5 years ago

tomtaa commented 5 years ago

Great work, but one issue: At a normal analog clock the hour hand moves always. e.g. at 9:30 the big hand is between 9 and 10. At your device it stays on the 9. Special at e.g. 9:55 your hour hand stays at 9; at the analog clock it stays directly before 10.

It's a little bit unusual.

Mahekrana commented 5 years ago

can you share videoof program uploadin eps8266 board

tomtaa commented 5 years ago

LED Clock

I show here a sketch about that, what I mean. It's no technical problem with the clock; it's only a different to a normal analog clock. Maybe it's also a pull request and no issue.

arne4 commented 5 years ago

Hi, as I understood the hour LED is not moving within the 5 possible positions during the course of the 60 min. You would expect, that every ~15 min the hour LED moves towards the next Hour; the current sketch does not provide this functionality. The hour LED stays on the same spot for 1 hour and then moves 5 positions further.

Maybe someone can update the sketch with the following functionality: 1) introduce an hour_offset value 2) if (minute>=10) hour_offset=(minute / 10)-1; else hour_offset=0; 3) hour_offset should move the hour LED acc to the value in hour_offset.

I am currently trying to update the sketch, but unfortunately (until now) I am not successfull ;)

tomtaa commented 5 years ago

So, I play a little bit

and add one value and one additional row.

it seems to work, but I don't know if it works in all cases. Maybe someone has the profi solution. row 112 ff

for (int i=0; i<NUM_LEDS; i++) LEDs[i] = CRGB::Black; LEDs[getLEDMinuteOrSecond(currentDateTime.second)] = colorSecond; int stunde = (getLEDHour(currentDateTime.hour) + (currentDateTime.minute / 12)); //to move the Big Hand every 12 minutes LEDs[stunde] = colorHour; //to move the Big Hand every 12 minutes //LEDs[getLEDHour(currentDateTime.hour)] = colorHour; //Original LEDs[getLEDMinuteOrSecond(currentDateTime.minute)] = colorMinute; FastLED.show();

arne4 commented 5 years ago

Hi there,

tried to get it running, but with no luck :( I have two Hour spots now... (tried to incrporate your into the existing code...)

Thank you, Arne

leonvandenbeukel commented 5 years ago

Thanks for the suggestion and ideas! I've modified the code, you can use USE_LED_MOVE_BETWEEN_HOURS to enable this option.