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!



Using Arduino sketc...
 
Share:
Notifications
Clear all

[Solved] Using Arduino sketch for random & sequential pattern.

1 Posts
1 Users
0 Likes
972 Views
(@chuck65)
New Member
Joined: 8 years ago
Posts: 1
Topic starter  

Hans,

Fantastic site!   I just got a Arduino Uno starter kit from Amazon
and a string of WS2801 lights that arrived over the weekend.

I’m 50 years old and new
to all of this,  so I am in the process of learning.  I've been reading a lot of forums and looking at lots of basic sketches,  so once I dive into this I think I can learn the basics.  I really don't have any experience in programming,  except for what I learned and forgot in college  (Basic).   I do have a website I run where I had to download a shopping cart program and integrate it into my website.  Took a while, but I figured out how to change code and adjust it to suit my needs,  so I hopefully will eventually get the hang of the codes used here.   I also have some experience in soldering,  so that won't be an issue for me either.

I have been asked by a holistic friend of mine to help her create a box for her holistic office.   The box is going to be about 2 1/2 feet long (.762 meters) and will have 7 holes in it,  evenly spaced out.   In each hole she wants to place 1 LED light for a total of 7 lights.  Each LED light is to have its own constant color,  according to the 7 Chakras (energy centers) of the human body.    So LED #1 will always be Red,  #2 - Orange, #3-Yellow, #4-Green, #5-Blue, #6-Indigo and #7-violet.

So I will need a sketch that first assigns these colors,  but will all start in the off position.

When the Arduino is turned on,  she would like the 7 LED's to light up,  one at a time (1-2 seconds) in a random effect for about 10 minutes.  So when one led is on,  the others are all off. 

Then after 10 minutes,  the strip will then need to run in a continuous, simple sequence where LED #1 will light up for a second, with all others off.  Then move to LED #2 turning on,  all others off.  Then the same for LEDs 3-7 and then will start over again at #1.   This will continue until the Arduino is unplugged.    Since I am only going to be using 7 LEDs from a WS2801 strip and only 1 LED will be on at any one time,  I figure the Arduino should be more than capable of powering the strip without any difficulty from what I have read. 

I originally thought I had ordered a WS2812 strip,  but made a mistake.   If the WS2801 is not a good option for this project,  I'll get a WS2812 strip or at least the individual LED's and then solder them together.   I know for the WS2801 strip I'll have to cut the LEDs into their individual segments and solder them together so they fit across the 2 1/2 foot (.762M) evenly,  so I don't have any issues with that.  I just have to remember to follow the arrow and make sure the path is correct.

I’ll be reading more of your posts,  but any advice on how to proceed would be greatly appreciated!   I'll also be sure to order from Amazon using your link in the future!  :-)


   
ReplyQuote
Share: