I started working on an xy map for my project and looking through different

I started working on an xy map for my project and looking through different examples most are very complex. Is there a simple xy map test code that could just go through the rows of leds lighting up each column? or is there a more simple code than the sample code given in the library?

The sample code seems to not be working right for me and i am trying to change the code but with no luck

Can you post your code to http://gist.github.com ?

And tell us the details of your setup? A picture of the layout could be useful too.

I’m not aware of any test code. If you’re needing XY mapping it’s because you have some sort of unique layout, so your setup is most likely different from others that need to use XY mapping for their own unique layout.

@marmil Here is the code i am currently using. It’s the XYmap example code with the night rider function into it. I am also post a picture of my project running this code:

https://gist.github.com/Rlblack89/9770405e0365cfb4434f95b0b5e98e55

Even better here is a video.

@Ryan_Black - If you are looking to make vertical lines, horizontal lines and some nice examples for a matrix, I would recommend that you look at @Aaron_Liddiment 's great FastLED matrix library at:

For this library and due to the size of your matrix, you will need a MCU with a lot of memory like a Teensy 3.2.

Also, do you have kMatrixSerpentineLayout in your code set to the correct setting – true or false for your matrix?

@Ken_White thank you for that I will check it out hopefully can guide me in the right path. As for the controller I’m using an arduino mega taking up about 50% of the memory, I have the matrix serpentine set to false.

using the code i posted and changing to only show certain leds in the matrix form i found that the leds are going past the boundaries (58,0) show the 5th led on the 2nd row. which should be led (4,1)

Sound like you might be getting it sorted out. Or at least you’ve discovered where to look into it further.
And I hope you’re chatting with @Alec_Luce and helping each other with the Mello head awesomeness.

If you want some reference material i wrote an in depth article on my blog http://www.elec-tron.org/?page_id=1351

@marmil I thought i was getting somewhere. i found that the main file was not communicating with the XY map.h file, So after adding the two files together to communicate with each other nothing is showing but im almost at my max memory (97%). would that cause the leds not to show being low memory and possibly unstable? if @Alec_Luce would like to chime in they are more than welcome to help out.

@Ryan_Black - As I have posted before for @Alec_Luce 's project:

When I started using a 16X16 WS2812B matrix, I found that simple FastLED functions like fill_solid would work but the XY matrix sketch would not work at all when I was using an Arduino Uno or Nano. When I switched to a Teensy 3.1 or 3.2, everything worked well. You might be running out of RAM.

Based on your posted file, are you using more than 1400 LEDs? I had memory problems with only 256 LEDs and the XY matrix sketch.

Also, after #include <FastLED.h> in your posted file, you must put a #include statement for your XY map.h file which is why it was not reading it. You have to do the same for the other h files, too.

@Ken_White I added the #include “XYmap.h” which started communicating with the files and lead me to where I am now.

As for the teensy I started looking at them, would you suggest a 3.6? Due to size of my project? Currently have an arduino mega.

Edit- I have 1311 visible leds, the matrix however is 54x29 so a total of 1565 visible and nonvisible leds,

So with the help of everyone i came to the conclusion that the XYmap was not communicating with the main file after making it communicate together i started running out of space making none of the leds show. i have a teensy 3.2 on order hopefully fixing my problem, i have an older mellohead with 1/2 of the leds. Running the same code with the proper xymap for the smaller mellohead i was able to properly produce nice visuals.

I appreciate all the help from everyone :smiley:

@Ryan_Black - I am glad to hear that you worked that out. Be sure to get a level shifter to use with the Teensy 3.2. I use them even though some here say you do not need them.

@Ken_White Thanks, ordered a level shifter also, better safe than sorry.