Skip to content

Instantly share code, notes, and snippets.

@31415pi
Last active March 7, 2021 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 31415pi/af9190b8fa6c04d390ad479c1682736b to your computer and use it in GitHub Desktop.
Save 31415pi/af9190b8fa6c04d390ad479c1682736b to your computer and use it in GitHub Desktop.
Explorations in light
Shield: https://docs.pixelmatix.com/SmartMatrix/shield-v1.html
Teensy: Version 3.2
Panel: HUB75E  P3-32S-HL1.2 (https://www.aliexpress.com/item/32931309452.html , https://www.ledycx.com/3mm-indoor-module.html )
Cannot find datasheet. Have requested it from supplier. Image of board here: https://i.imgur.com/zPoooRT.jpg
chip: FM6124
I've selected this panel type after setting width and heigh to 64:
const uint8_t kPanelType = SM_PANELTYPE_HUB75_64ROW_MOD32SCAN;
Panel sections:
A 64x16
B 64x16
C 64x16
D 64x16
If we characterize the data that is to be written to the sections as:
a, b, c, d
respectively, then the following behaviour is observed:
A(a)
A(b)
C(c)
C(d)
Physical sections B and C are not being accessed although the software is understanding that there are 64 rows in 4 chunks.
**Perhaps it is only 2 physical sections(32 row each) and it is configured for 4 (16 row each)
This line doesnt seem to make a difference.
#define USE_ADAFRUIT_GFX_LAYERS
MultiRowRefreshMapping.ino
#include <MatrixHardware_Teensy3_ShieldV1toV3.h>    // SmartMatrix Shield for Teensy 3 V1-V3
#if (SKETCH_MODE == MODE_MAP_REVERSE_ENGINEERING)
const uint16_t kMatrixWidth = 64;        // must be multiple of 8
const uint16_t kMatrixHeight = 64;
const uint8_t kPanelType = SM_PANELTYPE_HUB75_64ROW_MOD32SCAN;  
#endif
delay(25);  
Result: Pixel maps across left to right with 1 color pixel PER ROW and skips over the B and D sections. RED PURPLE YELLOW WHITE.
I just noticed that it is doing Aa Ab Cc Cd as described above. I wonder...
VIDEO: https://imgur.com/dqrQRBB
Following the instructions and setting:
#if (SKETCH_MODE == MODE_MAP_REVERSE_ENGINEERING)
const uint16_t kMatrixWidth = 1024; // must be multiple of 8 ***** (64*64)/4 = 1024
const uint16_t kMatrixHeight = 4;
/*either:*/ //const uint8_t kPanelType = SM_PANELTYPE_HUB75_4ROW_MOD2SCAN; // Use this to reverse engineer mapping for a MOD2 panel
/*or:*/ const uint8_t kPanelType = SM_PANELTYPE_HUB75_8ROW_MOD4SCAN; // Use this to reverse engineer mapping for a MOD4 panel
#endif
Result:
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Mawlxee\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Mawlxee\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Mawlxee\Documents\Arduino\libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10813 -build-path C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262 -warnings=all -build-cache C:\Users\Mawlxee\AppData\Local\Temp\arduino_cache_187770 -verbose S:\PERSONAL PROJECTS\64x64 led\MultiRowRefreshMapping\MultiRowRefreshMapping.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Mawlxee\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Mawlxee\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Mawlxee\Documents\Arduino\libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10813 -build-path C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262 -warnings=all -build-cache C:\Users\Mawlxee\AppData\Local\Temp\arduino_cache_187770 -verbose S:\PERSONAL PROJECTS\64x64 led\MultiRowRefreshMapping\MultiRowRefreshMapping.ino
Using board 'teensy31' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
Using core 'teensy3' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for MatrixHardware_Teensy3_ShieldV1toV3.h: [SmartMatrix@4.0.3]
ResolveLibrary(MatrixHardware_Teensy3_ShieldV1toV3.h)
-> candidates: [SmartMatrix@4.0.3]
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Users\\Mawlxee\\Documents\\Arduino\\libraries\\SmartMatrix\\src" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
-> candidates: [SPI@1.0]
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Users\\Mawlxee\\Documents\\Arduino\\libraries\\SmartMatrix\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\CircularBuffer_SM.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_apple4x6_256.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_apple5x7_256.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_apple6x10.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_apple8x13.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_gohufont6x11.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_gohufont6x11b.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Font_tom_thumb.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\Layer.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\MatrixEsp32Hub75Calc.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\MatrixFont.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\MatrixPanelMaps.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\MatrixTeensy3Hub75Refresh.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\MatrixTeensy4Apa102Refresh.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\MatrixTeensy4Hub75Refresh.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\esp32_i2s_parallel.c
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\lib\FlexIO_t4\FlexIOSPI.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\lib\FlexIO_t4\FlexIO_t4.cpp
Using cached library dependencies for file: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src\lib\FlexIO_t4\FlexSerial.cpp
Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI\SPI.cpp
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Users\\Mawlxee\\Documents\\Arduino\\libraries\\SmartMatrix\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp" -o "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/precompile_helper" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy3" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy3" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262/pch/Arduino.h" -o "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262/pch/Arduino.h.gch"
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\pch\Arduino.h.gch
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262/pch" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Users\\Mawlxee\\Documents\\Arduino\\libraries\\SmartMatrix\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp" -o "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp.o"
In file included from S:\PERSONAL PROJECTS\64x64 led\MultiRowRefreshMapping\MultiRowRefreshMapping.ino:82:0:
C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src/MatrixHardware_Teensy3_ShieldV1toV3.h:29:17: note: #pragma message: MatrixHardware: SmartMatrix Shield for Teensy 3 V1-V3
#pragma message "MatrixHardware: SmartMatrix Shield for Teensy 3 V1-V3"
^
In file included from S:\PERSONAL PROJECTS\64x64 led\MultiRowRefreshMapping\MultiRowRefreshMapping.ino:86:0:
C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src/SmartMatrix.h:40:21: note: #pragma message: SmartMatrix Library version 4.000.003
# pragma message "SmartMatrix Library version 4.000.003"
^
In file included from C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src/SmartMatrix.h:213:0,
from S:\PERSONAL PROJECTS\64x64 led\MultiRowRefreshMapping\MultiRowRefreshMapping.ino:86:
C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src/MatrixTeensy3Hub75Calc_Impl.h: In static member function 'static void SmartMatrixHub75Calc<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::loadMatrixBuffers48(SmartMatrixHub75Calc<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::rowDataStruct*, unsigned char, RGB_TEMP) [with RGB_TEMP = rgb48; int refreshDepth = 36; int matrixWidth = 1024; int matrixHeight = 4; unsigned char panelType = 4u; long unsigned int optionFlags = 0ul; SmartMatrixHub75Calc<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::rowDataStruct = SmartMatrixHub75Refresh<36, 1024, 4, 4u, 0ul>::rowDataStruct]':
C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src/MatrixTeensy3Hub75Calc_Impl.h:489:17: warning: iteration 512u invokes undefined behavior [-Waggressive-loop-optimizations]
r0 = tempRow0[ind].red;
^
C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix\src/MatrixTeensy3Hub75Calc_Impl.h:465:13: note: containing loop
for(int k=0; k < numPixelsToMap; k++) {
^
Compiling libraries...
Compiling library "SmartMatrix"
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_apple6x10.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_apple8x13.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_tom_thumb.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_apple4x6_256.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_apple5x7_256.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\esp32_i2s_parallel.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_gohufont6x11b.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Font_gohufont6x11.c.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\CircularBuffer_SM.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\MatrixEsp32Hub75Calc.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\MatrixFont.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\MatrixPanelMaps.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\Layer.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\MatrixTeensy4Apa102Refresh.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\MatrixTeensy3Hub75Refresh.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\MatrixTeensy4Hub75Refresh.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\lib\FlexIO_t4\FlexIOSPI.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\lib\FlexIO_t4\FlexIO_t4.cpp.o
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SmartMatrix\lib\FlexIO_t4\FlexSerial.cpp.o
Compiling library "SPI"
Using previously compiled file: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262\libraries\SPI\SPI.cpp.o
Compiling core...
Using precompiled core: C:\Users\Mawlxee\AppData\Local\Temp\arduino_cache_187770\core\core_teensy_avr_teensy31_usb_serial,speed_96,opt_o2std,keys_en-us_4939f5412a75a8560acb0f9e98268f02.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1608850460 "-TC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3/mk20dx256.ld" -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -o "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262/MultiRowRefreshMapping.ino.elf" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_apple4x6_256.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_apple5x7_256.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_apple6x10.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_apple8x13.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_gohufont6x11.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_gohufont6x11b.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Font_tom_thumb.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\esp32_i2s_parallel.c.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\CircularBuffer_SM.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\Layer.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\MatrixEsp32Hub75Calc.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\MatrixFont.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\MatrixPanelMaps.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\MatrixTeensy3Hub75Refresh.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\MatrixTeensy4Apa102Refresh.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\MatrixTeensy4Hub75Refresh.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\lib\\FlexIO_t4\\FlexIOSPI.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\lib\\FlexIO_t4\\FlexIO_t4.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SmartMatrix\\lib\\FlexIO_t4\\FlexSerial.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262/..\\arduino_cache_187770\\core\\core_teensy_avr_teensy31_usb_serial,speed_96,opt_o2std,keys_en-us_4939f5412a75a8560acb0f9e98268f02.a" "-LC:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262" -larm_cortexM4l_math -lm -lstdc++
c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\Mawlxee\AppData\Local\Temp\arduino_build_485262/MultiRowRefreshMapping.ino.elf section `.bss' will not fit in region `RAM'
c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 20108 bytes
collect2.exe: error: ld returned 1 exit status
Using library SmartMatrix at version 4.0.3 in folder: C:\Users\Mawlxee\Documents\Arduino\libraries\SmartMatrix
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Error compiling for board Teensy 3.2 / 3.1.
Attempted this configuration:
const uint16_t kMatrixWidth = 1024; // must be multiple of 8
const uint16_t kMatrixHeight = 4;
const uint8_t kPanelType = SM_PANELTYPE_HUB75_64ROW_MOD32SCAN;
Result: Blank
Attempted this configuration:
const uint16_t kMatrixWidth = 512; // must be multiple of 8
const uint16_t kMatrixHeight = 8;
//const uint8_t kPanelType = SM_PANELTYPE_HUB75_64ROW_MOD32SCAN;
//const uint8_t kPanelType = SM_PANELTYPE_HUB75_4ROW_MOD2SCAN; // Use this to reverse engineer mapping for a MOD2 panel
const uint8_t kPanelType = SM_PANELTYPE_HUB75_8ROW_MOD4SCAN; // Use this to reverse engineer mapping for a MOD4 panel
#endif
Result: rightmost area in A and C in a 3x4 section are whiteish, and pixels scroll horizontally in an 1:4 row write:pause demeanor.
(vs say 1:3 which would make sense)
I now notice in MatrixPanelMaps.cpp there is NO map entry corresponding to:
SM_PANELTYPE_HUB75_64ROW_MOD32SCAN;
aka:
const PanelMappingEntry panelMap64x64Mod2[]
const PanelMappingEntry panelMap64x64Mod4[]
In any sketch changing kMatrixHeight to any other value than 64 results in blank screen.
Changing kMatrixWidth results in splitting the width of the display and mirroring things across both horizontal sections.
Changing width to 128 results in a fail to compile:"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY32 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Users\\Mawlxee\\Documents\\Arduino\\libraries\\SmartMatrix\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Mawlxee\\AppData\\Local\\Temp\\arduino_build_485262\\sketch\\MultiRowRefreshMapping.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Exception 0x8b04488b 0xccccccd5 0x8b64cccc 0x4013
PC=0x4013
runtime: unknown pc 0x4013
stack: frame={sp:0x0, fp:0x0} stack=[0x1204e000,0x12050000)
runtime: unknown pc 0x4013
stack: frame={sp:0x0, fp:0x0} stack=[0x1204e000,0x12050000)
eax     0x1e09f800
ebx     0xd8003ffd
ecx     0x3ffef974
edx     0x14253df7
edi     0x99999800
esi     0x99999999
ebp     0xd47368eb
esp     0x0
eip     0x4013
eflags  0x0
cs      0x0
fs      0x4800ffff
gs      0x0
C:\Program Files (x86)\Arduino\arduino-builder returned 2
Error compiling for board Teensy 3.2 / 3.1.
@netmindz
Copy link

netmindz commented Mar 7, 2021

I think you will struggle with a teensy 3.2, I had very limited success with my 3.2 doing any smartmatrix stuff with my 64x64 setup. Better with my Teensy 3.5 but really best to use the Teensy 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment