# Help needed with 52x52 1/13 scan

**URL:** <https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177>\
**Category:** Uncategorized\
**Created:** [March 25, 2021, 12:57pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177 "2021-03-25T12:57:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JangSuKim](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/jangsukim/32/58_2.png) [@JangSuKim](https://rpi-rgb-led-matrix.discourse.group/u/JangSuKim)\
**Post date:** [March 25, 2021, 12:57pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177/1 "2021-03-25T12:57:29Z")

</div>

sudo python3 runtext.py --led-slowdown-gpio=3 --led-cols=64 --led-rows=64 --led-brightness=50 --led-row-addr-type=3 --led-pixel-mapper Rotate:180 --led-multiplexing=1

> Hello,  
> First, I really appreciate your great work!

> Second, I recently grabbed a LED Panel from the dumpster which has 52x52 pixels on there. I hooked it up like the HUB75 panels, but the mapping seems not to be right.  
> I need to skip 3 pixels every 13 horzontal pixels.  
> The shift register they used has 16outputs, but they left 3 outputs unconnected to have 52pixels in total. (same as in vertical rows, but I could easily change that in the code from 16 to 13)  
> what lines do I need to add/modify?

class StripeMultiplexMapper : public MultiplexMapperBase {  
public:  
StripeMultiplexMapper() : MultiplexMapperBase(“Stripe”, 2) {}

void MapSinglePanel(int x, int y, int \*matrix\_x, int \*matrix\_y) const {

const bool is\_top\_stripe = (y % (panel\_rows\_/2)) \< panel\_rows\_/4;

//x=x+3;  
if (x \>= 14) { x=x+3; }  
if (x \>= 30) { x=x+3; }  
if (x \>= 46) { x=x+3; }

if ( x\>63) { x=0 ;}

```
*matrix_x = is_top_stripe ? x + panel_cols_ : x;

```

\*matrix\_y = ((y / (panel\_rows\_/2)) \* (panel\_rows\_/4)+ y % (panel\_rows\_/4));

}  
};

x 좌표는 성공!! y 실패 x

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [March 27, 2021, 3:12am UTC](https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177/2 "2021-03-27T03:12:58Z")

</div>

OMG, that is a very weird size, I didn’t even know those existed.

To be honest, I think you’re going to be on your own for those. I haven’t seen @hzeller in a while, he’s likely busy with work work, but honestly without having the same panels as you have, it’d be a bit time consuming to write drivers remotely.  
But it’s a good opportunity for you to learn, good luck 😉

---

<div class="post-metadata">

**Author:** ![JangSuKim](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/jangsukim/32/58_2.png) [@JangSuKim](https://rpi-rgb-led-matrix.discourse.group/u/JangSuKim)\
**Post date:** [March 27, 2021, 3:44am UTC](https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177/3 "2021-03-27T03:44:31Z")

</div>

make text-scroller

sudo ./text-scroller -f …/fonts/Medium32.bdf -C0,255,0 -B0,0,0 -O255,255,255 --led-show-refresh   
–led-chain=1 --led-slowdown-gpio=3 --led-cols=64 --led-rows=64 --led-multiplexing=1   
–led-brightness=100 --led-row-addr-type=3 -s0 -y-0 -x0 “한글출력”

//### 18 new mapper

class Stripe52x52 : public MultiplexMapperBase {  
public:  
Stripe52x52() : MultiplexMapperBase(“Stripe52x52”, 2) {}

void MapSinglePanel(int x, int y, int \*matrix\_x, int \*matrix\_y) const {

const bool is\_top\_stripe = (y % (panel\_rows\_/2)) \< panel\_rows\_/4;

if (x \>= 14) { x=x+3; }  
if (x \>= 30) { x=x+3; }  
if (x \>= 46) { x=x+3; }  
if ( x\>=63) { x=0 ;}  
\*matrix\_x = is\_top\_stripe ? x + panel\_cols\_ : x;

//----------------------------------------------------------------------------------------

\*matrix\_y = ((y / (panel\_rows\_/2)) \* (panel\_rows\_/4)+ y % (panel\_rows\_/4));

//-----------------------------------------------------------------------------------  
}  
};

// y line ???

새로운 매핑을 만드는 중입니다. y 매핑에 대한 감이 안옵니다.  
(Creating a new mapping. I can’t get a feel for the y mapping.)

X line 매핑은 13번 이후에 3씩 추가 했습니다.  
(X line mapping was added by 3 after number 13.) : 😓

---

<div class="post-metadata">

**Author:** ![JangSuKim](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/jangsukim/32/58_2.png) [@JangSuKim](https://rpi-rgb-led-matrix.discourse.group/u/JangSuKim)\
**Post date:** [March 30, 2021, 9:45am UTC](https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177/4 "2021-03-30T09:45:31Z")

</div>

//### 18  
class Stripe52x52 : public MultiplexMapperBase {  
public:  
Stripe52x52() : MultiplexMapperBase(“Stripe52x52”, 2) {}

void MapSinglePanel(int x, int y, int \*matrix\_x, int \*matrix\_y) const {

```
if ( y >= 13) { y=y+3;}
if ( y >= 29) { y=y+3;}
if ( y >= 45) { y=y+3;}

```

const bool is\_top\_stripe = (y % (64/2)) \< 64/4;

if (x \>= 14) { x=x+3; }  
if (x \>= 30) { x=x+3; }  
if (x \>= 46) { x=x+3; }  
if ( x\>=63) { x=0 ;}  
\*matrix\_x = is\_top\_stripe ? x + panel\_cols\_ : x;

//----------------------------------------------------------------------------------------  
if (y \> 63 ) { y = 0;}  
\*matrix\_y = ((y / (64/2)) \* (64/4)+ y % (64/4));

//-----------------------------------------------------------------------------------  
}  
};

I was successful today. 😀

---

<div class="post-metadata">

**Author:** ![JangSuKim](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/jangsukim/32/58_2.png) [@JangSuKim](https://rpi-rgb-led-matrix.discourse.group/u/JangSuKim)\
**Post date:** [March 31, 2021, 11:41am UTC](https://rpi-rgb-led-matrix.discourse.group/t/help-needed-with-52x52-1-13-scan/177/5 "2021-03-31T11:41:57Z")

</div>

![21-03-30 18-42-14 1303](https://global.discourse-cdn.com/free1/uploads/rpi_rgb_led_matrix/original/1X/51a118efe3be09938910a24be241cc503822ed2a.jpeg) //## 1Stripe → 18 Stripe52x52 수정

//### 18  
class Stripe52x52 : public MultiplexMapperBase {  
public:  
Stripe52x52() : MultiplexMapperBase(“Stripe52x52”, 2) {}

void MapSinglePanel(int x, int y, int \*matrix\_x, int \*matrix\_y) const {

```
if ( y >= 13) { y=y+3;}
if ( y >= 29) { y=y+3;}
if ( y >= 45 ) { y=y+3;}

```

const bool is\_top\_stripe = (y % (panel\_rows\_/2)) \< panel\_rows\_/4;

if (x \>= 14) { x=x+3; }  
if (x \>= 30) { x=x+3; }  
if (x \>= 46) { x=x+3; }  
if ( x\>=63) { x=0 ;}

```
*matrix_x = is_top_stripe ? x + panel_cols_ : x;

```

//----------------------------------------------------------------------------------------

if ( y \> 63 ) { y = 0; } else {  
\*matrix\_y = ((y / (panel\_rows\_/2)) \* (panel\_rows\_/4)+ y % (panel\_rows\_/4)); }  
//-----------------------------------------------------------------------------------  
}  
};
