New beta release "DMD2" Library

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
Airclab
Posts: 3
Joined: Sun Jan 12, 2020 12:30 pm

Re: New beta release "DMD2" Library

Post by Airclab » Sun Jan 12, 2020 1:26 pm

Good afternoon! Tell me please. When I connect my P10 panel to DMD2 and turn on the examples, the entire image is inverted. How to fix it. Thanks!

Brissieboy
Posts: 200
Joined: Fri Sep 20, 2013 7:25 am

Re: New beta release "DMD2" Library

Post by Brissieboy » Mon Jan 13, 2020 1:52 am

You do not provide much information to allow any worthwhile comments, but if you are using the Freetronics type DMD board and a Uno (or similar) the DMD2 supplied example sketches should display in normal graphics, not inverted. If the display is inverted for all the example sketches then it looks like you have a different hardware setup or have modified the library code.
There is also a GRAPHICS_INVERSE that you might care to investigate further.
And you could also try the DMD library to see how that behaves with your setup.

Airclab
Posts: 3
Joined: Sun Jan 12, 2020 12:30 pm

Re: New beta release "DMD2" Library

Post by Airclab » Mon Jan 13, 2020 8:07 am

Thanks for the answer! I have a matrix (P10 (1R) 806L-M5.2.) 320 * 160. Connected libraries DMD and DMD2. I didn’t change anything in libraries, just took examples and downloaded, but the whole image is inverse. We will study the GRAPFICS_INVERSE command, but it is not in many functions.
Thanks!!!
Please tell me on an example how to output a variable to a matrix. Thanks!

Brissieboy
Posts: 200
Joined: Fri Sep 20, 2013 7:25 am

Re: New beta release "DMD2" Library

Post by Brissieboy » Mon Jan 13, 2020 10:53 pm

Please tell me on an example how to output a variable to a matrix. Thanks!
Again, not much information to go on, but you probably need to convert the variable to a char array before trying to display it.

Airclab
Posts: 3
Joined: Sun Jan 12, 2020 12:30 pm

Re: New beta release "DMD2" Library

Post by Airclab » Tue Jan 14, 2020 11:50 am

#include "GyverTimer.h" // подключаем библиотеку
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#include <SPI.h>
#include <DMD2.h>
//#include MyBigFont.h
#include <Droid_Sans_12.h>
#include <Arial_Black_16.h>
#include <Arial_Black_16_ISO_8859_1.h>
GTimer myTimer(MS); // создать миллисекундный таймер (ms) (по умолч. в режиме интервала)
//GTimer myTimer(MS, 1000); // можно сразу указать период (по умолч. в режиме интервала)
//GTimer myTimer(US, 5000); // или микросекундный (us), на 5000 мкс (по умолч. в режиме интервала)

SoftDMD dmd(4,1); // DMD controls the entire display

// без указания периода таймер автоматически не запустится!
int i;
//anemometr
const int m_time = 1; //Meassuretime in Seconds
int wind_ct = 0;
float wind = 0.0;
unsigned long times = 0;
float windm = 0.0;

void countWind() {
wind_ct ++;
}
void meassure() {
wind_ct = 0;
times = millis();
attachInterrupt(1, countWind, RISING);
delay(1000 * m_time);
detachInterrupt(1);
wind = ((float)wind_ct / (float)m_time * 1.2) / 3.6;
}
void setup() {
// put your setup code here, to run once:
times = millis();
lcd.init();
lcd.backlight();
dmd.setBrightness(255);
dmd.begin();
dmd.fillScreen(true);
}
void loop() {
meassure();
//lcd.print(wind, 1);
//It is necessary to constantly display the variable (wind, 1) on P10




}

Brissieboy
Posts: 200
Joined: Fri Sep 20, 2013 7:25 am

Re: New beta release "DMD2" Library

Post by Brissieboy » Tue Jan 14, 2020 10:46 pm

Do not try to do too much at once. Start very basic and keep it as simple as possible. Do only one step at a time.
Go back to the examples, take a copy of one (such as the countdown one) and start playing with that by changing things until you understand what the various parts are doing. Try getting it to display a float variable.
Only then should you start adding your own functionality.

Post Reply