Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



In need of assistan...
 
Share:
Notifications
Clear all

[Solved] In need of assistance with a sketch -Addressable LED

18 Posts
3 Users
0 Likes
8,359 Views
 Hans
(@hans)
Noble Member Admin
Joined: 11 years ago
Posts: 1065
 

I see what happened. In my code it is always define NUM_LEDS, but in you code it is called "numLEDs".

So you'll need this:

  // set hour, min & sec LEDs
unsigned char hourPos = ((now.hour() % 12) * 5 + (now.minute() + 6) / 12);
leds[numLEDs - ( (hourPos + LEDOffset + 59) % 60 )].r = 10;
leds[numLEDs - ( (hourPos + LEDOffset) % 60 )].r = 20;
leds[numLEDs - ( (hourPos + LEDOffset + 1) % 60 )].r = 10;
leds[numLEDs - ( (now.minute() + LEDOffset) % 60 )].g = 20;
leds[numLEDs - ( (now.second() + LEDOffset) % 60 )].b = 20;

   
ReplyQuote
(@ppgflyer68)
Active Member
Joined: 4 years ago
Posts: 6
 

Hans, YOU ROCK!!!!!!!!!!!!!!!!!!!  that worked and now it runs "CLOCKWISE"... thank you SOOOOOO much.


   
ReplyQuote
 Hans
(@hans)
Noble Member Admin
Joined: 11 years ago
Posts: 1065
 

Awesome - glad I could help! 👍 

Since you had mentioned not being too familiar with the use of forums 😉 ...
(not a problem, we all had learn these steps at some point)

  1. It is always good to start a new topic for your particular question.
    The only time one would get involved in other conversations is when you're talking about exactly the same thing.
    The reason to start a new topic is that this way only those that are interested will receive a notification, and the topics in the forum stay relatively "on topic", making it easier for others to find a solution to their (similar) problems.
  2. If you start asking your question in thread that is not exactly dealing with your problem, then this can be referred to as "Thread Hijacking", and most users will not appreciate that.
  3. You do not need to place additional comments with the initial article (not in the forum).
    I happen to see both, since I'm the admin, so I will get notifications.
    Users that read the comments however, will not always understand your responses since they miss the forum context.

I did see you had a follow up questions, so maybe this is a good exercise to start a new topic 😊  


   
ReplyQuote
Page 2 / 2
Share: