# Scrolling text over 27 P10 panels

**URL:** <https://rpi-rgb-led-matrix.discourse.group/t/scrolling-text-over-27-p10-panels/190>\
**Category:** Uncategorized\
**Created:** [April 5, 2021, 4:36pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/scrolling-text-over-27-p10-panels/190 "2021-04-05T16:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jocelyngate](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jocelyngate](https://rpi-rgb-led-matrix.discourse.group/u/jocelyngate)\
**Post date:** [April 5, 2021, 4:36pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/scrolling-text-over-27-p10-panels/190/1 "2021-04-05T16:36:57Z")

</div>

Hello,

Im jocelyn from France,

I started to use rpi-rgb-led-matrix library to setup a 960x16 px display on a raspberry pi 3b+ wit P10 RGB panels.  
My program is finished and work well on a single chain of length 9 panels.  
Today I tried to wire the whole screen using --led-parallel {CHAIN\_1 Panel 1-\>9} {CHAIN\_2 Panel 10-\>18} {CHAIN\_3 Panel 19-\>27}

The wiring seems correct because i can set the whole background to a certain color.

i use theses parameters for now ‘–led-chain=9 --led-rows=16 --led-parallel=3 --led-cols=32’

As I understand I will need a custom mapper to rearange all my panel in a single row.

Can somebody provide me help to deals with the correct mappers to use?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![jocelyngate](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jocelyngate](https://rpi-rgb-led-matrix.discourse.group/u/jocelyngate)\
**Post date:** [April 6, 2021, 12:13pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/scrolling-text-over-27-p10-panels/190/2 "2021-04-06T12:13:06Z")

</div>

With this custom mapper in c++ in pixel-mapper.cc it seems to work for my case. (the implementation is not generic at all)  
I don’t know if a simpler solution was available.  
Do not hesitate to comment if you have it.

```

// |--- Pi connector |--- Pi connector |--- Pi connector 
// [>][>][>][>][>][>][>][>][>]#[>][>][>][>][>][>][>][>][>]#[>][>][>][>][>][>][>][>][>]
class OneLinePixelMapper : public PixelMapper {
public:
  OneLinePixelMapper() {}

  virtual const char *GetName() const { return "OneLine"; }

  virtual bool SetParameters(int chain, int parallel, const char *param) {
    if (param == NULL || strlen(param) == 0) {
      return true;
    }
    return false;
  }

  virtual bool GetSizeMapping(int matrix_width, int matrix_height,
                              int *visible_width, int *visible_height)
    const {
    *visible_height = matrix_height/3;
    *visible_width = 3*matrix_width;
    return true;
  }

  virtual void MapVisibleToMatrix(int matrix_width, int matrix_height,
                                  int x, int y,
                                  int *matrix_x, int *matrix_y) const {
                               
    if( y > 0 && y <=matrix_height) {
        
        if( x > 0 && x <= matrix_width ) {
            *matrix_x = x;         
            *matrix_y=y;
        }
        
        else if( x > matrix_width && x <= 2 * matrix_width ) {
            *matrix_x = x - matrix_width;
            *matrix_y = y + matrix_height;
        }
        
        else if( x > 2 * matrix_width && x <= 3 * matrix_width ) {
            *matrix_x = x - 2 * matrix_width;
            *matrix_y = y + 2 * matrix_height;
        }
        
    }
    else {
   
        *matrix_x = matrix_width; 
        *matrix_y = matrix_height;
        
    }
    
  }
  
};

```
