Tomás Vega / Adafruit_NeoPixel Featured

Dependents:   idd_hw3 idd_fa15_hw3_lauren_bill_tomas idd_fa15_hw3_lauren_bill_tomas Raiden ... more

Fork of PololuLedStrip by David Grayson

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LedStripGradient.cpp Source File

LedStripGradient.cpp

00001 //#include "mbed.h"
00002 //#include "PololuLedStrip.h"
00003 //
00004 //PololuLedStrip ledStrip(PTC8);
00005 //
00006 //#define LED_COUNT 60
00007 //rgb_color colors[LED_COUNT];
00008 //
00009 //Timer timer;
00010 //
00011 //int main()
00012 //{
00013 //    timer.start();
00014 //
00015 //    while(1)
00016 //    {
00017 //        // Update the colors array.
00018 //        uint8_t time = timer.read_ms() >> 2;
00019 //        for(uint32_t i = 0; i < LED_COUNT; i++)
00020 //        {
00021 //            uint8_t x = time - 8*i;
00022 //            colors[i] = (rgb_color){ x, 255 - x, x };
00023 //        }
00024 //    
00025 //        // Send the colors to the LED strip.
00026 //        ledStrip.write(colors, LED_COUNT);
00027 //        wait_ms(10);        
00028 //    }
00029 //}