LED strip

Hi, I'm very new to this computer science field itself.

I'm doing a project that is related to the LED strip of which I'm using LED strip to display the time that is to be retrieved from mobile through mobile application.

The problem I'm facing is at assigning arrayed variables to each LEDs. I've seen several simple LEDs example but all of those are connecting only few LEDs and each are connected to different pins. Is there a way to assign each LEDs into an arrayed variable?

#define numLEDs 60

int greenPin = 9;
int redPin = 10;
int bluePin = 11;

unsigned int leds[numLEDs];

void setup()
{

}

Hi, when you say led strip, do you mean adressable led strip like ws2812 (neopixel)?

If so, you will be using a library, either FastLed or Neopixel library. These libraries allow you to set an led by its position number. Inside the library, the colour of each led is held in an array, so you probably will not need to make an array for this in your own sketch.

Adressable led strips connect to a single pin on the Arduino. Your example sketch above indicates that you expect 3 pins to be required for r, g & b. The types of led strips that need 3 pins are not adressable, which means all leds show the same colour.

Perhaps the problem is that you have not explained how your led strip will display the time. Will you use a matrix or 7-segment design? A diagram would help.

Paul

I'm sorry. It's a LED strip with 4 pins (with RGB and 1 more white wire which I'm not familiar of what it is) so I define only 3 pins on the coding. [EDIT] I changed the coding a little bit

#define bluePin 9
#define redPin 10
#define greenPin 11
#define pin 12

The white wire is the common wire. Generally with rgb strips it is a common anode which you will need to connect to 12V. The other wires will be cathodes and you will need some transistors to connect them to. Do not attempt to connect them directly to your Arduino, that would damage it.

Before you can learn more about "computer science", you will need to learn another skill. This skill is to answer questions when you are asked. If you cannot do that, you will not get help from people who offer to help you.

Thanks. Anyhow, is there a way to assign each LEDs to an arrayed variable? I've the basics of C++, Java (including Android) programming but never been to physical especially when it comes to electronics. Still, I really hope that there will be an answer for it. Any help would be greatly appreciated

NewbieJoe: Thanks. Anyhow, is there a way to assign each LEDs to an arrayed variable? I've the basics of C++, Java (including Android) programming but never been to physical especially when it comes to electronics. Still, I really hope that there will be an answer for it. Any help would be greatly appreciated

So you refuse to answer questions?

Do you enjoy avoiding answering questions? If so, i recommend a career in politics, not science.

I will now prove that i am not a politician by answering your question. No, you cannot assign the leds in your strip to an array. It is not an adressable strip.

._. I don't get what you mean avoiding answering questions. lol..

oh perhaps I missed this part:

Perhaps the problem is that you have not explained how your led strip will display the time. Will you use a matrix or 7-segment design? A diagram would help.

I'm really sorry. Please do forgive me. Is a wall clock of which I attach the LED in a circular board at the side. A wall clock. Anyhow, it was inspired from YouTube site "Infinity LED Clock". The LED lights up indicating second, another for minute and so for hour. Instead of 3 LEDs lights up for each (as shown in the diagram), I wanted to use only 1 LED for each of the variables (referring to second, minute, and hour).

And thanks for the precaution, I did try that before ._. Hopefully it doesn't harm the Intel Galileo Gen 2 board or the LED strip

Finally the answer to the riddles!

I am working on a similar clock. My clock is a mirror but not an infinity mirror. The leds will shine outwards onto the wall to indicate the time.

https://youtu.be/47fWT0pi07U

https://youtu.be/6POos8qhPb8

As i said, you have the wrong type of rgb strip for this. With the strip you have, all leds will be the same colour. It is not adressable, you can't control the leds individually.

For your project you need a ws2812 led strip.

Thanks a lot, man! :) :) Btw, your LED clock is awesome!