I have a light-sensitive application using the ItsyBitsy M0 Express and need the DotStar LED to be off during measurements. Unfortunately I can't seem to turn it off with the test code I'm running below. After uploading the code, the DotStar remains purple, never gets to the loop (blinky red light), and I get a "USB Device not recognized" message from windows. After that, I can still run the bootloader by double-clicking the reset button.
I assume I am using the Adafruit_DotStar object incorrectly, your assistance is much appreciated!
Thanks,
John
Summary of the situation:
- Board: ItsyBitsy M0 Express
- IDE: Arduino
- Checks: UF2 bootloader opens w/ a double-click of the reset, I can run blinky code alone blinking the on-board red LED, DotStart data pin set to 41 and clock pin 40 on the ItsyBitsy M0 Express
- Code: Example code below
- Problem: DotStar remains purple instead of turning off when running example code, and "USB not rec." message pops up in Windows
Code: Select all
#include <Adafruit_DotStar.h>
Adafruit_DotStar dot = Adafruit_DotStar(1, 41, 40, DOTSTAR_BGR);
void setup() {
//dot.begin();
//dot.show();
pinMode(13,OUTPUT);
}
void loop() {
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(100);
}
Code: Select all
#include <Adafruit_DotStar.h>
Adafruit_DotStar dot = Adafruit_DotStar(1, 41, 40, DOTSTAR_BGR);
void setup() {
dot.begin();
dot.show();
pinMode(13,OUTPUT);
}
void loop() {
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(100);
}