1. Home /
  2. Education /
  3. Decorative LED Light

Category



General Information

Locality: Rensselaer, New York



Address: Third st 12144 Rensselaer, NY, US

Likes: 10985

Reviews

Add review



Facebook Blog

Decorative LED Light 25.03.2021

Simple Arduino programming code to make 150 led light set. You will need Arduino Nano controller. /*************************************************************...*********************************** * This program control 150 LED light. All rows are + and all columns are - . * 6 set columns (5 columns each) are connected as one. * Program control 5 rwos and 6 sets of columns(5 columns each). * Program version 150.5.5 * created on January 2017. * Created by Myint Lwin **************************************************************************************************/ //setup row pin numbers(long pin from LED +) int rows = 5; int row[] = {2,3,4,5,6}; //setup col pin number(Short pin from LED -) int cols = 5; int col[] = {A0,A1,A2,A3,A4}; int delayTime = 50; // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin for row as an output. for(int i=0; i(rows-1)) digitalWrite(row[r-rows], HIGH); else if(r<0) digitalWrite(row[r+rows] , HIGH); else digitalWrite(row[r], HIGH); } void rowOff(int r) { if(r>(rows-1)) digitalWrite(row[r-rows], LOW); else if(r<0) digitalWrite(row[r+rows] , LOW); else digitalWrite(row[r], LOW); } void colOn(int c){ if(c>(cols-1)) digitalWrite(col[c-cols], LOW); else if(c<0) digitalWrite(col[c+cols] , LOW); else digitalWrite(col[c], LOW); } void colOff(int c){ if(c>(cols-1)) digitalWrite(col[c-cols], HIGH); else if(c<0) digitalWrite(col[c+cols] , HIGH); else digitalWrite(col[c], HIGH); } void allRowOn() { // Set all row HIGH(Turn all rows ON) for(int k=0; k-1; i--) { f2b(i, s); } } } void f3b(int i, int k, int s) { for(int j=0; j < s; j++) { allColOn(); rowOn(k); rowOn(k+1); rowOn(k+4); delay(1); off(); allColOn(); delay(1); off(); rowOn(k+2); rowOn(k+3); colOn(i); delay(1); off(); } } void f3(int n, int s) { for(int count=0; count < n; count++) { for(int k=0; k-1; i--) { f3b(i,s,0); } } } void f4b(int i, int k, int s) { for(int j=0; j-1; i--) { f4b(i,k,s); } } } void f5b(int i, int k, int s) { for(int j=0; j-1; i--) { f5b(i,k,s); } } } void f6(int n) { allRowOff(); allColOn(); for(int count=0; count < n; count++) { for(int k=0; k < rows; k++) { rowOn(k); delay(delayTime-50); allRowOff(); } } }

Decorative LED Light 08.03.2021

7 Inches 100 LEDs Light Set