Neopixel + ATTiny85 at 8Mhz

Hi All

I have got the following code working on my (neopixel) WS2812 + ATTiny85 at 16mhz, but the same code wont seem to run at 8mz
Due to power considerations I only want to run this at 8mz

Does anyone have any experience in this issue ?
[Incidentally, my hardware is connected correctly :slight_smile: ]

Regards. Bob

#include <Adafruit_NeoPixel.h>
#define PIN 3

Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);
uint8_t r, g, b;

void setup() {
  strip.begin();; // Initialize all pixels to 'off'

void loop() {
  for (r = 0; r<255; r++){
    strip.setPixelColor(0, strip.Color(r, g, 255-r)); // fade red in and blue out;
  for (g = 0; g<255; g++){
    strip.setPixelColor(0, strip.Color(255-g, g, b)); // fade green in and red out;
  for (b = 0; b<255; b++){
    strip.setPixelColor(0, strip.Color(r, 255-b, b)); // fade blue in and green out;

When I run the code, nothing happens, it seems dead !!

Hi. I know neopixel library definitely works at 8MHz, I’ve done it. Maybe your problem is more to do with the tiny core you are using.

But, I have to say, I think the power saving will be pretty small compared to the current drawn by even one neopixel/ws2812b, which could be 60mA.

Having said that, you could probably save as much or more using one of the sleep libraries and replacing your delay() functions with the low-power-sleep equivalent. That is if you can find a sleep library compatible with the tiny85… I have used “Sleep_n0m1 Library” with Pro Micro, but that’s a mega32u4. There’s no indication it will work with a tiny. But the code looks like:



Cheers Paul, I may look into some sleep !!

I am wondering if the LED I have is not quite compatable with the data speed, I have some of them can be a bit moody and not accept the data if the timing is slightly wrong !

I shall keep looking for an answer

Did you say you have more of them or you have heard some of them can be fussy Bob?

If you have only one, who sold you just one neopixel, thats like buying one cigarette! They are about £4 for 10 on eBay when I bought some.

no I meant I have heard.... I have quite a few of them, but I cant vouch that the ebay source has the information correct

I have some more arriving soon from somewhere else, I shall try those too