New user - Co-ordinate mapping in JSON

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam

Hey Adam,

How is your matrix laid out? Typically your pixel indices are either serpentine, like this:

image.png

Or always have the lowest value of each row on one side, like this:

image.png

If they are like one of the above, you don’t have to do anything special, just have a layout section in your json file something like this:


"layout": {

"typename": "matrix",

"width": 24,

"height": 24,

"serpentine": true,

"brightness": 128

}

The “serpentine” param is what you are looking for. The top matrix example is serpentine=true, the bottom example is serpentine=false

Let’s start there and see how it goes. You can also add rotations and flips if needed. Same parameters go in the json as are used here: https://github.com/ManiacalLabs/BiblioPixel/wiki/Matrix#init

I highly doubt you need to directly specify coordinate mapping. Automatic stuff should get you going.

···

On Tue, Feb 20, 2018 at 11:20 AM, ‘Adam Davies’ via Maniacal Labs Users maniacal-labs-users@googlegroups.com wrote:

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/ba0f5739-51a2-4b75-a30e-3c610faf53cd%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Adam,

Thanks so much for all your help! Currently, we have a 6x6 panel that IS serpentine. However, for our end user (i.e. the people we market the project to) they want to be able to tile these panels in any orientation. So 2 6x6s would be the 12x6, however wouldn’t be straight serpentine

Adam

···

On Tuesday, February 20, 2018 at 4:20:24 PM UTC, Adam Davies wrote:

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam

Ah… Is each panel on it’s own driver or are they chained?

···

On Feb 20, 2018 12:05 PM, “‘Adam Davies’ via Maniacal Labs Users” maniacal-labs-users@googlegroups.com wrote:

Hi Adam,

Thanks so much for all your help! Currently, we have a 6x6 panel that IS serpentine. However, for our end user (i.e. the people we market the project to) they want to be able to tile these panels in any orientation. So 2 6x6s would be the 12x6, however wouldn’t be straight serpentine

Adam

On Tuesday, February 20, 2018 at 4:20:24 PM UTC, Adam Davies wrote:

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/101aaf1c-1e84-4f9e-aed5-033dcf16f24f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

They’re chained. One driver, 2 panels of 6x6 in serpentine linked via terminal blocks

···

On Tuesday, February 20, 2018 at 5:13:13 PM UTC, Adam Haile wrote:

Ah… Is each panel on it’s own driver or are they chained?

On Feb 20, 2018 12:05 PM, “‘Adam Davies’ via Maniacal Labs Users” maniacal-...@googlegroups.com wrote:

Hi Adam,

Thanks so much for all your help! Currently, we have a 6x6 panel that IS serpentine. However, for our end user (i.e. the people we market the project to) they want to be able to tile these panels in any orientation. So 2 6x6s would be the 12x6, however wouldn’t be straight serpentine

Adam

On Tuesday, February 20, 2018 at 4:20:24 PM UTC, Adam Davies wrote:

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/101aaf1c-1e84-4f9e-aed5-033dcf16f24f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Assuming it continues to be serpentine from one panel to another, you don’t need to do anything more than tell it the display is 6x12…

But to explicitly define it, you can do things like this:

Dual 6x6 as colum


"layout": {

"typename": "matrix",

"width": 24,

"height": 24,

"serpentine": true,

"brightness": 128,

"gen_coord_map": [{

"dx": 6,

"dy": 6,

"serpentine": false

},

{

"dx": 6,

"dy": 6,

"serpentine": false

}

]

}

Dual 6x6 as row


"layout": {

"typename": "matrix",

"width": 24,

"height": 24,

"serpentine": true,

"brightness": 128,

"gen_coord_map": [

[

{

"dx": 6,

"dy": 6,

"serpentine": false

},

{

"dx": 6,

"dy": 6,

"serpentine": false

}

]

]

}

Basically give gen_coord_map a list. Each entry in that list is a row. If that entry is another list that means it’s a row with multiple columns in it.
This was really meant for when you use multiple drivers as it’s more likely to have weird layouts. But lets say someone made a 12 x 12 out of 4 of your panels. You would have this:


"gen_coord_map": [

[

{

"dx": 6,

"dy": 6,

"serpentine": false

},

{

"dx": 6,

"dy": 6,

"serpentine": false

}

],

[

{

"dx": 6,

"dy": 6,

"serpentine": false

},

{

"dx": 6,

"dy": 6,

"serpentine": false

}

]

]

Note, it’s 2 sub-lists, so that’s 2 rows. And each has 2 entries, so 2 columns each.

You can also include rotation which can be 0, 90, 180, 270 or flip which is just true/false and inverts the Y-axis. Between those you can adjust for any weird layout of your panels.

···

On Tue, Feb 20, 2018 at 12:45 PM, ‘Adam Davies’ via Maniacal Labs Users maniacal-labs-users@googlegroups.com wrote:

They’re chained. One driver, 2 panels of 6x6 in serpentine linked via terminal blocks

On Tuesday, February 20, 2018 at 5:13:13 PM UTC, Adam Haile wrote:

Ah… Is each panel on it’s own driver or are they chained?

On Feb 20, 2018 12:05 PM, “‘Adam Davies’ via Maniacal Labs Users” maniacal-...@googlegroups.com wrote:

Hi Adam,

Thanks so much for all your help! Currently, we have a 6x6 panel that IS serpentine. However, for our end user (i.e. the people we market the project to) they want to be able to tile these panels in any orientation. So 2 6x6s would be the 12x6, however wouldn’t be straight serpentine

Adam

On Tuesday, February 20, 2018 at 4:20:24 PM UTC, Adam Davies wrote:

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/101aaf1c-1e84-4f9e-aed5-033dcf16f24f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/d6e70657-0569-40d0-8662-f3ab78130e39%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Awesome, thank you so much!

Once we can get the panels working (annoyingly, only 3 for our uni project) with hard-coded written json files, the aim is for the user to input values into a web-page hosted on the RasPi that will generate and run the json dynamically. Fingers crossed.

Thanks again, and I feel that I may have more posts in the future

A

···

On Tuesday, February 20, 2018 at 4:20:24 PM UTC, Adam Davies wrote:

Hello everyone!

Very very new user here, undertaking a project for University trying to build a panel using the AllPixel driver and the BP library.

So far progress has been slow but positive, I’ve been able to create .json files that draw on the library’s animations and successfully run them with other attributes such as colour, speed, delay etc.

Have now decided to step up to matrix level (crazy, I know) but I’m having some issues with the mapping. I’ve noted that most of the info on GitHub seems to be pointing towards python, but I’m hoping to be able to create .json files that have the parameters and then reference the python files that come with the library.

Where in my .json file should I specify the co-ordinate map, and in which format do I do it? I’ve been trying “coords”: [0,1,2],[3,4,5], in the run section, but no avail

Thanks for any help, I feel this post may be the first of many!

Adam