Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: NeoPixel-DemoBuffer Final_project Final_project
Fork of PixelArray by
Revision 8:df8daeaa3d87, committed 2015-03-10
- Comitter:
- ben_ceron
- Date:
- Tue Mar 10 06:21:35 2015 +0000
- Parent:
- 7:e8b3e643085f
- Commit message:
- Update PixelArray using buffer method.
Changed in this revision
neopixel.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/neopixel.cpp Tue Mar 10 04:46:49 2015 +0000 +++ b/neopixel.cpp Tue Mar 10 06:21:35 2015 +0000 @@ -108,18 +108,7 @@ void PixelArray::update(Pixel buffer[], uint32_t length) { // Manually set the color fields of the four pixels in the pixel buffer. - 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; + // Loop through and send each pixel to the NeoPixel. for (size_t i = 0; i < length; i++) {