Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Tennsy OctoWS2811 Questions Counter

  1. #1
    Junior Member
    Join Date
    Sep 2018
    Posts
    5

    Tennsy OctoWS2811 Questions Counter

    Hi,

    I have 4 time a 32*16pixels WS2812B led matrix on my desk. I would like to show a 2 digit counter on this "matrix". So i connected the leds together.

    So my question is if there is a libary to show something on the ws2812B leds. Im using the OctoWS2811 Adaptor to connect the "matrix" to the Tennsy.

    Maybe someone has some experience with this leds ;-)

    Chris

  2. #2
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271

  3. #3
    Junior Member
    Join Date
    Sep 2018
    Posts
    5
    Thans Gibbedy, one line is working. But i put i put the 32x 8 matrix together as a square. So i have now 32x32 pixel. All the maxtrixes are connected in a row. I would like to drive it over on pin.
    Click image for larger version. 

Name:	Tennsy.PNG 
Views:	26 
Size:	14.3 KB 
ID:	14986

    The text should go from the left to the right side over all 4. I would like to use it as one big matrix
    Last edited by Kampfwurst; 10-20-2018 at 12:58 PM.

  4. #4
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    I've updated it.
    try that

  5. #5
    Junior Member
    Join Date
    Sep 2018
    Posts
    5
    no only the top matrix is doing some strange scroling but the text is not readable.

    Code:
    #include <Adafruit_GFX.h>
    #include <Adafruit_NeoMatrix.h>
    #include <Adafruit_NeoPixel.h>
    #ifndef PSTR
     #define PSTR // Make Arduino Due happy
    #endif
    
    #define PIN 2
    
    // MATRIX DECLARATION:
    // Parameter 1 = width of NeoPixel matrix
    // Parameter 2 = height of matrix
    // Parameter 3 = pin number (most are valid)
    // Parameter 4 = matrix layout flags, add together as needed:
    //   NEO_MATRIX_TOP, NEO_MATRIX_BOTTOM, NEO_MATRIX_LEFT, NEO_MATRIX_RIGHT:
    //     Position of the FIRST LED in the matrix; pick two, e.g.
    //     NEO_MATRIX_TOP + NEO_MATRIX_LEFT for the top-left corner.
    //   NEO_MATRIX_ROWS, NEO_MATRIX_COLUMNS: LEDs are arranged in horizontal
    //     rows or in vertical columns, respectively; pick one or the other.
    //   NEO_MATRIX_PROGRESSIVE, NEO_MATRIX_ZIGZAG: all rows/columns proceed
    //     in the same order, or alternate lines reverse direction; pick one.
    //   See example below for these values in action.
    // Parameter 5 = pixel type flags, add together as needed:
    //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
    //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
    //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
    //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
    
    
    // Example for NeoPixel Shield.  In this application we'd like to use it
    // as a 5x8 tall matrix, with the USB port positioned at the top of the
    // Arduino.  When held that way, the first pixel is at the top right, and
    // lines are arranged in columns, progressive order.  The shield uses
    // 800 KHz (v2) pixels that expect GRB color data.
    Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8,4,1, PIN,
      NEO_TILE_TOP   + NEO_TILE_LEFT   + NEO_TILE_COLUMNS   + NEO_TILE_ZIGZAG +NEO_MATRIX_TOP     + NEO_MATRIX_LEFT +
      NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG ,
      NEO_RGB            + NEO_KHZ800);
    
    const uint16_t colors[] = {
      matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255) };
    
    void setup() {
      matrix.begin();
      matrix.setTextWrap(false);
      matrix.setBrightness(40);
      matrix.setTextColor(colors[0]);
    }
    
    int x    = matrix.width();
    int pass = 0;
    
    void loop() {
      matrix.fillScreen(0);
      matrix.setCursor(x, 0);
      matrix.print(F("HELLO "));
      if(--x < -50) {
        x = matrix.width();
        if(++pass >= 3) pass = 0;
        matrix.setTextColor(colors[pass]);
      }
      matrix.show();
      delay(50);
    }
    With this code is starting on top and scrolls from top row to from right to left and then to the next part of the matrix.

  6. #6
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    i updated again..
    the matrix declaration is wrong and needs to be ROWS not COLUMNS I think.

    why is the 4,1 there?

    Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8,4,1, PIN,
    NEO_TILE_TOP + NEO_TILE_LEFT + NEO_TILE_COLUMNS + NEO_TILE_ZIGZAG +NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
    NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG ,
    NEO_RGB + NEO_KHZ800);

    see the example i posted and maybe google search videos on neoMatrix library
    Last edited by Gibbedy; 10-20-2018 at 03:10 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •