New beta release "DMD2" Library

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
MikSer
Posts: 1
Joined: Wed Jun 18, 2014 9:58 am

Re: New beta release "DMD2" Library

Post by MikSer » Wed Jun 18, 2014 10:05 am

Thanks angusgr for library. Everything works excellently. Hello from Russia!

Image

moonerj2
Posts: 11
Joined: Sun Jun 08, 2014 11:44 pm

Re: New beta release "DMD2" Library

Post by moonerj2 » Tue Jul 01, 2014 3:50 am

moonerj2 wrote:Hi , I have a arduino mega, can i use the dmd2 lib , are there any pin changes for this to work.

the plan is to run a Race Start Controller ,pins as last post.

Dmd examples work fine , but the DMD2 examples just lights up vertical lines that are of different lengths and positions.


Any advice would be greatly accepted.
cheers richard

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: New beta release "DMD2" Library

Post by angusgr » Wed Jul 02, 2014 3:55 am

Hi Richard,

I'm guessing you had to use different pins for the DMD examples on Mega?

The default DMD2 examples use the "SoftDMD" implementation which actually allows the same pins on all platforms. So you can use the examples as-is with the "DMDCon" connector board that came with your DMD, same pins that you'd use on an Eleven/Uno.

If you want to use the alternative pins that you were using with the DMD library, you can replace the line:
SoftDMD dmd(1,1);
In the example sketches with something like this:
SPIDMD dmd(1, 1, pin_noe, pin_a, pin_b, pin_sck);
^^ where you insert the Arduino pin numbers that you've used for all those pin values.


Angus

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: New beta release "DMD2" Library

Post by angusgr » Wed Jul 02, 2014 3:55 am

(BTW, sorry for the lack of updates on the DMD2 front. I have been working on it, but there are a few annoying bugs that I have yet to iron out.)

bwooce
Posts: 21
Joined: Mon May 28, 2012 11:15 am

Re: New beta release "DMD2" Library

Post by bwooce » Wed Jul 02, 2014 8:42 am

angusgr wrote:(BTW, sorry for the lack of updates on the DMD2 front. I have been working on it, but there are a few annoying bugs that I have yet to iron out.)
I am still working through the bitwise logic for my additions too. You can see my progress on my fork at github.com/Bwooce/DMD2/

I'll try and polish it off, including the example updates, over the weekend.

xavier.seignard
Posts: 2
Joined: Tue Jul 22, 2014 10:18 am

Re: New beta release "DMD2" Library

Post by xavier.seignard » Tue Jul 22, 2014 10:24 am

Hi angusgr,

Do you think it's technically doable to adjust the speed of the scrolling?

Regards,

Xavier

RadioDJ
Posts: 11
Joined: Fri Sep 27, 2013 5:56 pm

Re: New beta release "DMD2" Library

Post by RadioDJ » Sat Jul 26, 2014 8:01 am

Very nice.
I have just discover the new library and have some small question.
The Textbox, can I make more of them and then update one at the time?
And is it possible to clear only one of the textboxes and not the rest.
I have done some expriment but after a clear one box is not on the same place.

I know it's a beta so I don't know if it's a bug or not yet inplementeted.

Thanks for all your work so far. I hope for a real version soon.

Binkles
Posts: 10
Joined: Mon Jul 14, 2014 1:09 pm

Re: New beta release "DMD2" Library

Post by Binkles » Sun Jul 27, 2014 1:40 am

Hiya!

For some reason I can't get the Font3x5.h font to work, comes up with only 3 lines (top 3) of the font with the new DMD library.

Maybe I need to rename it Font 5x3 ;)

Font files I've not had a lot of joy with figuring out.

I've pasted the Font3x5.h file here...

Code: Select all


/*
 *
 * Font3x5
 *
 * created with FontCreator
 * written by F. Maximilian Thiele
 *
 * http://www.apetech.de/fontCreator
 * me@apetech.de
 *
 * File Name           : Font3x5.h
 * Date                : 17.02.2012
 * Font size in bytes  : 1472
 * Font width          : 3
 * Font height         : 5
 * Font first char     : 32
 * Font last char      : 128
 * Font used chars     : 96
 *
 * The font data are defined as
 *
 * struct _FONT_ {
 *     uint16_t   font_Size_in_Bytes_over_all_included_Size_it_self;
 *     uint8_t    font_Width_in_Pixel_for_fixed_drawing;
 *     uint8_t    font_Height_in_Pixel_for_all_characters;
 *     unit8_t    font_First_Char;
 *     uint8_t    font_Char_Count;
 *
 *     uint8_t    font_Char_Widths[font_Last_Char - font_First_Char +1];
 *                  // for each character the separate width in pixels,
 *                  // characters < 128 have an implicit virtual right empty row
 *
 *     uint8_t    font_data[];
 *                  // bit field of all characters
 */

#include <inttypes.h>
#include <avr/pgmspace.h>

#ifndef FONT3X5_H
#define FONT3X5_H

#define FONT3X5_WIDTH 3
#define FONT3X5_HEIGHT 5

