Neo Trellis not working

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rynoloco
 
Posts: 4
Joined: Fri Apr 08, 2022 2:58 pm

Neo Trellis not working

Post by rynoloco »

Order #2802729

I started putting together the project and noticed I could not get the leds on the trellis to work. I tried to connect directly to the Feather M4 Express. I got the code to load on the M4 but nothing happened. I then connected the neotrellis to the arduino Uno and was able to load the code, but still, nothing happened. The below is the code that was used from the website to test.

Code: Select all

#include <Adafruit_NeoPixel.h>

#define PIN 13

Adafruit_NeoPixel strip = Adafruit_NeoPixel(32, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
  strip.setBrightness(50);
}

void loop() {
  // Some example procedures showing how to display to the pixels:
  colorWipe(strip.Color(255, 0, 0), 50); // Red
  colorWipe(strip.Color(0, 255, 0), 50); // Green
  colorWipe(strip.Color(0, 0, 255), 50); // Blue
//colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW
  // Send a theater pixel chase in...
  theaterChase(strip.Color(127, 127, 127), 50); // White
  theaterChase(strip.Color(127, 0, 0), 50); // Red
  theaterChase(strip.Color(0, 0, 127), 50); // Blue

  rainbow(20);
  rainbowCycle(20);
  theaterChaseRainbow(50);
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, c);    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
Last edited by dastels on Fri Apr 08, 2022 3:12 pm, edited 1 time in total.
Reason: fix code block

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neo Trellis not working

Post by dastels »

You should be interacting via the Seesaw chip & library as described in https://learn.adafruit.com/adafruit-neo ... duino-code. How do you have it wired for you experiments?

Dave

User avatar
rynoloco
 
Posts: 4
Joined: Fri Apr 08, 2022 2:58 pm

Re: Neo Trellis not working

Post by rynoloco »

20220412_091648[1].jpg
20220412_091648[1].jpg (215.65 KiB) Viewed 160 times

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neo Trellis not working

Post by dastels »

OK, so you are using the seesaw via I2C. I'm not sure what you meant by "I tried to connect directly to the Feather M4 Express"

The NeoPixels on the NeoTrellis aren't directly exposed. As I said, you need to use the associated library https://learn.adafruit.com/adafruit-neo ... duino-code When you install the seesaw library, you'll have NeoTrellis examples. Try the basic one to start.

Dave

User avatar
rynoloco
 
Posts: 4
Joined: Fri Apr 08, 2022 2:58 pm

Re: Neo Trellis not working

Post by rynoloco »

Screenshot 2022-04-13 213000.jpg
Screenshot 2022-04-13 213000.jpg (129.17 KiB) Viewed 147 times
I get followed this direction previously before posting. The problem is nothing happens after I successfully upload the code. I have tried all of the codes on the seesaw program.

I also have a Feather M4Express chip that I wired up with the Trellis and I have the same issue. I am able to successfully upload the code but nothing turns on on the trellis

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neo Trellis not working

Post by dastels »

Looking at your wiring again... power need to be connected to 5v, not D13.

Dave

User avatar
rynoloco
 
Posts: 4
Joined: Fri Apr 08, 2022 2:58 pm

Re: Neo Trellis not working

Post by rynoloco »

Ahh.. That did it . Thanks so much for your help

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

Return to “Arduino”