Attiny13 and neopixels

hello i want to make a ws2812 led based mini christmas tree.but i need a controller for them and need it fast,so i bought an attiny13 and a usbasp programmer.it works just fine with sketches like blink but when i compile a sketch that uses the tinyneopixel library then i get an error.
the error:

Arduino: 1.8.19 (Windows 10), Board: "ATtiny13, ATtiny13, No (ISP Programmer Upload), 9.6MHz Internal Oscillator, Millis Available, No Tone, Better Or Equal 50% Error (Lowest Code Use), Bin, Hex, Dec Supported, Half Duplex, Read+Write, LTO Enabled, Disabled, Default, Default"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kacpe\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kacpe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries -fqbn=diy_attiny:avr:attiny13_diy:version=attiny13,boot=none,clock=9_6MHz,core=MillisCore,millis_ppm=50p,print=BinHexDec,serial=HalfDuplexRW,lto=enable,bodlevel=disabled,advclk=auto,advfrq=auto -ide-version=10819 -build-path C:\Users\kacpe\AppData\Local\Temp\arduino_build_638630 -warnings=default -build-cache C:\Users\kacpe\AppData\Local\Temp\arduino_cache_388628 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3\libraries\tinyNeoPixel\examples\RGBWstrandtest\RGBWstrandtest.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kacpe\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kacpe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries -fqbn=diy_attiny:avr:attiny13_diy:version=attiny13,boot=none,clock=9_6MHz,core=MillisCore,millis_ppm=50p,print=BinHexDec,serial=HalfDuplexRW,lto=enable,bodlevel=disabled,advclk=auto,advfrq=auto -ide-version=10819 -build-path C:\Users\kacpe\AppData\Local\Temp\arduino_build_638630 -warnings=default -build-cache C:\Users\kacpe\AppData\Local\Temp\arduino_cache_388628 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3\libraries\tinyNeoPixel\examples\RGBWstrandtest\RGBWstrandtest.ino

Using board 'attiny13_diy' from platform in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3

Using core 'tiny' from platform in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3

Detecting libraries used...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -DLTO_ENABLED -w -x c++ -E -CC -mmcu=attiny13 -DF_CPU=9600000L -DCLOCK_SOURCE=0 -DARDUINO=10819 -DARDUINO_ATTINY13_DIY -DARDUINO_ARCH_AVR -DNO_TONE -DUSE_SERIAL_TYPE=SERIAL_TYPE_HALF_DUPLEX -DPRINT_USE_BASE_BIN -DPRINT_USE_BASE_DEC -DPRINT_USE_BASE_HEX -DACCEPTABLE_MILLIS_ERROR_PPM=500000UL "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\cores\\tiny" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\variants\\tiny13" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\sketch\\RGBWstrandtest.ino.cpp" -o nul

Alternatives for tinyNeoPixel.h: [tinyNeoPixel@1.0.3]

ResolveLibrary(tinyNeoPixel.h)

  -> candidates: [tinyNeoPixel@1.0.3]

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -DLTO_ENABLED -w -x c++ -E -CC -mmcu=attiny13 -DF_CPU=9600000L -DCLOCK_SOURCE=0 -DARDUINO=10819 -DARDUINO_ATTINY13_DIY -DARDUINO_ARCH_AVR -DNO_TONE -DUSE_SERIAL_TYPE=SERIAL_TYPE_HALF_DUPLEX -DPRINT_USE_BASE_BIN -DPRINT_USE_BASE_DEC -DPRINT_USE_BASE_HEX -DACCEPTABLE_MILLIS_ERROR_PPM=500000UL "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\cores\\tiny" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\variants\\tiny13" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\sketch\\RGBWstrandtest.ino.cpp" -o nul

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -DLTO_ENABLED -w -x c++ -E -CC -mmcu=attiny13 -DF_CPU=9600000L -DCLOCK_SOURCE=0 -DARDUINO=10819 -DARDUINO_ATTINY13_DIY -DARDUINO_ARCH_AVR -DNO_TONE -DUSE_SERIAL_TYPE=SERIAL_TYPE_HALF_DUPLEX -DPRINT_USE_BASE_BIN -DPRINT_USE_BASE_DEC -DPRINT_USE_BASE_HEX -DACCEPTABLE_MILLIS_ERROR_PPM=500000UL "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\cores\\tiny" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\variants\\tiny13" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel\\tinyNeoPixel.cpp" -o nul

