Go Down

Topic: attiny85 + neopixel stick 8 (Read 2397 times) previous topic - next topic

guixi

May 21, 2015, 10:17 am Last Edit: May 21, 2015, 10:17 am by guixi
Hi, what can i fix this problem? :(

Arduino:1.6.4 (Windows 8.1), Scheda:"ATtiny, ATtiny85, 20 MHz (external)"

C:\Program Files (x86)\Arduino\libraries\Adafruit_NeoPixel-master\Adafruit_NeoPixel.cpp:674:3: error: #error "CPU SPEED NOT SUPPORTED"
  #error "CPU SPEED NOT SUPPORTED"
   ^

this is an example code to use neopixel..
Code: [Select]
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>

// Which pin on the Arduino is connected to the NeoPixels?
#define PIN            0

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS      8

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 500; // delay for half a second

void setup() {
  pixels.begin(); // This initializes the NeoPixel library.
}

void loop() {
  // For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
  for(int i=0;i<NUMPIXELS;i++){
    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels.setPixelColor(i, pixels.Color(0,150,0)); // Moderately bright green color.
    pixels.show(); // This sends the updated pixel color to the hardware.
    delay(delayval); // Delay for a period of time (in milliseconds).
  }
}


the attiny works fine, but this code won't work..

dannable

I notice that you are running it at 20MHz - do you have the option to run it at 16MHz? I think it will be happy with that speed.

guixi

i solve the problem, i use 8mhz (internal) :)

Go Up