I've also tested the neopixel library with the L3GD20 Gyro breakout and found that they work together when the gyro is interfaced with SPI but not with I2C. I've only interfaced the ADXL345 as I2C because SPI doesn't appear to be supported in the library. Just for S&G's, I also tried an adafruit I2C LCD shield with the neopixel library and found they do work together suggesting that I2C/Wire library can work with the Adafruit_NeoPixel library.
In case my query isn't clear, I've included a minimal sketch which demonstrates the problem. This sketch dimly lights 16 neopixels on pin 6 (I also tried others) but uncommenting either accel line results in no pixels being lit.
Code: Select all
#include <Adafruit_NeoPixel.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345.h>
Adafruit_ADXL345 accel = Adafruit_ADXL345(14325);
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, 6, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.show();
// accel.setRange(ADXL345_RANGE_16_G);
}
void loop() {
sensors_event_t event;
// accel.getEvent(&event);
for(uint16_t i=0; i<=strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(1, 1, 1));
strip.show();
}
delay(100);
}
thanks, c