Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeoPixel issues #6

Open
TheKitty opened this issue Aug 7, 2016 · 1 comment
Open

NeoPixel issues #6

TheKitty opened this issue Aug 7, 2016 · 1 comment

Comments

@TheKitty
Copy link

TheKitty commented Aug 7, 2016

  • Arduino board: Circuit Playground Rev B
  • Arduino IDE version 1.6.8

Sometimes when uploading code the NeoPixel below the GND pin next to the USB connector will light green and stay on. On next upload it will turn off. This was the code I was using:

include <Adafruit_CircuitPlayground.h>

void setup() {
CircuitPlayground.begin(); // initialize the Circuit Playground library
}

void loop() {
int value , sound;
if(CircuitPlayground.slideSwitch()) { // if the slide switch is on
value = CircuitPlayground.lightSensor(); // read the light sensor
sound = map(value, 5, 1000, 131, 1760); // map light values to music values
CircuitPlayground.playTone(sound, 100); // play sound for 100 milliseconds
}
}

Also I had run a sketch to light the NeoPixels in Pokemon colors. I then uploaded a sketch that did not do anything with the NeoPixels (it just played tones on the speaker). The NeoPixels stayed lit even with a new sketch loaded.

The brute force method would be for the begin function to make sure all the NeoPixels are off but there might be a more specific issue to fix.

@brencerddwr
Copy link

I have found it to be a good idea to clear LEDS in void setup()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants