Upload files to 'LED-prototype'
This commit is contained in:
		
							
								
								
									
										21
									
								
								LED-prototype/ColorPalette.ino
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								LED-prototype/ColorPalette.ino
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					#include <FastLED.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define LED_PIN     7
 | 
				
			||||||
 | 
					#define NUM_LEDS    64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CRGB leds[NUM_LEDS];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void setup() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void loop() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (int i = 0; i <= 64; i++) {
 | 
				
			||||||
 | 
					    leds[i] = CRGB ( 0, 0, 255);
 | 
				
			||||||
 | 
					    FastLED.show();
 | 
				
			||||||
 | 
					    delay(40);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user