MajicDesigns / MD_MAX72XX

LED Matrix Library
GNU Lesser General Public License v2.1
307 stars 122 forks source link

running this code the return value is sometimes false #60

Closed dowdeswells closed 9 months ago

dowdeswells commented 9 months ago

https://github.com/MajicDesigns/MD_MAX72XX/blob/040927009c55a1e2395bb4254f9280129f93fd59/examples/MD_MAX72xx_Pacman/MD_MAX72xx_Pacman.ino#L120

thanks for writing this ... just fyi when running this program the calls to set column sometimes return false when idx-DATA_WIDTH = 65501 to 65535 ( i am running on an Arduino UNO R4 WiFi) ... this is the first example i looked at and im trying to figure out if you intended to use this range

MajicDesigns commented 9 months ago

This could be a signed/unsigned od 16/8 bit thing happening. What CPU? What type of LED matrix? How many matrix modules are you using?

dowdeswells commented 9 months ago

im running the code on an Arduino UNO R4 Wifi Board ... chip R7FA4M1AB3CFM Ive connected the one module directly to the UNO's GPIO 10,11 and 13 (also 5V and GND) That module is an 8x8 (has code 1088AS written on the side) with its own CHIP: MAX7219CNG (also has text HLF and 22A8 written on it)

MajicDesigns commented 9 months ago

With only one LED module you should never see such big numbers unless you are displaying a negative signed integer as unsigned. The library blocks all out of bounds coordinates and would return false in that case.