Giter Club home page Giter Club logo

dmd32's People

Contributors

qudor-engineer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dmd32's Issues

DigitaL Outputs doesn't work

Hi, tank you for share your library, im working with Dmd32 library, its fine, but when i try digitalWrite(pin, output) ; doesn't ocurr whats wrong? Tank you for you answer.

Not working with pins swapped

Hello I am working with P10 display with following pins of ESP32, but display is not showing anything.

#define pin_A 0
#define pin_B 16
#define pin_sclk 12
#define pin_noe 15
#define pin_clk 14 //shift clock
#define pin_r_data 13 //data pin 1
#define panel_width 2
#define panel_heigh 2

Crash when used alongside BLE libraries

Hi,

I just wanted to ask if you have tried using this library alongside some Bluetooth (BLE) functionality. The test sketch examples for fine, but after adding the BLE dependencies

#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

and some code that listens for a connection, the ESP32 just boot-loops with an error.

freertos/queue.c:1446 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x4008ddf7 on core 1
Rebooting...

Is there some forceful limitation of clock speed in DMD32 or something that could make the Bluetooth peripheral fail to initialize? The library works fine otherwise, albeit with some quirks (I found that if I try display something on the dot matrix display from Setup or from Loop but without a delay after, the ESP will crash and reboot, just like when adding Bluetooth to an otherwise working code).

Thanks!

p10 led module not working using this library

Hi,
I have used this library for scrolling text on p10 led board using esp32.i used this libarary.i have used the code from example section from this repositary.But when i upload the code to esp32 the LED board glowing randomly.3 or 4 LED bulbs randomly glowing in p10 LED board.Is this issue of hardware setup or coding issue any idea?

ESP32 DEVKITV1 doesn't work with this library

The library doesn't work with HUB12 single color P10 panel. I tried with ESP32 DEVKITV1. I used correct pinout and example sketches, checked and re-checked everything several times, but no any of LEDs were lights up. I tried same DMD panel with Arduino Nano and ESP8622 to make sure the panel isn't broken โ€” and it's working. Did you change something in the library?

Solution in case if your matrix doesn`t work

I`m using esp32 devkit v1 and P10 WO (single color) andmain solution is downgrading esp kernel to 2.0.2 version. On 2.0.14 ver CLK LAT and DR pin was 0V.
image
in board manager choose more older version for esp32

here is my wiring
image
brown wire is DR (or R on another version of p10 matrix) connected to D23 on esp32
blue wire is LAT (or LCLK) connected to D2
green wire is CLK connected to D18
yellow wire is B connected to D21
red wire is A connected to D19
purple wire is OE (or enable) connected to D22
black wire is gnd connected to any gnd esp`s pin

image
Paint wiring diagramm

here is normal voltage
image
OE pin
image
A pin
image
B pin
image
CLK pin
image
LAT pin
image
DR pin

HUB12 Monochrome matrix not working with ESP32

I am trying to work with HUB12 matrices monochrome with P10 but they just do not work no matter what code I try the displays just respond the same they turn on all the LEDs. For example I tried this

`#include <DMD32.h>
#include "fonts/SystemFont5x7.h"
#include "fonts/Arial_Black_16_ISO_8859_1.h"

//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 2
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);

//Timer setup
//create a hardware timer of ESP32
hw_timer_t * timer = NULL;

void IRAM_ATTR triggerScan()
{
dmd.scanDisplayBySPI();
}

void setup(void)
{

// return the clock speed of the CPU
uint8_t cpuClock = ESP.getCpuFreqMHz();

// Use 1st timer of 4
// devide cpu clock speed on its speed value by MHz to get 1us for each signal of the timer
timer = timerBegin(0, cpuClock, true);
// Attach triggerScan function to our timer
timerAttachInterrupt(timer, &triggerScan, true);
// Set alarm to call triggerScan function
// Repeat the alarm (third parameter)
timerAlarmWrite(timer, 300, true);

// Start an alarm
timerAlarmEnable(timer);

//clear/init the DMD pixels held in RAM
dmd.clearScreen( true ); //true is normal (all pixels off), false is negative (all pixels on)
Serial.begin(115200);
}

void loop(void)
{
dmd.clearScreen( true );
dmd.selectFont(Arial_Black_16_ISO_8859_1);

const char MSG = "This Works";
dmd.drawMarquee(MSG,strlen(MSG),(32
DISPLAYS_ACROSS)-1,0);
long start=millis();
long timer=start;
while(1){
if ((timer+30) < millis()) {
dmd.stepMarquee(-1,0);
timer=millis();
}
}
}`

same result then I tried this

`#include "DMD32.h"

// Create an instance of DMD
DMD dmd(2, 1); // Assuming 2 panels wide and 1 panel high