Generating function prototypes...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -DLTO_ENABLED -w -x c++ -E -CC -mmcu=attiny13 -DF_CPU=9600000L -DCLOCK_SOURCE=0 -DARDUINO=10819 -DARDUINO_ATTINY13_DIY -DARDUINO_ARCH_AVR -DNO_TONE -DUSE_SERIAL_TYPE=SERIAL_TYPE_HALF_DUPLEX -DPRINT_USE_BASE_BIN -DPRINT_USE_BASE_DEC -DPRINT_USE_BASE_HEX -DACCEPTABLE_MILLIS_ERROR_PPM=500000UL "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\cores\\tiny" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\variants\\tiny13" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\sketch\\RGBWstrandtest.ino.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -DLTO_ENABLED -mmcu=attiny13 -DF_CPU=9600000L -DCLOCK_SOURCE=0 -DARDUINO=10819 -DARDUINO_ATTINY13_DIY -DARDUINO_ARCH_AVR -DNO_TONE -DUSE_SERIAL_TYPE=SERIAL_TYPE_HALF_DUPLEX -DPRINT_USE_BASE_BIN -DPRINT_USE_BASE_DEC -DPRINT_USE_BASE_HEX -DACCEPTABLE_MILLIS_ERROR_PPM=500000UL "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\cores\\tiny" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\variants\\tiny13" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\sketch\\RGBWstrandtest.ino.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\sketch\\RGBWstrandtest.ino.cpp.o"

Compiling libraries...

Compiling library "tinyNeoPixel"

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -DLTO_ENABLED -mmcu=attiny13 -DF_CPU=9600000L -DCLOCK_SOURCE=0 -DARDUINO=10819 -DARDUINO_ATTINY13_DIY -DARDUINO_ARCH_AVR -DNO_TONE -DUSE_SERIAL_TYPE=SERIAL_TYPE_HALF_DUPLEX -DPRINT_USE_BASE_BIN -DPRINT_USE_BASE_DEC -DPRINT_USE_BASE_HEX -DACCEPTABLE_MILLIS_ERROR_PPM=500000UL "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\cores\\tiny" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\variants\\tiny13" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\diy_attiny\\hardware\\avr\\2022.3.10-gcc7.3\\libraries\\tinyNeoPixel\\tinyNeoPixel.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_638630\\libraries\\tinyNeoPixel\\tinyNeoPixel.cpp.o"

C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3\libraries\tinyNeoPixel\tinyNeoPixel.cpp: In member function 'void tinyNeoPixel::show()':

C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3\libraries\tinyNeoPixel\tinyNeoPixel.cpp:270:14: error: 'NEOPIXELPORT' was not declared in this scope

       hi   = NEOPIXELPORT |  pinMask;

              ^~~~~~~~~~~~

C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3\libraries\tinyNeoPixel\tinyNeoPixel.cpp:270:14: note: suggested alternative: 'NOT_A_PORT'

       hi   = NEOPIXELPORT |  pinMask;

              ^~~~~~~~~~~~

              NOT_A_PORT

Using library tinyNeoPixel at version 1.0.3 in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2022.3.10-gcc7.3\libraries\tinyNeoPixel 

exit status 1

Error compiling for board ATtiny13.


How much leds do you going to use? Tiny13 has very limited memory and can't be handle more than about dozen leds

about ten or eight

Error message looks like you use the wrong Attiny package.

Also note that using neopixel leds require to clock Tiny at 8 or 9.6 MHz.

at first after uploading blink with the 9.6mhz setting it blinked super slowly but after burning bootloader it set to 9.6mhz. i tried the MicroCore by MCUdude and got such an error

Arduino: 1.8.19 (Windows 10), Board: "ATtiny13, 9.6 MHz internal osc., EEPROM retained, BOD 4.3V"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kacpe\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kacpe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries -fqbn=MicroCore:avr:13:clock=9M6,eeprom=keep,BOD=4v3 -ide-version=10819 -build-path C:\Users\kacpe\AppData\Local\Temp\arduino_build_462605 -warnings=default -build-cache C:\Users\kacpe\AppData\Local\Temp\arduino_cache_83061 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -prefs=runtime.tools.avrdude-7.1-arduino.1.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -verbose C:\Users\kacpe\AppData\Local\Temp\arduino_modified_sketch_75185\simple.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kacpe\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kacpe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries -fqbn=MicroCore:avr:13:clock=9M6,eeprom=keep,BOD=4v3 -ide-version=10819 -build-path C:\Users\kacpe\AppData\Local\Temp\arduino_build_462605 -warnings=default -build-cache C:\Users\kacpe\AppData\Local\Temp\arduino_cache_83061 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -prefs=runtime.tools.avrdude-7.1-arduino.1.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -verbose C:\Users\kacpe\AppData\Local\Temp\arduino_modified_sketch_75185\simple.ino

Using board '13' from platform in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\2.2.1

Using core 'microcore' from platform in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\2.2.1

Detecting libraries used...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\sketch\\simple.ino.cpp" -o nul

Alternatives for Adafruit_NeoPixel.h: [Adafruit_NeoPixel@1.11.0]

ResolveLibrary(Adafruit_NeoPixel.h)

  -> candidates: [Adafruit_NeoPixel@1.11.0]

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\sketch\\simple.ino.cpp" -o nul

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel\\Adafruit_NeoPixel.cpp" -o nul

Error while detecting libraries included by C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp

Using cached library dependencies for file: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\Adafruit_NeoPixel\esp.c

Using cached library dependencies for file: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\Adafruit_NeoPixel\esp8266.c

Using cached library dependencies for file: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\Adafruit_NeoPixel\kendyte_k210.c

Generating function prototypes...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\sketch\\simple.ino.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\sketch\\simple.ino.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\sketch\\simple.ino.cpp.o"

Compiling libraries...

Compiling library "Adafruit_NeoPixel"

Using previously compiled file: C:\Users\kacpe\AppData\Local\Temp\arduino_build_462605\libraries\Adafruit_NeoPixel\esp.c.o

Using previously compiled file: C:\Users\kacpe\AppData\Local\Temp\arduino_build_462605\libraries\Adafruit_NeoPixel\esp8266.c.o

Using previously compiled file: C:\Users\kacpe\AppData\Local\Temp\arduino_build_462605\libraries\Adafruit_NeoPixel\kendyte_k210.c.o

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\Adafruit_NeoPixel\\Adafruit_NeoPixel.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_462605\\libraries\\Adafruit_NeoPixel\\Adafruit_NeoPixel.cpp.o"

C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp:1668:2: error: #error "CPU SPEED NOT SUPPORTED"

 #error "CPU SPEED NOT SUPPORTED"

  ^~~~~

Using library Adafruit_NeoPixel at version 1.11.0 in folder: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\Adafruit_NeoPixel 

exit status 1

Error compiling for board ATtiny13.


you MUST use only the same core as recommended in the tutorial/ library readme

i used the tutorial from MCUdude's github

when i upload the blink sketch it works like a charm

It seems to me something wrong with your installation...

Why does your attiny code used files, obviously regarded to ESP8266 mcu?

....Arduino\libraries\Adafruit_NeoPixel\esp.c

....Arduino\libraries\Adafruit_NeoPixel\esp8266.c


no idea actually

so about me.... sorry

i have esp8266 core installed

I found that in the first post you used the library

but in the last:

I think you should use the one that's specifically wrote for Tiny.

but i do not have it anymore

I use ATtiny 13 to address WS2812 using light_ws2812 library & microcore which works like a charm. I haven't updated the version in quite a while, but i did do some modifications inspired by this, which shows that you have enough time to do some animations and address longer strips if you make sure that the calculations take less than 50us to complete.

I am gonna check that later

i have an error

Arduino: 1.8.19 (Windows 10), Board: "ATtiny13, 9.6 MHz internal osc., EEPROM retained, BOD 2.7V"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kacpe\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kacpe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries -fqbn=MicroCore:avr:13:clock=9M6,eeprom=keep,BOD=2v7 -ide-version=10819 -build-path C:\Users\kacpe\AppData\Local\Temp\arduino_build_190013 -warnings=default -build-cache C:\Users\kacpe\AppData\Local\Temp\arduino_cache_83061 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -prefs=runtime.tools.avrdude-7.1-arduino.1.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -prefs=runtime.tools.arduinoOTA.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\light_WS2812\examples\rainbow\rainbow.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kacpe\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kacpe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries -fqbn=MicroCore:avr:13:clock=9M6,eeprom=keep,BOD=2v7 -ide-version=10819 -build-path C:\Users\kacpe\AppData\Local\Temp\arduino_build_190013 -warnings=default -build-cache C:\Users\kacpe\AppData\Local\Temp\arduino_cache_83061 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -prefs=runtime.tools.avrdude-7.1-arduino.1.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1 -prefs=runtime.tools.arduinoOTA.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\kacpe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\light_WS2812\examples\rainbow\rainbow.ino

Using board '13' from platform in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\2.2.1

Using core 'microcore' from platform in folder: C:\Users\kacpe\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\2.2.1

Detecting libraries used...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\sketch\\rainbow.ino.cpp" -o nul

Alternatives for WS2812.h: [light_WS2812]

ResolveLibrary(WS2812.h)

  -> candidates: [light_WS2812]

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\light_WS2812" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\sketch\\rainbow.ino.cpp" -o nul

Using cached library dependencies for file: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\light_WS2812\WS2812.cpp

Using cached library dependencies for file: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\light_WS2812\light_ws2812.cpp

Generating function prototypes...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\light_WS2812" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\sketch\\rainbow.ino.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=attiny13a -DF_CPU=9600000L -DARDUINO=10819 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\cores\\microcore" "-IC:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\MicroCore\\hardware\\avr\\2.2.1\\variants\\attiny13" "-IC:\\Users\\kacpe\\OneDrive\\Dokumenty\\Arduino\\libraries\\light_WS2812" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\sketch\\rainbow.ino.cpp" -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\sketch\\rainbow.ino.cpp.o"

Compiling libraries...

Compiling library "light_WS2812"

Using previously compiled file: C:\Users\kacpe\AppData\Local\Temp\arduino_build_190013\libraries\light_WS2812\WS2812.cpp.o

Using previously compiled file: C:\Users\kacpe\AppData\Local\Temp\arduino_build_190013\libraries\light_WS2812\light_ws2812.cpp.o

Compiling core...

Using precompiled core: C:\Users\kacpe\AppData\Local\Temp\arduino_cache_83061\core\core_MicroCore_avr_13_clock_9M6,eeprom_keep,BOD_2v7_59a111dd662adabf35de44913de8a0ed.a

Linking everything together...

"C:\\Users\\kacpe\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -Os -flto -fno-reorder-blocks -ffixed-r2 -ffixed-r3 -ffixed-r4 -g -fuse-linker-plugin -Wl,--gc-sections -mrelax -mmcu=attiny13a -nostartfiles -Wl,--undefined=__vectors -o "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013/rainbow.ino.elf" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\sketch\\rainbow.ino.cpp.o" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\libraries\\light_WS2812\\WS2812.cpp.o" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013\\libraries\\light_WS2812\\light_ws2812.cpp.o" "C:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013/..\\arduino_cache_83061\\core\\core_MicroCore_avr_13_clock_9M6,eeprom_keep,BOD_2v7_59a111dd662adabf35de44913de8a0ed.a" "-LC:\\Users\\kacpe\\AppData\\Local\\Temp\\arduino_build_190013" -lm

c:/users/kacpe/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/tiny-stack\libc.a(malloc.o):(.data+0x0): undefined reference to `__heap_end'

collect2.exe: error: ld returned 1 exit status

Using library light_WS2812 in folder: C:\Users\kacpe\OneDrive\Dokumenty\Arduino\libraries\light_WS2812 (legacy)

exit status 1

Error compiling for board ATtiny13.


from what code ?? seriously...
And what is exactly the error ?

undefined reference to `__heap_end'

I have simply added the library files (.c &.h ) to the sketch folder, i guess i never installed it, cause i don't have the examples at all.

this is what i have used.

#define F_CPU 9600000 // Must stay at this speed

#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include "light_ws2812.c"

#define NUM_LEDS 11 //number of ws2812 leds
#define HALF_LEDS ((NUM_LEDS + 1) / 2)
#define STRIP_LENGTH (41 - HALF_LEDS)
#define BRIGHT_POT A3
#define SPEED_POT A2
#define BUTTON 0
#define OFF 0
#define ON 1
#define ONCE 5

cRGB p[NUM_LEDS];
cRGB black[1] ;
uint16_t brightness;
uint8_t mode = ON;
bool pressed = false;
int8_t eye = 0;
int8_t inc = 1;
uint16_t moment;
uint8_t spd;

void setup() {
}

void loop() {
  SetBrightness();
  SetSpeed();
  if (pressed)  pressed = CheckReleased();
  else pressed = CheckButton();
  if ((uint16_t) millis() - moment > spd) {
    moment = millis();
    if (eye < HALF_LEDS) CreateEye(eye);
    else if (STRIP_LENGTH - eye < HALF_LEDS) CreateEye(NUM_LEDS - (STRIP_LENGTH - eye));
    else CreateEye(HALF_LEDS);
    eye = eye + inc;
    if (eye <= 0) {
      inc = 1;
      if (mode == ONCE) mode = OFF;
    }
    if (eye >= STRIP_LENGTH) inc = -1;
  }
  SendLeds(eye);
}

void SendLeds(uint8_t eye) {
  for (uint8_t i = 0; i < (STRIP_LENGTH); i++) {
    if (i == eye) ws2812_setleds((struct cRGB *)&p, NUM_LEDS, 0);
    ws2812_setleds((struct cRGB *)&black, 1, 0);
  }
  ws2812_setleds((struct cRGB *)&black, 1, 1);
}

void CreateEye(int8_t center) {
  cRGB col;
  col.r = 0;
  for (uint8_t i = 0; i < NUM_LEDS; i++) setPixelColor(i, col);
  if ((!mode) || (center < 0)) return;
  col.r = brightness;
  for (uint8_t i = 0; i < HALF_LEDS; i++) {
    setPixelColor(center + i, col);
    setPixelColor(center - i, col);
    int16_t br = col.r - (1 + brightness / 7);
    if (br < 0) br = 0;
    col.r = br;
  }
}

void SetSpeed() {
  spd = 7 + (analogRead(SPEED_POT) >> 5) ;
}

void SetBrightness() {
  brightness = analogRead(BRIGHT_POT) >> 2;
}

bool CheckReleased() {
  delay(1);
  if (digitalRead(BUTTON)) return false;
  return true;
}

bool CheckButton() {
  uint16_t counter = 0;
  if (digitalRead(BUTTON)) return false;
  while ((!digitalRead(BUTTON)) && (counter < 2000)) {
    delay(1);
    counter++;
    if ((mode == ON) && (counter > 500)) {
      mode = OFF;
      return true;
    }
  }
  if ((counter > 200) && (counter < 2000)) mode = ONCE;
  else mode = ON;
  moment = (uint16_t) millis();
  eye = 0;
  return true;
}

void setPixelColor(uint8_t pix, cRGB color) {
  if (pix < NUM_LEDS) p[pix] = color;
}

and the .c

