pololu / pololu-led-strip-arduino

Arduino library for addressable RGB LED strips from Pololu
http://www.pololu.com/catalog/product/2540
MIT License
163 stars 85 forks source link

Add support for 8Mhz CPU #5

Closed odewdney closed 10 years ago

odewdney commented 10 years ago

conditionally moved the rol statement out of the delay to meet timing constraint for 8Mhz

DavidEGrayson commented 10 years ago

Thanks! Your code is now part of version 3.2.0 of the library.

By the way, I was able to test your code on an A-Star 32U4 Micro (which normally runs at 16 MHz) by simply adding these lines to the top of the sketch:

#include <avr/power.h>
#define F_CPU 8000000

and adding this line in setup:

clock_prescale_set(clock_div_2);