Hi there, I need some help with some code for a project.. I have a display built into an old meter, made up of 7 RGBIC Cob LED segments (12v) ( https://www.amazon.co.uk/gp/product/B0BTBZPVWN/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&th=1 ).
The meter has 2 100 Ohm Pots already in it which I would like to utilize.
I would like some code that allows a bounce sequence accross the segments 1>7>1, with the brightness controlled by 1 pot, and the colour controlled by the other.
I'm using an arduino NANO
If at all possible, it would be nice to have a selection of patterns or speeds, that could be stepped through using a simple push to close button.
I have tried to decipher the code I need, but I think my ADHD is showing I have a bunch of ideas to utilize arduino and WS2812 Leds in my projects, but I cannot get me head around the code.
Manyy thanks
I'm not sure if I understand. Do you want to treat the light strip that you linked as if it was a WS2812 strip? Or do you want to replace the strip by WS2812 leds?
In your link I could not find if the strip acts like addressable leds. If you have that full strip setup with the controller, can you switch a single LED on the strip on and off or change the color of individual LEDs without affecting others?
I've moved your topic to a more suitable location on the forum.
So that means you have the code you need, but you don't understand it? Post it here and tell the forum what parts you are finding difficult to get your head around.
Also tell the forum what type of Nano you have, because there are many types of Arduino Nano these days, with different capabilities and features.
Please read the forum guide before you post the code.
Hi all, Sorry I don't have a code written, I have just been trying to decipher some of the you tube videos to try and find sometghing I could adapt or will suit.
The Strip is adressable LED, basically each 25mm section is treated as one pixel,
If you use the FastLED library, it can't get much easier than FastLED's Blink example and FastLED's FirstLight example if you want to understand out how it works
Create a FastLED variable (object).
In setup(), specify which LED type you're using and the pin.
In loop(), apply the pattern that you want.
Play around using different colours and find out that colours might be swapped; e.g. when setting a LED to red it turns green and vice versa. If so, adjust the line in setup() to reflect the correct order.
It's often referred to as sweep.
The FirstLight example will show you a light that goes from one side to the other pixel by pixel.
To understand how you can go back from the 'other' side to the 'one' side, you can [u]study[u] e.g. the IDE's servo sweep example (not part of FastLED). You can also search the web for 'Knightrider' examples which provides similar functionality (moving left to right to left).
If you have split your strip in N segments of 7 LEDs and want to change the 7 LEDs of a segment at the same time (it's not 100% clear to me if that is the case), you can change 7 LEDs at the same time using e.g. a double for-loop.
Study the 01.Basics → AnalogReadSerial example to understand how to read the potentiometers. Next think how you can apply it to your sweep functionality and implement it.
I suggest that you start coding; if you get stuck, show your code (don't forget to use so-called code tags as described in How to get the best out of this forum), explain what that code should do and what it actually does. We will try to help you with the problem.