Modified library of Pixel Array showing main.cpp code implementing buffer/array of pixels method of updating pixel chain.

Dependencies:   BurstSPI

Dependents:   NeoPixel-DemoBuffer Final_project Final_project

Fork of PixelArray by Jacob Bramley

Revision:
6:1d8c73d4c7e6
Parent:
4:c3b314df3dfe
Child:
7:e8b3e643085f
--- a/neopixel.cpp	Mon Sep 08 09:28:08 2014 +0000
+++ b/neopixel.cpp	Tue Mar 10 04:40:06 2015 +0000
@@ -107,7 +107,21 @@
 
 void PixelArray::update(Pixel buffer[], uint32_t length)
 {
+    buffer[0].red = 255;
+    buffer[0].green = 0;
+    buffer[0].blue = 0;
+    buffer[1].red = 255;
+    buffer[1].green = 140;
+    buffer[1].blue = 0;
+    buffer[2].red = 0;
+    buffer[2].green = 255;
+    buffer[2].blue = 0;
+    buffer[3].red = 0;
+    buffer[3].green = 0;
+    buffer[3].blue = 255;
+    
     for (size_t i = 0; i < length; i++) {
+        
         send_pixel(buffer[i]);
     }
 
@@ -120,6 +134,7 @@
         Pixel out;
         generator(&out, i, extra);
         send_pixel(out);
+        
     }
 
     wait_us(latch_time_us_);