board707 / dmd_stm32 Goto Github PK
View Code? Open in Web Editor NEWSTM32Duino library for RGB, Monochrome and Two-color led matrix panels
License: GNU General Public License v3.0
STM32Duino library for RGB, Monochrome and Two-color led matrix panels
License: GNU General Public License v3.0
I am using STM32F401RC6 controller and this core https://github.com/stm32duino/Arduino_Core_STM32
not sure why below compilation error comes
arduino-cli compile -b STMicroelectronics:stm32:GenF4 dmd_monochrome
In file included from C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.h:24,
from C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:9:
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:235:40: error: 'voidFuncPtr' has not been declared
235 | virtual void initialize_timers(voidFuncPtr handler);
| ^~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:264:9: error: 'PortType' does not name a type
264 | PortType clk_clrmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:265:9: error: 'PortType' does not name a type
265 | PortType clkmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:275:9: error: 'OE_PWM_Polarity' does not name a type
275 | OE_PWM_Polarity OE_polarity = OE_PWM_POSITIVE;
| ^~~~~~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp: In constructor 'DMD_RGB_BASE::DMD_RGB_BASE(byte, uint8_t*, byte, byte, uint8_t*, byte, byte, bool, uint8_t, uint8_t, byte, byte)':
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:32:9: error: 'OE_polarity' was not declared in this scope
32 | OE_polarity = OE_PWM_NEGATIVE;
| ^~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:32:23: error: 'OE_PWM_NEGATIVE' was not declared in this scope
32 | OE_polarity = OE_PWM_NEGATIVE;
| ^~~~~~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp: In member function 'virtual void DMD_RGB_BASE::init(uint16_t)':
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:167:27: error: invalid conversion from 'void ()()' to 'int' [-fpermissive]
167 | initialize_timers(scan_running_dmd_R);
| ^~~~~~~~~~~~~~~~~~
| |
| void ()()
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:235:52: note: initializing argument 1 of 'virtual void DMD::initialize_timers(int)'
235 | virtual void initialize_timers(voidFuncPtr handler);
| ~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.cpp:27:
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:235:40: error: 'voidFuncPtr' has not been declared
235 | virtual void initialize_timers(voidFuncPtr handler);
| ^~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:264:9: error: 'PortType' does not name a type
264 | PortType clk_clrmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:265:9: error: 'PortType' does not name a type
265 | PortType clkmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:275:9: error: 'OE_PWM_Polarity' does not name a type
275 | OE_PWM_Polarity OE_polarity = OE_PWM_POSITIVE;
| ^~~~~~~~~~~~~~~
Used library Version Path
SPI 1.0.0 C:\Users\Phalguni\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0\libraries\SPI
SrcWrapper 1.0.1 C:\Users\Phalguni\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0\libraries\SrcWrapper
Used platform Version Path
STMicroelectronics:stm32 2.6.0 C:\Users\Phalguni\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0
Error during build: exit status 1
Hi , first of all I want to thank you for DMD_STM32.
I've seen that there is dmd.img in .cpp but I can't figure how to use it. which image format to use? which resolution? ... Can anyone help me with this? Is there any example? Thanks in advance.
hello,
first of all thank you so much for writing such library for stm32.
I am having issue with the code which is written to display steady message at 2nd row and scrolling message at 1st row
at the same time.
i tried this in two ways:
1 ) call draw string to display the string and then call the marquee. it shifts all the display including static message.
`dmd.drawString(0,(DISPLAYS_DOWN - 2)* 16,"SCROLLING",10,GRAPHICS_NORMAL,0); // at 2nd row
dmd.drawMarquee("SCROLLING",10,(32DISPLAYS_ACROSS)-1,DISPLAYS_DOWN - 1) 16); // at 1st row
long prev_step =millis();
boolean ret=false;
while(!ret){
if ((millis() - prev_step) > 50 ) {
ret=dmd.stepMarquee(-1,0);
prev_step=millis();
}
}`
2 ) call the marquee and then draw string to display the string . it shows static message on 2nd row while scrolling message at 1st row but the screen is flickering. i know the reason it is flickering due to marquee is shifting whole screen and i am forcing to display the static message. but i dont know how to solve. please help me.
` dmd.drawMarquee("SCROLLING",10,(32DISPLAYS_ACROSS)-1,DISPLAYS_DOWN - 1) 16); //at 1st row
long prev_step =millis();
boolean ret=false;
while(!ret){
if ((millis() - prev_step) > 50 ) {
ret=dmd.stepMarquee(-1,0);
dmd.drawString(0,(DISPLAYS_DOWN - 2)* 16,"SCROLLING",10,GRAPHICS_NORMAL,0); //at 2nd row
prev_step=millis();
}
}`
video showing two rows but p10 display connected across for testing purpose only.
first row message ABC
second row message "1" static and other scrolling "SCROLLING"
I have not found any information on connecting the latch pin, I would like to see where to define this pin in the documentation. Is there any example where the Latch pin is overridden?
Library version: 1.01
Platform: STM32
MCU board: blackpil STM32F103C8T6
Connections: used pins
DMD_PIN_A PB6
DMD_PIN_B PB5
DMD_PIN_nOE PB0
DMD_PIN_SCLK PB7
CLK:PA6 R1:PA0 G1:PA1 B1:PA2 R2:PA3 G2:PA4 B2:PA5
I got an output while using parallel library but when it comes to spi library I didn't get anything in my p10 panel
Add libraries for esp32, esp8266 and arduino. Many users use the board
Library does support drawing rectangles: void drawFilledBox(int x1, int y1, int x2, int y2, uint16_t color);
, but doesn't support drawing circles yet. So I came up with this solution:
typedef struct vec2 { int16_t x, y; } vec2;
typedef uint16_t Rgb565;
...
static void put_circle(vec2 center, int16_t r, Rgb565 color) {
for (vec2 pos = { center.x - r, center.y - r }; pos.y < center.y + r; pos.y ++)
for (pos.x = center.x - r; pos.x < center.x + r; pos.x ++)
(void)((distance(pos, center) < r) && (*get_screen(pos) = color));
}
Assuming blue background, put_circle((vec2){5, 5}, 5, 0xf81f);
produces this:
It would be nice to have such function in a library as a method like drawFilledBox()
Found numerous artefacts and flickering in Monochrome Parallel mode on boards STM32F401 & F411 in 0.8.0 - 0.9.0 releases.
Debugging in progress, Use Monochrome SPI mode for now.
Hi there,
Could I use RP2004 framework based on PlatformIO?
hi sir
this new p10 module qiangli 1/4 th scan
/*--------------------------------------------------------------------------------------
Demo for RGB panels
DMD_STM32a example code for STM32 and RP2040 boards
Pattern test for 32x16 1/2 1/4 RGB panels
------------------------------------------------------------------------------------- */
#include "DMD_RGB.h"
//Number of panels in x and y axis
#define RGB32x16plainS4 2,32,16,4,1
//#define RGB32x32_S8_maxmurugan2 3,40,20,5,1 // 32x32 1/8
//#define RGB32x32_S8_maxmurugan3 3,32,32,8,1 // 32x32 1/8
//#define RGB32x32_S8_maxmurugan4 3,32,32,8,2 // 32x32 1/8
//#define RGB32x32_S8_maxmurugan5 3,32,32,8,33 // 32x32 1/8
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
// Output buffering - false
#define ENABLE_DUAL_BUFFER false
// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A 6
#define DMD_PIN_B 7
#define DMD_PIN_C 8
#define DMD_PIN_D 9
#define DMD_PIN_E 10
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };
#define DMD_PIN_nOE 15
#define DMD_PIN_SCLK 12
uint8_t custom_rgbpins[] = { 11, 16,17,18,19,20,21 }; // CLK, R0, G0, B0, R1, G1, B1
//DMD_RGB <RGB32x32_S8_maxmurugan2, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
DMD_RGB_SHIFTREG_ABC <RGB32x16plainS4, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
uint16_t bg = 0; // background - black
uint16_t fg = 0; // foreground
void setup(void)
{
dmd.init();
fg = dmd.Color888(0, 0, 255);
dmd.setBrightness(50);
}
void loop(void) {
// fill the matrix with points row by row
for (int i = 0; i < dmd.height(); i++) {
for (int j = 0; j < dmd.width(); j++) {
dmd.drawPixel(j,i, fg);
delay(40);
}
}
// clear the screen
dmd.fillScreen(bg);
}
char s[] = "welcome to board707 abcdefghijklmnopqrstuvwxyz";
dmd.drawString(0,a10,strlen(a10),col[4]);
fill first line remaining char go to next line automatically
how to program ?
please help sir
/*--------------------------------------------------------------------------------------
Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
------------------------------------------------------------------------------------- */
#include "DMD_RGB.h"
// Fonts includes
#include "st_fonts/SystemFont5x7.h"
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Woverflow"
//Number of panels in x and y axis
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
char a[10];
char b[10];
// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER false
#if (defined(STM32F1) || defined(STM32F4))
// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A PB6
#define DMD_PIN_B PB5
#define DMD_PIN_C PB4
#define DMD_PIN_D PB3
#define DMD_PIN_E PB8
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };
// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE PB0
#define DMD_PIN_SCLK PB7
// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = {PA6, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
#elif (defined(ARDUINO_ARCH_RP2040))
// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A 6
#define DMD_PIN_B 7
#define DMD_PIN_C 8
#define DMD_PIN_D 9
#define DMD_PIN_E 10
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };
// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE 15
#define DMD_PIN_SCLK 12
// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.2
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = { 11, 16,17,18,19,20,21 }; // CLK, R0, G0, B0, R1, G1, B1
#endif
// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB <RGB32x16plainS8 , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
// - 32x16 matrix with 8scans
// - 80x40 matrix with 20scans
// - 64x64 matrix with 32scans
// Color depth - <COLOR_4BITS> or <COLOR_1BITS>
// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font Arial_black(SystemFont5x7);
// GFX font with sepatate parts for Latin and Cyrillic chars
//DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b, (uint8_t*)&GlametrixLight12pt8b_rus, 0x80, 13);
/*--------------------------------------------------------------------------------------
UTF8 char recoding
/--------------------------------------------------------------------------------------
setup
Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------/
// create foreground colors
uint16_t col[] = {
dmd.Color888(255,0, 0), // red
dmd.Color888(0, 255, 0), // green
dmd.Color888(0, 0, 255), // blue
dmd.Color888(0, 255, 255), // blue
dmd.Color888(0, 0, 0), // blue
};
void setup(void)
{
// initialize DMD objects
dmd.init();
Serial.begin(9600);
Serial.println("PICO P4 RTC");
delay(1000);
}
/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------/
void loop(void)
{
dmd.selectFont(&Arial_black);
dmd.setBrightness(255);
dmd.setTextColor(00, 0);
while (1)
{
dmd.drawString(0,0,"PLAN",4,col[1]);
dmd.drawString(0,8,"ACTAL",6,col[2]);
dmd.drawString(0,16,"GAP",3,col[0]);
dmd.drawString(0,24,"EFFY",4,col[1]);
}
}
Originally posted by @OkSingra in #27 (comment)
https://youtu.be/FO7wHBfsk_8
Does not work. Now I'm trying to get another panel.
https://youtu.be/ELxcs0bZFr8 This another panel
Please contact me via telegram @Hiderstv
It seems I have a bunch of panels that have R and B channels swapped. Is there a convenient way to use such panels with this library?
Hello, I use your library all the time.
There is no problem with green color when using a 2x2 P5 panel
I'm having trouble with panels turning green in 4x4 applications
There is no problem with other colors
my card is stmf4 black
I would be happy if you help me
I just follow the wiki Connections Monochrome and use Arduino Pico to follow the pin connections in the example dmd_monochrome.
When I use the connection shown in the diagram below and upload the code, the LED screen does not work and remains black.
SO, where is the problem please?
First of all, thank you for your great work!
At the beginning I tried your dmd_rgb example and it worked fine. Then tried to experiment with it. I would like to use an RTOS task to generate images at the background (as I did on ESP32). Here a big problem arose: if I include the FreeRTOS.h the matrix stops working. (even if there is no tasks created, just the include) I presume the two libraries both try to use some same resources (timer?) which causes the conflict. I am afraid that my knowledgeat the moment is still not enough to find the exact reason. Maybe you can find and correct it easily. If it would be a too big work, then please take it as a feature request for the future.
I'm having a problem using an RGB (16*32) 1/4 Scan panel with this Library with no succes , the RGB panel has the snake pattern.
are you working to implement this feature or not? if not please can you do it and thanks in advance.
I tried to read the code but didn't understand most of it.
thankyou.
I have a p5 32x64 1/8 color scanning screen, I used your patterns, but I was not successful, can you help me?
`#define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID
#define RGB64x32_S8_OKSingra 3,64,32,8,1
// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB <RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
// - 32x16 matrix with 8scans
// - 80x40 matrix with 20scans
// - 64x64 matrix with 32scans
// Color depth - <COLOR_4BITS_Packed>, <COLOR_4BITS> or <COLOR_1BITS>
// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font UkrRusArial_F(UkrRusArial_14);
// GFX font with sepatate parts for Latin and Cyrillic chars
DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b, (uint8_t*)&GlametrixLight12pt8b_rus, 0x80, 13);
/*--------------------------------------------------------------------------------------
UTF8 char recoding
--------------------------------------------------------------------------------------/
int utf8_rus(char dest, const unsigned char* src) {
uint16_t i, j;
for (i = 0, j = 0; src[i]; i++) {
if ((src[i] == 0xD0) && src[i + 1]) { dest[j++] = src[++i] - 0x10; }
else if ((src[i] == 0xD1) && src[i + 1]) { dest[j++] = src[++i] + 0x30; }
else dest[j++] = src[i];
}
dest[j] = '\0';
return j;
}
/--------------------------------------------------------------------------------------
setup
Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------/
void setup(void)
{
// initialize DMD objects
dmd.init();
}
/*--------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------*/
void loop(void) {
uint16_t bg = 0; // background - black
uint16_t fg = dmd.Color888(0, 255, 0);; // foreground
// draw pixels
for (int i = 0; i < dmd.height(); i++) {
for (int j = 0; j < dmd.width(); j++) {
dmd.drawPixel(j,i, fg);
delay(30);
}
}
// clear the screen
dmd.fillScreen(bg);
}`
the most i could do
https://user-images.githubusercontent.com/4962604/206518659-8ec8b6a9-5f3e-4be5-b5e8-e4a5775daa9a.MOV
/*--------------------------------------------------------------------------------------
Demo code for DMD panels
DMD_STM32a example code for STM32F103xxx board
------------------------------------------------------------------------------------- /
// choose between Parallel ans SPI wiring
// comment line below for SPI connection
#include <RTClock.h>
#define DMD_PARA
/--------------------------------------------------------------------------------------
Includes
--------------------------------------------------------------------------------------*/
#if defined(DMD_PARA)
#include "DMD_Monochrome_Parallel.h"
#else
#include "DMD_MonoChrome_SPI.h"
#endif
// Fonts includes
#include "st_fonts/SystemFont5x7.h"
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Woverflow"
#include "gfx_fonts/GlametrixLight12pt7b.h"
#include "gfx_fonts/GlametrixBold12pt7b.h"
#pragma GCC diagnostic warning "-Wnarrowing"
#pragma GCC diagnostic warning "-Woverflow"
//Number of panels in x and y axis
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER true
// ----- Select pins for P10 matrix connection ------------
// pins A, B, SCLK may be any digital I/O, pin nOE should be Timer3 PWM pin as PB0,PB1
// if connect as SPI, do not use corresponding MiSO pin - PA6 for SPI1 and PB14 for SPI2
#define DMD_PIN_A PA0
#define DMD_PIN_B PA1
#define DMD_PIN_nOE PB1
//#define DMD_PIN_nOE PA6
#define DMD_PIN_SCLK PA2
//#define DMD_PIN_SCLK PB4
// pins for SPI connect
// SPI specific pins as CLK and R_DATA has predefined values:
// for SPI(1) CLK = PA5 R_DATA = PA7
// for SPI(2) CLK = PB13 R_DATA = PB15
// --------------------------------------------------------
//=== Config for Parallel connect ====
#if defined(DMD_PARA)
//pins for rows at x axis
// example for two rows
// all those pins must be selected from same port!
uint8_t pins[] = { PA5, PA6, PA7 }; // CLK , row1, row 2
//Fire up the DMD object as dmd
DMD_Monochrome_Parallel dmd(DMD_PIN_A, DMD_PIN_B, DMD_PIN_nOE, DMD_PIN_SCLK, pins, DISPLAYS_ACROSS, DISPLAYS_DOWN,ENABLE_DUAL_BUFFER);
#else
//=== Config for SPI connect ====
SPIClass dmd_spi(1);
DMD_MonoChrome_SPI dmd(DMD_PIN_A, DMD_PIN_B, DMD_PIN_nOE, DMD_PIN_SCLK, DISPLAYS_ACROSS, DISPLAYS_DOWN, dmd_spi, ENABLE_DUAL_BUFFER);
#endif
// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font UkrRusArial_F(SystemFont5x7);
// GFX font with sepatate parts for Latin and Cyrillic chars
DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b,(uint8_t*)&GlametrixLight12pt8b_rus,0x80,13);
RTClock rt (RTCSEL_LSE); // initialise
uint32 tt;
byte Sop_packet =0;
int str =0;
char Serial_data[250];
const unsigned int Message_length =100;
char* m = "MAXTEQ";
char k[100];
/*--------------------------------------------------------------------------------------
UTF8 char recoding
--------------------------------------------------------------------------------------/
int utf8_rus(char dest, const unsigned char* src) {
uint16_t i, j;
for ( i =0, j =0; src[i]; i++) {
if ((src[i] == 0xD0 )&& src[i+1]) { dest[j++] = src[++i] - 0x10;}
else if ((src[i] == 0xD1 )&& src[i+1]) {dest[j++] = src[++i] + 0x30; }
else dest[j++] = src[i];
}
dest[j] ='\0';
return j;
}
/--------------------------------------------------------------------------------------
setup
Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------/
void setup(void)
{
// initialize DMD objects
// scan DMD row each 700 us
dmd.init(700);
dmd.setBrightness(80);
Serial.begin(9600);
Serial.print("1236523442");
}
/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------/
void loop(void)
{
// m[] = "MAXTEQ";
// text
// transcode message to UTF for use with GFX fonts
utf8_rus(k, (const unsigned char* )m);
// but initially select standard font
dmd.selectFont(&UkrRusArial_F);
// shift steps in pixels for running text (positive - shift right, negative - left)
int8_t step[] = { 1,-1,-2,2 };
// running text shift interval
uint16_t interval = 35;
long prev_step = millis();
uint8_t i = 0, b = 0;
uint8_t test = 255;
uint8_t test_cnt = 4;
// Cycle for tests:
// -- running texts moving at x and y axis with single and double speed
// -- brightness control
// -- vertical scrolling message
while (1) {
Get_Rtc_Time();
while(Serial.available()>0)
{
static char Message[Message_length];
static unsigned int Message_pos = 0;
char inByte = Serial.read();
//message comming in
if(inByte != '\n' && Sop_packet ==1)
{
//add in coming byte in our message
Message[Message_pos] = inByte;
Message_pos++;
}
//full message received
else
{
//add null char to string
Message[Message_pos] = '\0';
if(Message_pos>0)
{
m = Message;
utf8_rus(k, (const unsigned char*)m);
Serial.print(m);
}
Message_pos =0 ;
Sop_packet =0;
}
if(inByte == '[')Sop_packet =1;
}
char buf[10];
sprintf(buf,"%5d",tt);
dmd.drawString(2,0,buf,sizeof(buf),1); //- fixed messAGE USED FOR CLOCK OR DATE USING DS3231
if ((millis() - prev_step) > interval) {
if (dmd.stepMarquee(-1, 0) & 1) { // if text is reached screen bounds
dmd.clearScreen(true);
//dmd.drawMarquee(m, strlen(m), dmd.width()-10,(dmd.height() > 0)? 16 : 0, 1);
dmd.selectFont(&UkrRusArial_F);
dmd.drawMarquee(k, strlen(k), dmd.width() - 1, 8, 1);
}
dmd.swapBuffers(true);
prev_step = millis();
}
}
}
void Get_Rtc_Time()
{
if (rt.getTime()!=tt)
{
tt = rt.getTime();
Serial.print("time is: ");
Serial.println(tt);
}
}
Originally posted by @maxmurugan in #18 (comment)
Hello !
Thanks you for this great library.
I have a problem with a P8 Outdoor display, everything seems to works fine, but, I can't have low colors for each pixels on the display.
It's like, when I'm making a RGB color of (15,15,15), the display is black instead of displaying the leds with low brightness. I can have low brightness on the panel by lowering the global brightness of the display, but I want to have low brightness for each pixel individually.
Maybe it's because of the color storage of 4 bits per channels ? So I if want to have high contrast it's not possible ?
Is there any workaround ?
Thanks you !
hi sir,
I am using 3 modules p6 32x32
one module working good
add more than one module scrolling only working one module
//////CODE///////
#include <DMD_STM32.h>
//#include "st_fonts/SystemFont5x7.h"
#include "st_fonts/Arial_Black_16_ISO_8859_1.h"
#include "gfx_fonts/GlametrixLight12pt7b.h"
#include "gfx_fonts/GlametrixBold12pt7b.h"
// We'll use SPI 2
SPIClass dmd_spi(1);
//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
// ----- Select pins for P10 matrix connection ------------
// pins A, B, SCLK may be any digital I/O, pin nOE should be PWM pin as PB1,PA8
// SPI specific pins as CLK and R_DATA has predefined values:
// for SPI(1) CLK = PA5 R_DATA = PA7
// for SPI(2) CLK = PB13 R_DATA = PB15
// --------------------------------------------------------
#define DMD_PIN_A PB11
#define DMD_PIN_B PB12
#define DMD_PIN_nOE PB1
#define DMD_PIN_SCLK PB10
DMD dmd(DMD_PIN_A, DMD_PIN_B, DMD_PIN_nOE, DMD_PIN_SCLK, DISPLAYS_ACROSS, DISPLAYS_DOWN, dmd_spi );
// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font UkrRusArial_F(Arial_Black_16_ISO_8859_1);
// GFX font with sepatate parts for Latin and Cyrillic chars
//DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b,(uint8_t*)&GlametrixLight12pt8b_rus,0x80,13);
DMD_GFX_Font GlametrixBold((uint8_t*)&GlametrixBold12pt7b,(uint8_t*)&GlametrixBold12pt8b_rus, 0x80, 13);
/-------------------------------------------------------------------------------------
setup
Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------/
void setup(void)
{
dmd.init();
dmd.clearScreen( true ); //true is normal (all pixels off), false is negative (all pixels on)
// set matrix brightness (0-255)
dmd.setBrightness(80);
}
/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------/
void loop(void)
{
dmd.selectFont(&UkrRusArial_F);
const char MSG = "Fran""\xe7""ais, ""\xd6""sterreich, Magyarorsz""\xe1""g";
dmd.drawMarquee(MSG,strlen(MSG),(32DISPLAYS_ACROSS)-1,0);
long start=millis();
long timer=start;
while(1){
if ((timer+30) < millis()) {
dmd.stepMarquee(-1,0);
timer=millis();
}
}
}
When I upload code to stm32 nothing is shown. Why?
P.S. I tried to make my own font but the same thing happens.
Thanks in advance.
I connected P6 outdoor LED module with Bluepill STM32 but its showing two line on display
/*--------------------------------------------------------------------------------------
Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
------------------------------------------------------------------------------------- */
#include "DMD_RGB.h"
// Fonts includes
#include "st_fonts/SystemFont5x7.h"
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Woverflow"
//Number of panels in x and y axis
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
char a[10];
char b[10];
// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER false
// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A PB6
#define DMD_PIN_B PB5
#define DMD_PIN_C PB4
#define DMD_PIN_D PB3
#define DMD_PIN_E PB8
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };
// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE PB0
#define DMD_PIN_SCLK PB7
// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = {PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB_SHIFTREG_ABC <RGB32x32_S8_maxmurugan, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
// - 32x16 matrix with 8scans
// - 80x40 matrix with 20scans
// - 64x64 matrix with 32scans
// Color depth - <COLOR_4BITS> or <COLOR_1BITS>
// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font Arial_black(SystemFont5x7);
// GFX font with sepatate parts for Latin and Cyrillic chars
//DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b, (uint8_t*)&GlametrixLight12pt8b_rus, 0x80, 13);
/*--------------------------------------------------------------------------------------
UTF8 char recoding
-------------------------------------------------------------------------------------*/
// create foreground colors
uint16_t col[] = {
dmd.Color888(255,0, 0), // red
dmd.Color888(0, 255, 0), // green
dmd.Color888(0, 0, 255), // blue
dmd.Color888(0, 255, 255), // blue
dmd.Color888(0, 0, 0), // blue
};
void setup(void)
{
Serial.end();
// initialize DMD objects
dmd.init();
Serial.begin(9600);
Serial.println("PICO P4 RTC");
delay(1000);
}
/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------/
void loop(void) {
uint16_t bg = 0; // background - black
uint16_t fg = dmd.Color888(0, 255, 0);; // foreground
// draw pixels
for (int i = 0; i < dmd.height(); i++) {
for (int j = 0; j < dmd.width(); j++) {
dmd.drawPixel(j,i, fg);
delay(30);
}
}
// clear the screen
dmd.fillScreen(bg);
}
Hi sir
I am now using new p6 32x32 matrix with 1/8 scan
please check module picture and code
/*--------------------------------------------------------------------------------------
Demo for RGB panels
DMD_STM32a example code for STM32 and RP2040 boards
Pattern test for 32x16 1/2 1/4 RGB panels
------------------------------------------------------------------------------------- */
#include "DMD_RGB.h"
//Number of panels in x and y axis
#define RGB32x32_S8_maxmurugan 3,32,32,8,1 // 32x32 1/8 matrix from @maxmurugan
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
// Output buffering - false
#define ENABLE_DUAL_BUFFER false
// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A 6
#define DMD_PIN_B 7
#define DMD_PIN_C 8
#define DMD_PIN_D 9
#define DMD_PIN_E 10
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };
#define DMD_PIN_nOE 15
#define DMD_PIN_SCLK 12
uint8_t custom_rgbpins[] = { 11, 16,17,18,19,20,21 }; // CLK, R0, G0, B0, R1, G1, B1
DMD_RGB <RGB32x32_S8_maxmurugan, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
uint16_t bg = 0; // background - black
uint16_t fg = 0; // foreground
void setup(void)
{
dmd.init();
fg = dmd.Color888(0, 0, 255);
dmd.setBrightness(50);
}
void loop(void) {
// fill the matrix with points row by row
for (int i = 0; i < dmd.height(); i++) {
for (int j = 0; j < dmd.width(); j++) {
dmd.drawPixel(j,i, fg);
delay(40);
}
}
// clear the screen
dmd.fillScreen(bg);
}
P10, HUB75, 1/4 scan, outdoor
STM32F103C8 and STM32F401CCU6
DMD_RGB <RGB32x16_S4_BIN, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, 2, 1, false);
for (int i = 0; i < 255; i++)
{
fg = dmd.Color888(i,0,0);
dmd.fillScreen(fg);
delay(5);
}
In this form, the display misses the brightness of the LEDs, because of this there is no smoothness.
The COLOR_8BITS constant do not exist.
In file DMD_RGB.h need parameters in template DMD_RGB_BASE2?
Also in the current version, the led screen does not burn at full brightness. Based on power consumption.
Hello,
I want to use esp8266 and esp32 for monochrome display. please port or tell me how to port the library to esp
I tested with P10RGB and P4RGB working well for using the clock same library will support P10 red module?
Please give the P10 red module support and also explain different scan method
please give me a P10 red module with Pico library.
I TRY YOUR CODE TOP-LINE SCROLLING AND BOTTOM-LINE STRING MESSAGE
HOW TO REMOVE BACKGROUND COLOUR AND FLICKERING?
PLEASE SUGGEST A CODE HERE.
void loop(void)
{
// create foreground colors
uint16_t col[] = {
dmd.Color888(255,0, 0), // red
dmd.Color888(0, 255, 0), // green
dmd.Color888(0, 0, 255) // blue
};
uint16_t bg = 0; // background - black
int col_cnt = 3; // color count
// text
char s[] = " MURUGAN CHENNAI";
// transcode message to UTF for use with GFX fonts
char k[30];
utf8_rus(k, (const unsigned char*)s);
char* m = s;
// select standard font
dmd.selectFont(&UkrRusArial_F);
// set text foreground and background colors
dmd.setTextColor(col[0], bg);
// shift steps in pixels for running text (positive - shift right, negative - left)
// running text shift interval
uint16_t interval = 25;
long prev_step = millis();
dmd.setBrightness(200);
// Cycle for tests:
// -- running texts moving at x and y axis with single and double speed
// -- vertical scrolling message
while (1) {
if ((millis() - prev_step) > interval)
{
dmd.drawString(8,16,"12:34:56",8,col[1]); //- fixed messAGE USED FOR CLOCK OR DATE USING DS3231
if (dmd.stepMarquee(-1, 0) & 1) { // if text is reached screen bounds
dmd.clearScreen(true);
dmd.setTextColor(col[0], bg);
dmd.drawMarqueeX(m, 0,0);
}
// output mem buffer to matrix
dmd.swapBuffers(true);
prev_step = millis();
}
}
}
/*--------------------------------------------------------------------------------------
Demo code for DMD panels
DMD_STM32a example code for STM32F103xxx board
------------------------------------------------------------------------------------- /
// choose between Parallel ans SPI wiring
// comment line below for SPI connection
/--------------------------------------------------------------------------------------
Includes
--------------------------------------------------------------------------------------*/
#include "DMD_Monochrome_Parallel.h"
// Fonts includes
#include "st_fonts/UkrRusArial14.h"
//Number of panels in x and y axis
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 2
// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER true
// ----- Select pins for P10 matrix connection ------------
// pins A, B, SCLK may be any digital I/O, pin nOE should be Timer3 PWM pin as PB0,PB1
// if connect as SPI, do not use corresponding MiSO pin - PA6 for SPI1 and PB14 for SPI2
#define DMD_PIN_A PA1
#define DMD_PIN_B PA4
#define DMD_PIN_nOE PB1
//#define DMD_PIN_nOE PA6
#define DMD_PIN_SCLK PA15
//#define DMD_PIN_SCLK PB4
// pins for SPI connect
// SPI specific pins as CLK and R_DATA has predefined values:
// for SPI(1) CLK = PA5 R_DATA = PA7
// for SPI(2) CLK = PB13 R_DATA = PB15
// --------------------------------------------------------
uint8_t pins[] = { PA5, PA7, PA6 }; // CLK , row1, row 2
//Fire up the DMD object as dmd
DMD_Monochrome_Parallel dmd(DMD_PIN_A, DMD_PIN_B, DMD_PIN_nOE, DMD_PIN_SCLK, pins, DISPLAYS_ACROSS, DISPLAYS_DOWN,ENABLE_DUAL_BUFFER);
// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font UkrRusArial_F(UkrRusArial14);
// GFX font with sepatate parts for Latin and Cyrillic chars
//DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b,(uint8_t*)&GlametrixLight12pt8b_rus,0x80,13);
/*--------------------------------------------------------------------------------------
UTF8 char recoding
--------------------------------------------------------------------------------------/
int utf8_rus(char dest, const unsigned char* src) {
uint16_t i, j;
for ( i =0, j =0; src[i]; i++) {
if ((src[i] == 0xD0 )&& src[i+1]) { dest[j++] = src[++i] - 0x10;}
else if ((src[i] == 0xD1 )&& src[i+1]) {dest[j++] = src[++i] + 0x30; }
else dest[j++] = src[i];
}
dest[j] ='\0';
return j;
}
/--------------------------------------------------------------------------------------
setup
Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------/
void setup(void)
{
// initialize DMD objects
// scan DMD row each 700 us
dmd.init(700);
dmd.setBrightness(80);
}
/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------/
void loop(void)
{
// text
const char m[] = "Привет Ардуино!";
// transcode message to UTF for use with GFX fonts
char k[30];
utf8_rus(k, (const unsigned char* )m);
// but initially select standard font
dmd.selectFont(&UkrRusArial_F);
// shift steps in pixels for running text (positive - shift right, negative - left)
int8_t step[] = { 1,-1,-2,2 };
// running text shift interval
uint16_t interval = 50;
long prev_step = millis();
uint8_t i = 0, b = 0;
uint8_t test = 255;
uint8_t test_cnt = 4;
// Cycle for tests:
// -- running texts moving at x and y axis with single and double speed
// -- brightness control
// -- vertical scrolling message
while (1) {
if ((millis() - prev_step) > interval) {
if (test >= test_cnt) {
test = 0;
// draw message
dmd.drawMarqueeX(m, -1 * (dmd.stringWidth(m)), 0);
dmd.swapBuffers(true);
}
switch (test) {
// moving text at x axis
case 0:
if (dmd.stepMarquee(step[i], 0) & 1) { // if text is reached screen bounds
dmd.clearScreen(true);
i++;
// if all moving finished
if (i > 3) {
// go to next stage
i =0;
test++;
dmd.drawMarqueeX(m, 0, 0);
}
else {
if (step[i] < 0) dmd.drawMarqueeX(m, dmd.width() - 1, 0);
else dmd.drawMarqueeX(m, -1 * dmd.stringWidth(m), 0);
}
}
else {
if (step[i] != 1) dmd.drawFilledBox(0, 0, 5, dmd.height() - 1, GRAPHICS_INVERSE);
}
// output mem buffer to matrix
dmd.swapBuffers(true);
break;
// change brightness
case 1:
b++;
dmd.setBrightness(b);
if (b > 200) {
test++;
b = 80;
i = 0;
dmd.setBrightness(b);
dmd.drawMarqueeX(m, 0, 0);
}
dmd.swapBuffers(true);
break;
// moving text at y axis
case 2:
if (dmd.stepMarquee(0, step[i]) & 1) {
// clear the screen
dmd.clearScreen(true);
// select new moving speed
i++;
// if all moving finished
if (i > 3) {
// go to next stage
test++;
// select GFX font for vertical scroll
dmd.selectFont(&GlametrixL);
dmd.drawMarquee(k, strlen(k), dmd.width() - 1, 0, 1);
}
else {
if (step[i] < 0) dmd.drawMarqueeX(m, 0, dmd.height());
else dmd.drawMarqueeX(m, 0, 0);
}
}
// output mem buffer to matrix
dmd.swapBuffers(true);
break;
// vertical scrolling
case 3:
dmd.stepMarquee(-1, 0, 1);
dmd.swapBuffers(true);
break;
}
prev_step = millis();
}
}
}
I want to learn character's height of the font. How can I do this?
Hi, sorry for what I'm sure is a simple question: When I compile the dmd_demo sketch in Arduino, I get the following message:
_Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Generic STM32F1 series, Generic F103C8Tx, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), None, Newlib Nano (default)"
dmd_demo:48:19: error: no matching function for call to 'SPIClass::SPIClass(int)'
48 | SPIClass dmd_spi(2);
| ^
In file included from \Documents\Arduino\libraries\DMD_STM32-old-V1/DMD_STM32.h:47,
from \Documents\Arduino\libraries\DMD_STM32-old-V1\examples\STM32F1\dmd_demo\dmd_demo.ino:42:
\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:114:5: note: candidate: 'SPIClass::SPIClass(uint32_t, uint32_t, uint32_t, uint32_t)'
114 | SPIClass(uint32_t mosi, uint32_t miso, uint32_t sclk, uint32_t ssel = PNUM_NOT_DEFINED);
| ^~~~~~~~
\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:114:5: note: candidate expects 4 arguments, 1 provided
\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:113:5: note: candidate: 'SPIClass::SPIClass()'
113 | SPIClass();
| ^~~~~~~~
\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:113:5: note: candidate expects 0 arguments, 1 provided
\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:111:7: note: candidate: 'constexpr SPIClass::SPIClass(const SPIClass&)'
111 | class SPIClass {
| ^~~~~~~~
C:\Users\Leon.Hutton\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:111:7: note: no known conversion for argument 1 from 'int' to 'const SPIClass&'
C:\Users\Leon.Hutton\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:111:7: note: candidate: 'constexpr SPIClass::SPIClass(SPIClass&&)'
C:\Users\Leon.Hutton\Documents\ArduinoData\packages\STMicroelectronics\hardware\stm32\2.4.0\libraries\SPI\src/SPI.h:111:7: note: no known conversion for argument 1 from 'int' to 'SPIClass&&'
exit status 1
no matching function for call to 'SPIClass::SPIClass(int)'_
Any ideas? I suspect something simple I am doing wrong...
Originally posted by @bilalibrir in #9 (comment)
I have noticed a ghosting effect and is a bit hard to show on camera. you can only see it at the D line. it could be the mux!!
i really like this library and looking forward to test the next releases.
thank you.
Hello,
I try to compile dmd_demo (dmd_demo.ino
in examples folder), but failed with following error:
error: no matching function for call to 'SPIClass::SPIClass(int)' SPIClass dmd_spi(2); ^
I use BluePill(STM32F103C8), with Arduino IDE 1.8.0, and STM32Duino 1.7.0
Thank you.
Hi, I have problem to display big string from serial input. Stm32 recived string 350 charachters but only displays 170. Help?
Attention
The last version (v1.1.0) of the library exhibits problems in some 4-bit color modes on standard (non-PWM) RGB panels.
The causes of the problems lie in recent code changes. Version 1.0.7 and earlier do not experience these problems.
A fix will be released soon.
I have 5 32x16 P10 panels that I'd like to put to some use. They are some rare parts so I assume it'd be hard to find anything compatible with them, therefore I'd like to use all 5 of them at once.
This gives me some possibilities regarding connections and resolutions:
Simple 5x1 for 160x16 display
Classy 2x2 for 64x32 display
The second could be potentially more sueful but then one panels is left without job.
An alternative popped to my mind abou usin 5x1 but sideways to give a nice 80x32 display with ribbons coming in a zigzag shape from behind.
The thing is: how best to approach this from the code perspective as I assume the library is not ready for such crazy ways of behavior?
On RGB32x16 2S matrix the output seems unaligned with patterns like this - https://disk.yandex.ru/d/-_JaEnPL2svAcQ
hello guys i tried to design a soccer score board with this library where im trying to design in a size of 6ftx3ft with 36 P10 modules driven by stm32f103c8
include <angka_3.h>
#include "fonts/SystemFont5x7.h"
#include "fonts/Arial_Black_16_ISO_8859_1.h"
#include "fonts/UkrRusArial14.h";
#include "gfx_fonts/GlametrixLight12pt7b.h"
#include "gfx_fonts/GlametrixBold9pt7b.h"
DMD_Standard_Font UkrRusArial_F(angka_3);
// We'll use SPI 2
SPIClass dmd_spi(2);
//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 4
#define DISPLAYS_DOWN 3
// ----- Select pins for P10 matrix connection ------------
// pins A, B, SCLK may be any digital I/O, pin nOE should be PWM pin as PB1,PA8
// SPI specific pins as CLK and R_DATA has predefined values:
// for SPI(1) CLK = PA5 R_DATA = PA7
// for SPI(2) CLK = PB13 R_DATA = PB15
// --------------------------------------------------------
#define DMD_PIN_A PB6
#define DMD_PIN_B PB7
#define DMD_PIN_nOE PB1
#define DMD_PIN_SCLK PA8
void setup()
{
Serial.begin(9600);
Serial.setTimeout(5);
// initialize Timer3
Timer3.setMode(TIMER_CH1, TIMER_OUTPUTCOMPARE);
Timer3.setPeriod(3000); // in microseconds
Timer3.setCompare(TIMER_CH1, 1); // overflow might be small
Timer3.attachInterrupt(TIMER_CH1, ScanDMD);
//clear/init the DMD pixels held in RAM
dmd.clearScreen( true ); //true is normal (all pixels off), false is negative (all pixels on)
dmd.setBrightness(6000);
pinMode(13,OUTPUT);
pinMode(12,OUTPUT);
digitalWrite(13,LOW);
digitalWrite(13,HIGH);
}
void loop()
{
if(boot_screen_flag==1)
{
dmd.selectFont(&UkrRusArial_F);
dmd.drawString( 2,3, " POST RUN ENABLED ", 20, GRAPHICS_NORMAL );
delay(1000);
dmd.drawString( 2,17, " IDC CHECK OK", 20, GRAPHICS_NORMAL );
delay(1000);
dmd.drawString( 2,29, " NETWORK ADAPTER OK", 20, GRAPHICS_NORMAL );
delay(1000);
dmd.drawString( 2,39, " BUS SPEED TEST OK", 20, GRAPHICS_NORMAL );
}
}
the problem im facing is when i try to run more than 4 modules chained in series display starts to flicker, Is that because of timer or am i lagging some where but the library says it can run up-to 16 displays without any performance lagging but less than 4 modules it works like a charm.
Project page
https://github.com/stm32duino/Arduino_Core_STM32
rogerclark kludge is good, but this is more perspective, many projects use this core.
Hi @board707 !
Here's some more details about the cursed panel with weird pattern.
It's 2 mux pins, 2 scan lines, and what you see uses #define DISPLAY_TYPE 2,32,16,2,1
Russian:
Могу ли я использовать данную библиотеку с модулем W5500? Есть ли прототип печатной платы для Pi Pico? Со своей стороны имею доступ ко многим панелям разных производителей, хочу протестировать на всех. Особенно интересны панели P2.5 128х64 с контактом D1между G1 и G2 (фото выложу позже) и 64х32 P5 (обе уличные). И еще нужно ли преобразовывать логику в 5V для всех панелей? подойдут ли 74HCT245?
Can I use this library with the W5500 module? Is there a prototype PCB for Pi Pico? For my part, I have access to many panels from different manufacturers, I want to test at all. Especially interesting are the panels P2.5 128x64 with contact D1 between G1 and G2 (I will post photos later) and 64x32 P5 (both street). And is it also necessary to convert the logic to 5V for all panels? Will 74HCT245 work?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.