/*
* light weight WS2812 lib V2.0b
*
* Controls WS2811/WS2812/WS2812B RGB-LEDs
* Author: Tim (cpldcpu@gmail.com)
*
* Jan 18th, 2014  v2.0b Initial Version
* Nov 29th, 2015  v2.3  Added SK6812RGBW support
*
* License: GNU GPL v2+ (see License.txt)
*/

#include "light_ws2812.h"
#include <avr/interrupt.h>
#include <avr/io.h>
#include <util/delay.h>
 
// Setleds for standard RGB 
inline void ws2812_setleds(struct cRGB *ledarray, uint16_t leds, uint8_t del)
{
   ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin), del);
}

inline void ws2812_setleds_pin(struct cRGB *ledarray, uint16_t leds, uint8_t pinmask, uint8_t del)
{
  ws2812_sendarray_mask((uint8_t*)ledarray,leds+leds+leds,pinmask);
  if (del) _delay_us(ws2812_resettime);
}

// Setleds for SK6812RGBW
inline void ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t leds)
{
  ws2812_sendarray_mask((uint8_t*)ledarray,leds<<2,_BV(ws2812_pin));
  _delay_us(ws2812_resettime);
}

void ws2812_sendarray(uint8_t *data,uint16_t datlen)
{
  ws2812_sendarray_mask(data,datlen,_BV(ws2812_pin));
}

/*
  This routine writes an array of bytes with RGB values to the Dataout pin
  using the fast 800kHz clockless WS2811/2812 protocol.
*/

// Timing in ns
#define w_zeropulse   350
#define w_onepulse    900
#define w_totalperiod 1250

// Fixed cycles used by the inner loop
#define w_fixedlow    2
#define w_fixedhigh   4
#define w_fixedtotal  8   

// Insert NOPs to match the timing, if possible
#define w_zerocycles    (((F_CPU/1000)*w_zeropulse          )/1000000)
#define w_onecycles     (((F_CPU/1000)*w_onepulse    +500000)/1000000)
#define w_totalcycles   (((F_CPU/1000)*w_totalperiod +500000)/1000000)

// w1 - nops between rising edge and falling edge - low
#define w1 (w_zerocycles-w_fixedlow)
// w2   nops between fe low and fe high
#define w2 (w_onecycles-w_fixedhigh-w1)
// w3   nops to complete loop
#define w3 (w_totalcycles-w_fixedtotal-w1-w2)

#if w1>0
  #define w1_nops w1
#else
  #define w1_nops  0
#endif

// The only critical timing parameter is the minimum pulse length of the "0"
// Warn or throw error if this timing can not be met with current F_CPU settings.
#define w_lowtime ((w1_nops+w_fixedlow)*1000000)/(F_CPU/1000)
#if w_lowtime>550
   #error "Light_ws2812: Sorry, the clock speed is too low. Did you set F_CPU correctly?"
#elif w_lowtime>450
   #warning "Light_ws2812: The timing is critical and may only work on WS2812B, not on WS2812(S)."
   #warning "Please consider a higher clockspeed, if possible"
#endif   

#if w2>0
#define w2_nops w2
#else
#define w2_nops  0
#endif

#if w3>0
#define w3_nops w3
#else
#define w3_nops  0
#endif

#define w_nop1  "nop      \n\t"
#define w_nop2  "rjmp .+0 \n\t"
#define w_nop4  w_nop2 w_nop2
#define w_nop8  w_nop4 w_nop4
#define w_nop16 w_nop8 w_nop8

