Go Down

Topic: 8x64 MAX7219 LED Matrix wrong orientation (Read 27771 times) previous topic - next topic

alleebell

Wvijay, I read your post again. You want to "scroll the text". I think it is harder to scroll text with the MAX 7219 module because each digit is addressable individually. For scrolling text, I am still searcning for the right LED module. This looks promising - https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/test-example-code


marco_c

@aeol2000 - I don't know what else to suggest. You may want to try a forum in your own language - easier to explain and there may be a different audience reading the issues.

@wvijay - Good to hear it works for you. The MD_Parola library has an example that does exactly what you are talking about (RTC/DTH11/scrolling text). You may want to look at that for ideas.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

wvijay

@alleebell

Good to note that you are doing a similar project. My LCD version was simple to do, I in fact also made a 16x2 lcd module to switch between time and temp which also went off well.

If you were able to send RTC data to LED matrix, Max7219, will appreciate if you can share the code with me to try it out.

Best Wishes

wvijay

@marco_c

Thanks for the tip, will check it out and hopefully come with something that works.


kwokhf

i have the same problem as you, the simple way is to change


refreshAll()   -----> refreshAllRot90()

inside the .ino file

good luck

Borinot1966

Hi,
I don't know if you all have solved the wrong direction issue with your 8x8 x4 chinese Led Matrix. The guy in this video certainly has.

https://www.youtube.com/watch?v=GfHsCDpe6q0

I've downloaded his sketch and runs quite well. I only had to change some character definitions.

castillejoale

I had the same problem, I fixed like this:

- Go to your Arduino libraries folder
- Open MD_MAX72XX folder
- Open scr folder
- Open MD_MAX72xx_lib.h file
- I changed the following 2 lines of code:

//Changed from 1 to 0
#define   HW_REV_COLS   0 ///< Normal orientation is col 0 on the right. Set to 1 if reversed

//Changed from 0 to 1
#define   HW_REV_ROWS   1 ///< Normal orientation is row 0 at the top. Set to 1 if reversed

Hope it helps!

marco_c

#37
Apr 15, 2017, 03:14 am Last Edit: Apr 15, 2017, 03:15 am by marco_c
Quote
I had the same problem, I fixed like this
Just to correct this explanation.

The method described will work but is not the right way to adapt the library for the hardware. The file to edit is the MD_MAX72xx.h file to select the type of hardware that is being used (#defines USE_*_HW). The _lib.h file will then adjust automatically. This is explained in the documentation for the library and also at this blog post.

Unfortunately there is a Russian web site that has published this as the solution. I have asked them to correct but this has not happened.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

dbuilder81

@gamerpaddy I bought one of these also.....to no avail...what did you come up with finally.

Did you ever get it working?


Here is the link to what I bought   

http://www.ebay.com/itm/182289740901?_trksid=p2057872.m2749.l2649&var=484830396832&ssPageName=STRK%3AMEBIDX%3AIT

pinakoza

Hi I am new on this forum. This is my 1st post. I have been reading this topic since 2 days but without any success in getting my FC-16 modules (8x8x4) scrolling the text with arduino, but without using bluetooth or wifi module. Finally I got a clue from Post #35 made by "Borinot1966".

Thanks to you Borinot1966 :-). I went to the link

https://www.youtube.com/watch?v=GfHsCDpe6q0

and downloaded the code from one of the links in the description of video (Thanks to У Павла!
too for making the vdo and sharing the code). You will need 2 libraries too - pgmspace.h and LedControl.h

Initially all characters were in Russian (I guess!), but then I took English fonts (5x7) from this website

http://tronixstuff.com/2013/10/11/tutorial-arduino-max7219-led-display-driver-ic/

and the magic occured. Now I can scroll my customized text using FC-16 modules with arduino Uno, and without using any bluetooth or wifi connection. But my next step is using BT/Wifi to be able to update the text.

Thanks to all who shared their ideas  :)



pinakoza

#41
Nov 26, 2017, 12:40 am Last Edit: Nov 26, 2017, 01:18 am by pinakoza
As mentioned in my post #39, now I have attached Bluetooth module to receive text input from my phone.

I tried this code, but again it scrolls characters in wrong direction. How can I integrate MD_Parola & MD_MAX72XX (instead of MaxMatrix) to scroll display properly? How to re-write the code?

I am using the attached code that I downloaded from
http://howtomechatronics.com/tutorials/arduino/8x8-led-matrix-max7219-tutorial-scrolling-text-android-control-via-bluetooth/


Thanks :)

ieee488

As mentioned in my post #39, now I have attached Bluetooth module to receive text input from my phone.

I tried this code, but again it scrolls characters in wrong direction. How can I integrate MD_Parola & MD_MAX72XX (instead of MaxMatrix) to scroll display properly? How to re-write the code?

I am using the attached code that I downloaded from
http://howtomechatronics.com/tutorials/arduino/8x8-led-matrix-max7219-tutorial-scrolling-text-android-control-via-bluetooth/


Thanks :)
Different problem = new thread.


