Trinket M0 with Neopixel and FastLed

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mrseemoo
 
Posts: 25
Joined: Thu Sep 21, 2017 3:10 am

Trinket M0 with Neopixel and FastLed

Post by mrseemoo »

Hi,

First off, thanks for creating the fantastic Trinket M0. It's a blast to use.

I'm a bit stomped on this on... I've ordered a Trinket M0 about a year ago for a Halloween project, written code for it, uploaded and been using it for the past year, all working great.

I've just ordered 3 new Trinket M0s and uploaded the same code, with same setup, but this time it doesn't seem to work anymore.

I've using FastLED's Blink example to troubleshoot, and it seems the issue is that the latest Adafruit SAMD Boards (1.7.10) causes the issue. A ~year ago I used 1.6.8 and everything worked great.

Can anybody, please shed some light on what the changes are and how I could get the code working again with the latest version?

Thanks so much for any help.

Setup:

"Adafruit Mini Skinny NeoPixel Digital RGB" connected to Trinket M0 as follows:
Positive (Red) to USB, Ground (Black) to Ground and Data (White) to Pin 4.

I'm running the following test Blink code:

Code: Select all

#include <FastLED.h>

// How many leds in your strip?
#define NUM_LEDS 1

#define DATA_PIN 4
#define CLOCK_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() { 
    // Uncomment/edit one of the following lines for your leds arrangement.
    // ## Clockless types ##
    FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);  // GRB ordering is assumed
}

void loop() { 
  // Turn the LED on, then pause
  leds[0] = CRGB::Red;
  FastLED.show();
  delay(500);
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  FastLED.show();
  delay(500);
}
Again, this code works as expected with 1.6.8. But fails to work on 1.7.10 (latest).

Thanks for your time and insight.

-s

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Trinket M0 with Neopixel and FastLed

Post by mikeysklar »

There have been ~10 releases since last year for the Adafruit SAMD Boads library.

Can you elaborate on the error you are seeing. I take it the code does not run at all. Anything during compilation or on the serial console that would help understand this?

The bootloaders are probably different as well on your new Trinket M0 versus the board you had a year ago. Can yo confirm that updating the bootloader to 3.14 on original board does not effect the example FASTLED code you are using from running.

https://circuitpython.org/board/trinket_m0/

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”