inline void  ws2812_sendarray_mask(uint8_t *data,uint16_t datlen,uint8_t maskhi)
{
  uint8_t curbyte,ctr,masklo;
  uint8_t sreg_prev;
  
  ws2812_DDRREG |= maskhi; // Enable output
  
  masklo	=~maskhi&ws2812_PORTREG;
  maskhi |=        ws2812_PORTREG;
  
  sreg_prev=SREG;
  cli();  

  while (datlen--) {
    curbyte=*data++;
    
    asm volatile(
    "       ldi   %0,8  \n\t"
    "loop%=:            \n\t"
    "       out   %2,%3 \n\t"    //  '1' [01] '0' [01] - re
#if (w1_nops&1)
w_nop1
#endif
#if (w1_nops&2)
w_nop2
#endif
#if (w1_nops&4)
w_nop4
#endif
#if (w1_nops&8)
w_nop8
#endif
#if (w1_nops&16)
w_nop16
#endif
    "       sbrs  %1,7  \n\t"    //  '1' [03] '0' [02]
    "       out   %2,%4 \n\t"    //  '1' [--] '0' [03] - fe-low
    "       lsl   %1    \n\t"    //  '1' [04] '0' [04]
#if (w2_nops&1)
  w_nop1
#endif
#if (w2_nops&2)
  w_nop2
#endif
#if (w2_nops&4)
  w_nop4
#endif
#if (w2_nops&8)
  w_nop8
#endif
#if (w2_nops&16)
  w_nop16 
#endif
    "       out   %2,%4 \n\t"    //  '1' [+1] '0' [+1] - fe-high
#if (w3_nops&1)
w_nop1
#endif
#if (w3_nops&2)
w_nop2
#endif
#if (w3_nops&4)
w_nop4
#endif
#if (w3_nops&8)
w_nop8
#endif
#if (w3_nops&16)
w_nop16
#endif

    "       dec   %0    \n\t"    //  '1' [+2] '0' [+2]
    "       brne  loop%=\n\t"    //  '1' [+3] '0' [+4]
    :	"=&d" (ctr)
    :	"r" (curbyte), "I" (_SFR_IO_ADDR(ws2812_PORTREG)), "r" (maskhi), "r" (masklo)
    );
  }
  
  SREG=sreg_prev;
}

and the .h

/*
 * light weight WS2812 lib include
 *
 * Version 2.3  - Nev 29th 2015
 * Author: Tim (cpldcpu@gmail.com) 
 *
 * Please do not change this file! All configuration is handled in "ws2812_config.h"
 *
 * License: GNU GPL v2+ (see License.txt)
 +
 */ 

#ifndef LIGHT_WS2812_H_
#define LIGHT_WS2812_H_

#include <avr/io.h>
#include <avr/interrupt.h>

///////////////////////////////////////////////////////////////////////
// Define Reset time in µs.
//
// This is the time the library spends waiting after writing the data.
//
// WS2813 needs 300 µs reset time
// WS2812 and clones only need 50 µs
//
///////////////////////////////////////////////////////////////////////
#if !defined(ws2812_resettime)
#define ws2812_resettime    300
#endif

///////////////////////////////////////////////////////////////////////
// Define I/O pin
///////////////////////////////////////////////////////////////////////
#if !defined(ws2812_port)
#define ws2812_port B   // Data port
#endif

#if !defined(ws2812_pin)
#define ws2812_pin  1   // Data out pin
#endif

/*
 *  Structure of the LED array
 *
 * cRGB:     RGB  for WS2812S/B/C/D, SK6812, SK6812Mini, SK6812WWA, APA104, APA106
 * cRGBW:    RGBW for SK6812RGBW
 */

struct cRGB  { uint8_t b; uint8_t r; uint8_t g; };    // type 5
// struct cRGB  { uint8_t g; uint8_t r; uint8_t b; };  // type 3
struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};



/* User Interface
 * 
 * Input:
 *         ledarray:           An array of GRB data describing the LED colors
 *         number_of_leds:     The number of LEDs to write
 *         pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0)
 *
 * The functions will perform the following actions:
 *         - Set the data-out pin as output
 *         - Send out the LED data 
 *         - Wait 50µs to reset the LEDs
 */

void ws2812_setleds     (struct cRGB  *ledarray, uint16_t number_of_leds, uint8_t del);
void ws2812_setleds_pin (struct cRGB  *ledarray, uint16_t number_of_leds,uint8_t pinmask, uint8_t del);
void ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t number_of_leds);

/* 
 * Old interface / Internal functions
 *
 * The functions take a byte-array and send to the data output as WS2812 bitstream.
 * The length is the number of bytes to send - three per LED.
 */

