# Programming for Arduino Uno

**URL:** <https://forum.arduino.cc/t/programming-for-arduino-uno/1251346>\
**Category:** General Guidance\
**Created:** [April 23, 2024, 8:46pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346 "2024-04-23T20:46:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 23, 2024, 8:46pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/1 "2024-04-23T20:46:46Z")

</div>

I would like to know where/how I could find a way to compile a 'program' to run a W2812 LED light strip?  
all I want to do is have 20 or 30 lights turn on one at a time until all are lit then for all to stay on until turned off. looking for a place where I can practice compiling said program.

---

<div class="post-metadata">

**Author:** ![b707](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/b707/32/854321_2.png) [@b707](https://forum.arduino.cc/u/b707)\
**Post date:** [April 23, 2024, 8:52pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/2 "2024-04-23T20:52:27Z")

</div>

See an examples of any WS2812 library for Arduino - FastLed of Adafruit Neopixel

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 23, 2024, 8:59pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/3 "2024-04-23T20:59:53Z")

</div>

sorry for my ignorance, but where do I find such examples?  
I did a little looking around before posting and didn't find anything that seemed it was about this situation.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [April 23, 2024, 9:00pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/4 "2024-04-23T21:00:07Z")

</div>

> [@quemeese](#):
>
> I would like to know where/how I could find a way to compile a 'program'

The Arduino IDE has an excellent platform in the IDE.  
The Arduino example code folder contains lots of useful stuff to use in the beginning.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [April 23, 2024, 9:02pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/5 "2024-04-23T21:02:14Z")

</div>

> [@quemeese](#):
>
> didn't find anything that seemed it was about this situation.

You're not the first member making the mistake thinking there's a ready to use code that fits Your needs.  
You need to get the hands dirty, making code, or code adjustments.

---

<div class="post-metadata">

**Author:** ![b707](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/b707/32/854321_2.png) [@b707](https://forum.arduino.cc/u/b707)\
**Post date:** [April 23, 2024, 9:03pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/6 "2024-04-23T21:03:59Z")

</div>

> [@quemeese](#):
>
> sorry for my ignorance, but where do I find such examples?

Fastled library examples  
[https://fastled.io/docs/examples.html](https://fastled.io/docs/examples.html)

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 23, 2024, 10:12pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/7 "2024-04-23T22:12:42Z")

</div>

maybe I am just too dense for Arduino.  
I have looked through many of the libraries and find nothing that seems to represent what I am looking to do. perhaps it is because I don't know what to call the program I am looking for, I don't know.  
I actually feel quite stupid right now.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 23, 2024, 10:28pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/9 "2024-04-23T22:28:33Z")

</div>

but where do I learn to read and write code.  
I have found how to turn on one LED, but that code then turns it off.  
I need to then turn on the next LED.  
haven't been able to find that

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [April 24, 2024, 7:20am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/11 "2024-04-24T07:20:11Z")

</div>

Install the FastLED library; it comes with the FirstLight example that gets close to what you want (it is a walking light). Study the example till you understand it; once you understand it you can modify it to suite your needs.

Don't feel bad if you don't understand something and have to ask about it. It will either be explained or you will be pointed to some resources to do some studying.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [April 25, 2024, 12:56am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/12 "2024-04-25T00:56:13Z")

</div>

> [@quemeese](#):
>
> on until turned off.

You will need to decide how "on" happens and how "off" happens.

Practice web site...

> **[WS2812minimum - Wokwi ESP32, STM32, Arduino Simulator](https://wokwi.com/projects/387843194733821953)**
>
> Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 25, 2024, 1:40am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/13 "2024-04-25T01:40:13Z")

</div>

there will be a simple on/off push button

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [April 25, 2024, 1:51am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/14 "2024-04-25T01:51:55Z")

</div>

> [@quemeese](#):
>
> simple on/off push button

Do tell... this could be many things. You need to decide how "on" happens and how "off" happens.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 25, 2024, 2:10am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/15 "2024-04-25T02:10:55Z")

</div>

but it is a 'simple on/off switch'  
said switch controls power to the circuit.  
what are you looking for?

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [April 25, 2024, 2:22am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/16 "2024-04-25T02:22:41Z")

</div>

> [@quemeese](#):
>
> what are you looking for?

This.

> [@quemeese](#):
>
> switch controls power to the circuit.

Why not just pull the plug?

Your "simple" means a handful of possibilities to me.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [April 25, 2024, 3:04am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/17 "2024-04-25T03:04:01Z")

</div>

the LED's will be down the blade of a sword with a switch in the handle.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [May 1, 2024, 8:59pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/18 "2024-05-01T20:59:56Z")

</div>

this is something I put together in Word (until I can get my laptop in a place where I can hook up my Arduino)  
does it look like it would work?  
my LED strip would be a SK6812 RGBW.

```arduino
#define PIN SK6812 2

#define NUM_PIXELS 30

#define DELAY_INTERVAL 500

void setup()

SK6812.begin();

void loop()

for (int pixel = 0; pixel < NUM_PIXELS; pixel++)

SK6812.setPixelColor(pixel, SK6812.Color(255,255,255))

SK6812.setBrightness(255)

delay (DELAY_INTERVAL)

```

thank you  
PS I don't know why the 'program/code' is double spaced.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [May 1, 2024, 9:58pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/20 "2024-05-01T21:58:31Z")

</div>

sorry for my ignorance, but I haven't been able to figure out how to do that, hence the reason for the Word document.  
I copied this from what I thought was code from Arduino IDE for WS2812 and made changes for the WK6812 that I have.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [May 1, 2024, 10:42pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/22 "2024-05-01T22:42:56Z")

</div>

You open the Arduino IDE, type in your code  
but where do I get the code to type in.  
I thought that's what I was doing when I compiled the Word doc.  
I have several pages of saved stuff that I was thinking was different parts of code, but I can't decide what would be the code I would need to do what I want.  
as a side note, I tried a while back to set up a random matrix of LED's with Arduino but also couldn't figure that out. I ended up using 4 different flasher circuits and placed the LED's in a matrix so that those from each flasher circuit weren't next to each other. made a pretty good random matrix (I thought anyway)

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [May 1, 2024, 10:45pm UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/23 "2024-05-01T22:45:28Z")

</div>

also, I have tried to compile some code in Arduino IDE and when I 'verify' it, it won't do anything because I don't have a qualified board connected.

---

<div class="post-metadata">

**Author:** ![quemeese](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/quemeese/32/629195_2.png) [@quemeese](https://forum.arduino.cc/u/quemeese)\
**Post date:** [May 2, 2024, 12:52am UTC](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346/26 "2024-05-02T00:52:43Z")

</div>

what does it mean when I get an error message that says 'Compilation error: exit status 1'?

[Next page](https://forum.arduino.cc/t/programming-for-arduino-uno/1251346.md?page=2)