void setup() {
// Initialize DMD
dmd.clearScreen(true);
}

void loop() {
// Write a pixel at coordinates (x, y)
int x = 10;
int y = 5;
byte graphicsMode = GRAPHICS_NORMAL;
byte pixelValue = 1; // Set to 0 for clearing the pixel, or 1 for setting the pixel
dmd.writePixel(x, y, graphicsMode, pixelValue);

// Delay for some time
delay(1000);
}`

I even tried examples that come with Libraries but It doesn't work
the connections are according to the DMD32 Library

'#define PIN_DMD_nOE 22 // D22 active low Output Enable, setting this low lights all the LEDs in the selected rows. Can pwm it at very high frequency for brightness control.
#define PIN_DMD_A 19 // D19
#define PIN_DMD_B 21 // D21
#define PIN_DMD_CLK 18 // D18_SCK is SPI Clock if SPI is used
#define PIN_DMD_SCLK 2 // D02
#define PIN_DMD_R_DATA 23 // D23_MOSI is SPI Master Out if SPI is used'

I tried changing panels both are okay used one at a time and both as well I am using ESP32 DEV Kit.
Any help will be appreciated

Matrix of 3 x 5 displays

Hi,

Thanks for creating this library. I am trying to adjust the library to work with DISPLAYS_ACROSS 3 and DISPLAYS_DOWN 5.

I have done some experimentation but I my main issue is understanding the following function:

DMD::DMD(byte panelsWide, byte panelsHigh) { uint16_t ui; DisplaysWide=panelsWide; DisplaysHigh=panelsHigh; DisplaysTotal=DisplaysWide*DisplaysHigh; row1 = DisplaysTotal<<4; row2 = DisplaysTotal<<5; row3 = ((DisplaysTotal<<2)*3)<<2; bDMDScreenRAM = (byte *) malloc(DisplaysTotal*DMD_RAM_SIZE_BYTES);

Could this be adjusted to accommodate another row?

Thanks for your help!

dmd32 lib use with espNow crash

hi, im using dmd32 lib with esp now ,, but simple program rebooting again and again,
image
`#include <esp_now.h>
#include <WiFi.h>

#include <DMD32.h> //
#include "fonts/SystemFont5x7.h"
#include "fonts/Arial_black_16.h"

//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
//Timer setup//create a hardware timer of ESP32
hw_timer_t * timer = NULL;

//////////////
typedef struct struct_message{
uint8_t a;
uint8_t b;

}struct_message;
// Create a structured object
struct_message myData;

void OnDataRecv(const uint8_t * mac, const uint8_t incomingData, int len);
/
--------------------------------------------------------------------------------------
Interrupt handler for Timer1 (TimerOne) driven DMD refresh scanning, this gets
called at the period set in Timer1.initialize();
--------------------------------------------------------------------------------------*/

void IRAM_ATTR triggerScan()
{
dmd.scanDisplayBySPI();
}
void setup(void){
Serial.begin(115200);
Serial.println("receive");

// return the clock speed of the CPU
uint8_t cpuClock = ESP.getCpuFreqMHz();
// Use 1st timer of 4
// devide cpu clock speed on its speed value by MHz to get 1us for each signal of the timer
timer = timerBegin(0, cpuClock, true);
// Attach triggerScan function to our timer
timerAttachInterrupt(timer, &triggerScan, true);
// Set alarm to call triggerScan function
// Repeat the alarm (third parameter)
timerAlarmWrite(timer, 300, true);

// Start an alarm
timerAlarmEnable(timer);

//clear/init the DMD pixels held in RAM
dmd.clearScreen( true ); //true is normal (all pixels off), false is negative (all pixels on)
///////////////
// Set ESP32 as a Wi-Fi Station
WiFi.mode(WIFI_STA);
// Initilize ESP-NOW
if (esp_now_init() != ESP_OK) {
Serial.println("Error initializing ESP-NOW");
return;
}
// Print MAC Address to Serial monitor

Serial.print("Responder ");
Serial.print("MAC Address: ");
Serial.println(WiFi.macAddress());

// Register callback function
esp_now_register_recv_cb(OnDataRecv);
}

/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------
/
unsigned int count;
char buf[]="1234";
void loop(void){

byte b;
// 10 x 14 font clock, including demo of OR and NOR modes for pixels so that the flashing colon can be overlayed
dmd.clearScreen( true );
dmd.selectFont(Arial_Black_16);
snprintf(buf, sizeof(buf), "%d",count);
dmd.drawString( 3,1,buf,strlen(buf), GRAPHICS_NORMAL );

delay(500);
count++;
}