static uint8_t Font3x5[] PROGMEM = {
    0x05, 0xC0, // size
    0x03, // width
    0x05, // height
    0x20, // first char
    0x60, // char count
    
    // char widths
    0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x02, 0x02, 
    0x03, 0x03, 0x01, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 
    0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 
    0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
    0x03, 0x03, 0x03, 0x03, 0x03, 0x05, 0x04, 0x03, 0x03, 0x03, 
    0x03, 0x03, 0x03, 0x03, 0x03, 0x05, 0x03, 0x03, 0x03, 0x02, 
    0x03, 0x02, 0x03, 0x03, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 
    0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x01, 0x05, 0x03, 0x03, 
    0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x05, 0x03, 0x03, 
    0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 
    
    // font data
    0x00, 0x00, 0x00, // 32
    0xB8, // 33
    0x18, 0x00, 0x18, // 34
    0xF8, 0x70, 0xF8, // 35
    0x10, 0xF8, 0x40, // 36
    0x00, 0x00, 0x00, // 37
    0x00, 0x00, 0x00, // 38
    0x18, // 39
    0x70, 0x88, // 40
    0x88, 0x70, // 41
    0x70, 0x70, 0x70, // 42
    0x20, 0x70, 0x20, // 43
    0xC0, // 44
    0x20, 0x20, 0x20, // 45
    0x80, // 46
    0xC0, 0x20, 0x18, // 47
    0xF8, 0x88, 0xF8, // 48
    0x90, 0xF8, 0x80, // 49
    0xE8, 0xA8, 0xB8, // 50
    0xA8, 0xA8, 0xF8, // 51
    0x38, 0x20, 0xF8, // 52
    0xB8, 0xA8, 0xE8, // 53
    0xF8, 0xA8, 0xE8, // 54
    0x08, 0xE8, 0x18, // 55
    0xF8, 0xA8, 0xF8, // 56
    0xB8, 0xA8, 0xF8, // 57
    0x50, // 58
    0xD0, // 59
    0x20, 0x50, 0x88, // 60
    0x50, 0x50, 0x50, // 61
    0x88, 0x50, 0x20, // 62
    0x08, 0xA8, 0x18, // 63
    0x70, 0xE8, 0x70, // 64
    0xF0, 0x28, 0xF0, // 65
    0xF8, 0xA8, 0x50, // 66
    0xF8, 0x88, 0x88, // 67
    0xF8, 0x88, 0x70, // 68
    0xF8, 0xA8, 0xA8, // 69
    0xF8, 0x28, 0x28, // 70
    0xF8, 0x88, 0xC8, // 71
    0xF8, 0x20, 0xF8, // 72
    0x88, 0xF8, 0x88, // 73
    0x40, 0x80, 0x78, // 74
    0xF8, 0x20, 0xD8, // 75
    0xF8, 0x80, 0x80, // 76
    0xF8, 0x10, 0xE0, 0x10, 0xF8, // 77
    0xF8, 0x30, 0x40, 0xF8, // 78
    0xF8, 0x88, 0xF8, // 79
    0xF8, 0x28, 0x38, // 80
    0x78, 0x48, 0xF8, // 81
    0xF8, 0x28, 0xD0, // 82
    0xB8, 0xA8, 0xE8, // 83
    0x08, 0xF8, 0x08, // 84
    0xF8, 0x80, 0xF8, // 85
    0x78, 0x80, 0x78, // 86
    0x78, 0x80, 0x78, 0x80, 0x78, // 87
    0xD8, 0x20, 0xD8, // 88
    0x18, 0xE0, 0x18, // 89
    0xC8, 0xA8, 0x98, // 90
    0xF8, 0x88, // 91
    0x18, 0x20, 0xC0, // 92
    0x88, 0xF8, // 93
    0x10, 0x08, 0x10, // 94
    0x80, 0x80, 0x80, // 95
    0x08, 0x10, // 96
    0xE8, 0xA8, 0xF8, // 97
    0xF8, 0xA0, 0xE0, // 98
    0xE0, 0xA0, 0xA0, // 99
    0xE0, 0xA0, 0xF8, // 100
    0xF8, 0xA8, 0xB8, // 101
    0xF8, 0x28, 0x08, // 102
    0xB8, 0xA8, 0xF8, // 103
    0xF8, 0x20, 0xE0, // 104
    0xE8, // 105
    0x40, 0x80, 0x68, // 106
    0xF8, 0x40, 0xA0, // 107
    0xF8, // 108
    0xF0, 0x20, 0xC0, 0x20, 0xC0, // 109
    0xE0, 0x20, 0xC0, // 110
    0xE0, 0xA0, 0xE0, // 111
    0xF8, 0x28, 0x30, // 112
    0x38, 0x28, 0xF0, // 113
    0xE0, 0x20, 0x20, // 114
    0x90, 0xA8, 0x48, // 115
    0x10, 0xF8, 0x10, // 116
    0xE0, 0x80, 0xE0, // 117
    0x60, 0x80, 0x60, // 118
    0x60, 0x80, 0x60, 0x80, 0x60, // 119
    0xA0, 0x40, 0xA0, // 120
    0x30, 0xA0, 0xF0, // 121
    0xC8, 0xA8, 0x98, // 122
    0x20, 0xF8, 0x88, // 123
    0xF8, // 124
    0x88, 0xF8, 0x20, // 125
    0x60, 0x20, 0x30, // 126
    0x00, 0x00, 0x00 // 127
    
};

#endif

RadioDJ
Posts: 11
Joined: Fri Sep 27, 2013 5:56 pm

Re: New beta release "DMD2" Library

Post by RadioDJ » Tue Jul 29, 2014 4:59 am

Hello again.
I maybe have found a "bug".
I'm using the textbox.
If I send a message to the display "abcdefgh" it shows it just like it should.
I then do a .clear and after that I sénd a new message "Hello". Then I get the message "Hellogh" on the display.
It seems like it displays all after the '\0' (end of string sign) also.
I have tested this several times and get the same answer.

Bug??

RadioDJ
Posts: 11
Joined: Fri Sep 27, 2013 5:56 pm

Re: New beta release "DMD2" Library

Post by RadioDJ » Tue Jul 29, 2014 4:17 pm

I have now some more questions.
I will like to read some values from the memory in the Arduino, like brightness, width and heigth.
I will then use this values to setup the DMD2 library.
Is this possible??
I have done some expriment but have not solved this problem. Sample code??

Keep up the good work.

Post Reply