void ws2812_sendarray     (uint8_t *array,uint16_t length);
void ws2812_sendarray_mask(uint8_t *array,uint16_t length, uint8_t pinmask);


/*
 * Internal defines
 */
#if !defined(CONCAT)
#define CONCAT(a, b)            a ## b
#endif

#if !defined(CONCAT_EXP)
#define CONCAT_EXP(a, b)   CONCAT(a, b)
#endif

#define ws2812_PORTREG  CONCAT_EXP(PORT,ws2812_port)
#define ws2812_DDRREG   CONCAT_EXP(DDR,ws2812_port)

#endif /* LIGHT_WS2812_H_ */

i have to small trimpots connected and a button, but you can bypass all that within the code. This compiles with microcore 2.1.0 which i have installed, and works !

i modified it a tiny bit and it compiles but only 2 led's light up
code:

#define F_CPU 9600000 // Must stay at this speed

#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include "light_ws2812.c"

#define NUM_LEDS 5 //number of ws2812 leds
#define HALF_LEDS ((NUM_LEDS + 1) / 2)
#define STRIP_LENGTH (41 - HALF_LEDS)
#define BUTTON 0
#define OFF 0
#define ON 1
#define ONCE 5

cRGB p[NUM_LEDS];
cRGB black[1] ;
uint16_t brightness;
uint8_t mode = ON;
bool pressed = false;
int8_t eye = 0;
int8_t inc = 1;
uint16_t moment;
uint8_t spd;

void setup() {
}

void loop() {
  SetBrightness();
  SetSpeed();
  if (pressed)  pressed = CheckReleased();
  else pressed = CheckButton();
  if ((uint16_t) millis() - moment > spd) {
    moment = millis();
    if (eye < HALF_LEDS) CreateEye(eye);
    else if (STRIP_LENGTH - eye < HALF_LEDS) CreateEye(NUM_LEDS - (STRIP_LENGTH - eye));
    else CreateEye(HALF_LEDS);
    eye = eye + inc;
    if (eye <= 0) {
      inc = 1;
      if (mode == ONCE) mode = OFF;
    }
    if (eye >= STRIP_LENGTH) inc = -1;
  }
  SendLeds(eye);
}

void SendLeds(uint8_t eye) {
  for (uint8_t i = 0; i < (STRIP_LENGTH); i++) {
    if (i == eye) ws2812_setleds((struct cRGB *)&p, NUM_LEDS, 0);
    ws2812_setleds((struct cRGB *)&black, 1, 0);
  }
  ws2812_setleds((struct cRGB *)&black, 1, 1);
}

void CreateEye(int8_t center) {
  cRGB col;
  col.r = 0;
  for (uint8_t i = 0; i < NUM_LEDS; i++) setPixelColor(i, col);
  if ((!mode) || (center < 0)) return;
  col.r = brightness;
  for (uint8_t i = 0; i < HALF_LEDS; i++) {
    setPixelColor(center + i, col);
    setPixelColor(center - i, col);
    int16_t br = col.r - (1 + brightness / 7);
    if (br < 0) br = 0;
    col.r = br;
  }
}

void SetSpeed() {
  spd = 28;
}

void SetBrightness() {
  brightness = 69;
}

bool CheckReleased() {
  delay(1);
  if (digitalRead(BUTTON)) return false;
  return true;
}

bool CheckButton() {
  uint16_t counter = 0;
  if (digitalRead(BUTTON)) return false;
  while ((!digitalRead(BUTTON)) && (counter < 2000)) {
    delay(1);
    counter++;
    if ((mode == ON) && (counter > 500)) {
      mode = OFF;
      return true;
    }
  }
  if ((counter > 200) && (counter < 2000)) mode = ONCE;
  else mode = ON;
  moment = (uint16_t) millis();
  eye = 0;
  return true;
}

void setPixelColor(uint8_t pix, cRGB color) {
  if (pix < NUM_LEDS) p[pix] = color;
}