I'm working on the Adafruit Firewalker shoes.
I can't make my code compile to test my flora project.
This is my error message:
Arduino: 1.6.7 (Windows 10), Board: "Adafruit Flora"
C:\Users\Devi\Documents\Arduino\test_2\test_2.ino\test_2.ino.ino:1:29: fatal error: Adafruit_NeoPixel: No such file or directory
#include <Adafruit_NeoPixel>
^
compilation terminated.
exit status 1
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
https://learn.adafruit.com/firewalker-led-sneakers/test-circuit
#include <Adafruit_NeoPixel.h>
const int analogInPin = A9; // Analog input pin that the potentiometer is attached to
Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, 6, NEO_GRB + NEO_KHZ800);
int sensorValue = 0; // value read from the pot
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(9, INPUT_PULLUP);
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// print the results to the serial monitor:
Serial.print("sensor = " );
Serial.println(sensorValue);
if (sensorValue < 100){
Serial.println("leds triggered");
colorWipe(strip.Color(255, 0, 0), 25);
colorWipe(strip.Color(0, 0, 0), 25);
}
}
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
2 Answers 2
I had the same problem, you just have to download the Adafruit Neo Pixel library:
i think issue is in your this path C:\Users\Devi\Documents\Arduino\test_2\test_2.ino\test_2.ino.ino:1:29: fatal error: Adafruit_NeoPixel:
make new arduino file and copy the same code and save it on other folder on desktop or other drive then compile it
Compilation I compiled you same code and my stored path of .ino file is C:\Users\Muhammad Hassaan\Documents\Arduino\sketch_mar04a
-
this did work it still says no directory found for neopixels did I install something wrong all I did was copy and paste source codeDevin Caron– Devin Caron2016年03月03日 17:43:53 +00:00Commented Mar 3, 2016 at 17:43
-
i think issue is with your library that you have downloaded, please reinstall the Arduino IDE and download the library again with the help of ide then recompile your codeMuhammad Hassaan Bashir– Muhammad Hassaan Bashir2016年03月15日 05:48:35 +00:00Commented Mar 15, 2016 at 5:48
Ctrl+K
to have your browser do this for you.#include <Adafruit_NeoPixel>
but your code says#include <Adafruit_NeoPixel.h>
- which do you actually have?