// Callback function executed when data is received
void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {
memcpy(&myData, incomingData, sizeof(myData));
Serial.print("Data received: ");
Serial.println(len);
Serial.print("Character Value: ");
Serial.println(myData.a);
Serial.print("Integer Value: ");
Serial.println(myData.b);
}`

can not work on arduino board V2.0.7

i try using sample :dmd_latin_chars and on my display it's only blank
i using board ESP32 version V2.0.7 nothing happen on my display, but if i downgrade version to 2.0.2 it's working fine

Double p10

When I use 2 p10 panels on top of each other, text appears on only one panel.

OTA updating issue

I am having the issue with the OTA using HTTP Updater with DMD32.
I am checking without using DMD32, it is working fine.
Please help

Not working with multiple displays

It behaves strangely
dmd_demo works with 1x2 and 2x1 configuration but no higher, it just have black screen
dmd_latin_chars works on 3x3 but not on 3x4 but at least show some pixels
compiled against esp32 1.0.5 and running on ESP32-WROM-32UE
Any similar problem recorded ?

p10 panel with ESP32 DEV

Hi
im trying this lib to work with ESP32, but nothing in the display , checked the clock signal but there is no clk signal output in pin 18 no response with LED panel.

can't change the #Defines when the code is running

in this code I needed to rearrange the number of displays crossly, but it's crashing.

#include <DMD32.h>
#include <SPI.h>
#include <SD.h>
#include "fonts/SystemFont5x7.h"
#include "fonts/Arial_black_16.h"

// Fire up the DMD library as dmd
byte DISPLAYS_ACROSS = 1;
byte DISPLAYS_DOWN = 1;
byte *test_key = &DISPLAYS_ACROSS;
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);

// Timer setup
// Create a hardware timer of ESP32
hw_timer_t *timer = NULL;

// SD card setup
const int chipSelect = 15;
File dataFile;

char txtin_sd[50];

/--------------------------------------------------------------------------------------
Interrupt handler for Timer1 (TimerOne) driven DMD refresh scanning, this gets
called at the period set in Timer1.initialize();
--------------------------------------------------------------------------------------
/
void IRAM_ATTR triggerScan()
{
dmd.scanDisplayBySPI();
}

char *sd()
{
if (!SD.begin(chipSelect))
{
Serial.println("SD card failed");
while (1)
; // Stop execution if SD card initialization fails
}

// Open the data file on the SD card
dataFile = SD.open("/data.txt");
if (!dataFile)
{
Serial.println("File not found");
while (1)
; // Stop execution if file opening fails
}

if (dataFile.available())
{
// Read the entire sentence from the file
String sentence = dataFile.readStringUntil('\n');
char *char_array_sentence = new char[sentence.length() + 1];
sentence.toCharArray(char_array_sentence, sentence.length() + 1);

dataFile.close();
SD.end();

return char_array_sentence;

}

dataFile.close();
SD.end();

return nullptr; // Return nullptr if no data is available
}

/--------------------------------------------------------------------------------------
setup
Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------
/
void setup(void)
{

*test_key=2;
Serial.begin(115200);

char *txt = sd();
if (txt != nullptr)
{
strncpy(txtin_sd, txt, sizeof(txtin_sd) - 1);
txtin_sd[sizeof(txtin_sd) - 1] = '\0'; // Ensure null-terminated string
delete[] txt;
}
else
{
// Handle case when SD card data is not available
}

// Return the clock speed of the CPU
uint8_t cpuClock = ESP.getCpuFreqMHz();

// Use 1st timer of 4
// Divide the CPU clock speed on its speed value by MHz to get 1us for each signal of the timer
timer = timerBegin(0, cpuClock, true);
// Attach triggerScan function to our timer
timerAttachInterrupt(timer, &triggerScan, true);
// Set alarm to call triggerScan function
// Repeat the alarm (third parameter)
timerAlarmWrite(timer, 300, true);

// Start an alarm
timerAlarmEnable(timer);

// Clear/init the DMD pixels held in RAM
dmd.clearScreen(true); // true is normal (all pixels off), false is negative (all pixels on)
}

/--------------------------------------------------------------------------------------
loop
Arduino architecture main loop
--------------------------------------------------------------------------------------
/
void loop(void)
{
byte b;

// 10 x 14 font clock, including a demo of OR and NOR modes for pixels so that the flashing colon can be overlayed
dmd.clearScreen(true);
dmd.selectFont(Arial_Black_16);

if (txtin_sd[0] != '\0') // Check if text is available
{
Serial.println(txtin_sd);
dmd.drawMarquee(txtin_sd, 14, (32 * DISPLAYS_ACROSS) - 1, 0);
}

long start = millis();
long timer = start;
boolean ret = false;
while (!ret)
{
if ((timer + 30) < millis())
{
ret = dmd.stepMarquee(-1, 0);
timer = millis();
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.