I need help with an Arduino Zero compilation problem. My new project will be using about 1300 NeoPixels so I am switching from the Leonardo to the Zero to eliminate inevitable memory problems. Unfortunately I keep getting the following error: “Error compiling for board Arduino/Genuino Zero (Programming Port)”.
Detailed error message: “/Users/timhutson/Documents/Arduino/libraries/Adafruit_Flora_Pixel_Library/Adafruit_FloraPixel.cpp:2:24: fatal error: util/delay.h: No such file or directory #include <util/delay.h>
compilation terminated.
Using library Adafruit_ASFcore-master at version 1.0.0 in folder: /Users/timhutson/Documents/Arduino/libraries/Adafruit_ASFcore-master
Using library Adafruit_Flora_Pixel_Library at version 1.0.0 in folder: /Users/timhutson/Documents/Arduino/libraries/Adafruit_Flora_Pixel_Library
exit status 1
Error compiling for board Arduino/Genuino Zero (Programming Port).”
I am using a MacBook Pro, OSX 10.11.6.
Arduino Settings:
Board: “Arduino/Genuino Zero (Programming Port)”
Port: “/dev/cu.usbmodem1412 (Arduino/Genuino Zero (Programming Port)”
Programmer: “Atmel EDBG”
Bootloader was successfully burned.
I am using the latest NeoPixel library (1.0.6) which supports NeoPixels with the Zero.
Could the problem be the Flora Pixel Library (1.0.0) since that is where the fatal error occurred? Another STRONG possibility that I have gleaned from the forum, is that the Zero uses ARM architecture, not AVR. Unfortunately, that bit of knowledge does not help me because I don’t know what changes to make.
I have continued to research since my first posting. “#include <util/delay.h>” is the second line in the AdaFruit-Flora-Pixel-Library/Adafruit_FloraPixel.cpp. The first line of Adafruit_FloraPixel.cpp is “#include “Adafruit_FloraPixel.h””. The first line of my sketch is also #include <Adafruit_FloraPixel.h>.
I did some Turbo Pascal programming 30 years ago, but I don’t recall some of the finer points regarding headers, declarations, etc. By the way, while researching the Flora-Pixel Library I found a comment from ladyada that says the library supports 8, 10 and 16 mhz. Since the Arduino Zero runs at 48mhz, I may have bigger problems actually getting it to work after the code compiles. Regardless, I want to understand, and fix the current problem.
I have continued to research since my first posting. "#include <util/delay.h>" is the second line in the AdaFruit-Flora-Pixel-Library/Adafruit_FloraPixel.cpp. The first line of Adafruit_FloraPixel.cpp is "#include "Adafruit_FloraPixel.h"". The first line of my sketch is also #include <Adafruit_FloraPixel.h>.
the question is do you have that file on your computer? seems the compiler can't find it.
Once you have it there, then you can possibly worry about clock speed and impact
I don't know. Where would the file have come from? Where do I look for it? I assume it is in a library somewhere. If Adafruit_FloraPixel.cpp uses it, it seems like it would already exist somewhere or else there would be instructions on how to get it. This program ran perfectly on the Leonardo so I think it still has something to do with the different architectures of the Leonardo and the Zero.