Nebenzahl


I solved the problem I had with a panel with 5 MAX7219 8x8. I had to edit the library file, MD_MAX72xx.h, and set it to "USE_GENERIC_HW 1" since what comes standard is another.

wachid_elektronik

Iam new be on arduino and also have the same question. Below is my complete sketch:



// maxmatrix-disp-scroll-text-7219
#include <MaxMatrix.h>
#include <avr/pgmspace.h>

#define maxDisplays 5 // Number of MAX7219's in use.

byte Buf7219[7]; // "width,height,data[5]" single character buffer.
const int data  = 11;     // DIN or MOSI
const int load  = 10;     // CS
const int clock = 13;     // SCK
 
MaxMatrix m(data, load, clock, maxDisplays);
// Data array is stored in program memory (see memcpy_P for access).
// Parameters are width, height, character data...
// There is a speed improvement for characters with height 8 bits see lib.

PROGMEM const unsigned char CH[] = {
3, 8, B0000000, B0000000, B0000000, B0000000, B0000000, // space
1, 8, B1011111, B0000000, B0000000, B0000000, B0000000, // !
3, 8, B0000011, B0000000, B0000011, B0000000, B0000000, // "
5, 8, B0010100, B0111110, B0010100, B0111110, B0010100, // #
4, 8, B0100100, B1101010, B0101011, B0010010, B0000000, // $
5, 8, B1100011, B0010011, B0001000, B1100100, B1100011, // %
5, 8, B0110110, B1001001, B1010110, B0100000, B1010000, // &
1, 8, B0000011, B0000000, B0000000, B0000000, B0000000, // '
3, 8, B0011100, B0100010, B1000001, B0000000, B0000000, // (
3, 8, B1000001, B0100010, B0011100, B0000000, B0000000, // )
5, 8, B0101000, B0011000, B0001110, B0011000, B0101000, // *
5, 8, B0001000, B0001000, B0111110, B0001000, B0001000, // +
2, 8, B10110000, B1110000, B0000000, B0000000, B0000000, // ,
4, 8, B0001000, B0001000, B0001000, B0001000, B0000000, // -
2, 8, B1100000, B1100000, B0000000, B0000000, B0000000, // .
4, 8, B1100000, B0011000, B0000110, B0000001, B0000000, // /
4, 8, B0111110, B1000001, B1000001, B0111110, B0000000, // 0
3, 8, B1000010, B1111111, B1000000, B0000000, B0000000, // 1
4, 8, B1100010, B1010001, B1001001, B1000110, B0000000, // 2
4, 8, B0100010, B1000001, B1001001, B0110110, B0000000, // 3
4, 8, B0011000, B0010100, B0010010, B1111111, B0000000, // 4
4, 8, B0100111, B1000101, B1000101, B0111001, B0000000, // 5
4, 8, B0111110, B1001001, B1001001, B0110000, B0000000, // 6
4, 8, B1100001, B0010001, B0001001, B0000111, B0000000, // 7
4, 8, B0110110, B1001001, B1001001, B0110110, B0000000, // 8
4, 8, B0000110, B1001001, B1001001, B0111110, B0000000, // 9
2, 8, B01010000, B0000000, B0000000, B0000000, B0000000, // :
2, 8, B10000000, B01010000, B0000000, B0000000, B0000000, // ;
3, 8, B0001000, B0010100, B0100010, B0000000, B0000000, // <
3, 8, B0010100, B0010100, B0010100, B0000000, B0000000, // =
3, 8, B0100010, B0010100, B0001000, B0000000, B0000000, // >
4, 8, B0000010, B1011001, B0001001, B0000110, B0000000, // ?
5, 8, B0111110, B1001001, B1010101, B1011101, B0001110, // @
4, 8, B1111110, B0010001, B0010001, B1111110, B0000000, // A
4, 8, B1111111, B1001001, B1001001, B0110110, B0000000, // B
4, 8, B0111110, B1000001, B1000001, B0100010, B0000000, // C
4, 8, B1111111, B1000001, B1000001, B0111110, B0000000, // D
4, 8, B1111111, B1001001, B1001001, B1000001, B0000000, // E
4, 8, B1111111, B0001001, B0001001, B0000001, B0000000, // F
4, 8, B0111110, B1000001, B1001001, B1111010, B0000000, // G
4, 8, B1111111, B0001000, B0001000, B1111111, B0000000, // H
3, 8, B1000001, B1111111, B1000001, B0000000, B0000000, // I
4, 8, B0110000, B1000000, B1000001, B0111111, B0000000, // J
4, 8, B1111111, B0001000, B0010100, B1100011, B0000000, // K
4, 8, B1111111, B1000000, B1000000, B1000000, B0000000, // L
5, 8, B1111111, B0000010, B0001100, B0000010, B1111111, // M
5, 8, B1111111, B0000100, B0001000, B0010000, B1111111, // N
4, 8, B0111110, B1000001, B1000001, B0111110, B0000000, // O
4, 8, B1111111, B0001001, B0001001, B0000110, B0000000, // P
4, 8, B0111110, B1000001, B1000001, B10111110, B0000000, // Q
4, 8, B1111111, B0001001, B0001001, B1110110, B0000000, // R
4, 8, B1000110, B1001001, B1001001, B0110010, B0000000, // S
5, 8, B0000001, B0000001, B1111111, B0000001, B0000001, // T
4, 8, B0111111, B1000000, B1000000, B0111111, B0000000, // U
5, 8, B0001111, B0110000, B1000000, B0110000, B0001111, // V
5, 8, B0111111, B1000000, B0111000, B1000000, B0111111, // W
5, 8, B1100011, B0010100, B0001000, B0010100, B1100011, // X
5, 8, B0000111, B0001000, B1110000, B0001000, B0000111, // Y
4, 8, B1100001, B1010001, B1001001, B1000111, B0000000, // Z
2, 8, B1111111, B1000001, B0000000, B0000000, B0000000, // [
4, 8, B0000001, B0000110, B0011000, B1100000, B0000000, // backslash
2, 8, B1000001, B1111111, B0000000, B0000000, B0000000, // ]
3, 8, B0000010, B0000001, B0000010, B0000000, B0000000, // hat
4, 8, B1000000, B1000000, B1000000, B1000000, B0000000, // _
2, 8, B0000001, B0000010, B0000000, B0000000, B0000000, // `
4, 8, B0100000, B1010100, B1010100, B1111000, B0000000, // a
4, 8, B1111111, B1000100, B1000100, B0111000, B0000000, // b
4, 8, B0111000, B1000100, B1000100, B0000000, B0000000, // c // JFM MOD.
4, 8, B0111000, B1000100, B1000100, B1111111, B0000000, // d
4, 8, B0111000, B1010100, B1010100, B0011000, B0000000, // e
3, 8, B0000100, B1111110, B0000101, B0000000, B0000000, // f
4, 8, B10011000, B10100100, B10100100, B01111000, B0000000, // g
4, 8, B1111111, B0000100, B0000100, B1111000, B0000000, // h
3, 8, B1000100, B1111101, B1000000, B0000000, B0000000, // i
4, 8, B1000000, B10000000, B10000100, B1111101, B0000000, // j
4, 8, B1111111, B0010000, B0101000, B1000100, B0000000, // k
3, 8, B1000001, B1111111, B1000000, B0000000, B0000000, // l
5, 8, B1111100, B0000100, B1111100, B0000100, B1111000, // m
4, 8, B1111100, B0000100, B0000100, B1111000, B0000000, // n
4, 8, B0111000, B1000100, B1000100, B0111000, B0000000, // o
4, 8, B11111100, B0100100, B0100100, B0011000, B0000000, // p
4, 8, B0011000, B0100100, B0100100, B11111100, B0000000, // q
4, 8, B1111100, B0001000, B0000100, B0000100, B0000000, // r
4, 8, B1001000, B1010100, B1010100, B0100100, B0000000, // s
3, 8, B0000100, B0111111, B1000100, B0000000, B0000000, // t
4, 8, B0111100, B1000000, B1000000, B1111100, B0000000, // u
5, 8, B0011100, B0100000, B1000000, B0100000, B0011100, // v
5, 8, B0111100, B1000000, B0111100, B1000000, B0111100, // w
5, 8, B1000100, B0101000, B0010000, B0101000, B1000100, // x
4, 8, B10011100, B10100000, B10100000, B1111100, B0000000, // y
3, 8, B1100100, B1010100, B1001100, B0000000, B0000000, // z
3, 8, B0001000, B0110110, B1000001, B0000000, B0000000, // {
1, 8, B1111111, B0000000, B0000000, B0000000, B0000000, // |
3, 8, B1000001, B0110110, B0001000, B0000000, B0000000, // }
4, 8, B0001000, B0000100, B0001000, B0000100, B0000000, // ~
};

void setup()
{
  m.init();
  m.setIntensity(1); //change brightness biger, brighter
}

// Scrolling Text
char string[] = "<== Emergency EXIT <== ";

void loop()        //Send text
{     

  delay(1000);//delay between messages
  m.shiftLeft(false, true); ==> I try to chage to be SHIFTRIGHT but nothing change
  printStringWithShift(string,100);
}


// Put text on Display
void printCharWithShift(char c, int shift_speed)
{
  if (c < 32) return;
  c -= 32;
  memcpy_P(Buf7219, CH + 7*c, 7);
  m.writeSprite(maxDisplays*8, 0, Buf7219);
  m.setColumn(maxDisplays*8 + Buf7219[0], 0);


  for (int i=0; i<=Buf7219[0]; i++)
  {
    delay(shift_speed);
    m.shiftLeft(false, false); ==> Also try to chage to be SHIFTRIGHT but nothing change
  }
}

void printStringWithShift(char* s, int shift_speed)
{
  while (*s != 0)
  {
    printCharWithShift(*s, shift_speed);
    s++;
  }
}


Help to me, how to change the text to be shift right, up and down please. thanks....

Go Up