Enabling this will put your Bluefruit LE module in a 'known good' state and clear any config data set in previous sketches or projects, so running this at least once is a good idea.

When deploying your project, however, you will want to disable factory reset by setting this value to 0. If you are making changes to your Bluefruit LE device via AT commands, and those changes aren't persisting across resets, this is the reason why. Factory reset will erase the non-volatile memory where config data is stored, setting it back to factory default values.

Some sketches that require you to bond to a central device (HID mouse, keyboard, etc.) won't work at all with this feature enabled since the factory reset will clear all of the bonding data stored on the chip, meaning the central device won't be able to reconnect. PIN Which pin on the Arduino is connected to the NeoPixels? NUMPIXELS How many NeoPixels are attached to the Arduino? -----------------------------------------------------------------------*/ #define FACTORYRESET_ENABLE 1

/**************************************************************************//*! @brief Sets up the HW an the BLE module (this function is called automatically on startup)*//**************************************************************************///additional variables

// this part colors ALL the pixels according to the app's color picker:// for(uint8_t i=0; i<NUMPIXELS; i++) {// pixel.setPixelColor(i, pixel.Color(red,green,blue));// }// pixel.show(); // This sends the updated pixel color to the hardware. }

if (animationState == 3){ // button labeled "3" in control pad for(uint16_t i=0; i<pixel.numPixels(); i++) { //clear all pixels before displaying new animation pixel.setPixelColor(i, pixel.Color(0,0,0)); } larsonScanner(30); // larsonScanner is set to red and does not take color input. pixel.show(); // This sends the updated pixel color to the hardware. }

Q. If I power the Neopixel Rings with the Trinket M0 USB pin, isn't there going to be a problem since the Neopixels are being powered by the 5V of the USB port, but the Data pin is a 3V singnal from the Trinket M0 pin...

In theory there could be a problem, but in practice it almost always works.

Most 5V CMOS devices use a signal protocol that requires them to accept signals 3.5V or higher as HIGH input. These days, with chips being designed for mixed-voltage systems, the limit is usually defined as 70% of VCC, whatever voltage VCC happens to be.

To guarantee a chip obeys that protocol, manufacturers usually design chips that accept anything over 60% to 65% of VCC as HIGH input. That puts the real high-input threshold down around 3V, where it will accept input from 3.3V devices.

It's an off-spec use of the device, so you can't blame the manufacturer if it doesn't work, but you're free to take advantage of it if experience shows that it does work.