Dot Matrix Display

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Dot Matrix Display

Post by debenham » Tue Feb 14, 2012 2:53 am

I'm not sure the the one you downloaded - but with the once from GLCD it has the option to export directly to a .h file (which can then be included etc)

cpohara
Posts: 9
Joined: Sat Feb 11, 2012 5:15 am

Re: Dot Matrix Display

Post by cpohara » Tue Feb 14, 2012 8:09 am

I've updated the project page, including code, status update and quick video.

https://sites.google.com/site/saposcore/home

Thanks for all the help so far. I might not get around to trying the new font until this weekend, but it will be a 4 day weekend so I should get pretty far.

here are my next goals
immediate:
-finish wiring all the triggers
-finish the display design including the 3x5 font and unique text and animations for different score values
-play test! (and fix issues to make sure scoring is accurate)

longer term:
-finalize wiring to real board
-find a way to flip a switch to subtract scores in case of accidents
-add spanish versions of all the text
-find a way to play music for certain score values (currently just sending current through a beeper)
-find a way to input team names and member names and have more than 2 teams
-use iphone to edit names, scores, play animations, etc

cpohara
Posts: 9
Joined: Sat Feb 11, 2012 5:15 am

Re: Dot Matrix Display

Post by cpohara » Wed Feb 15, 2012 4:54 am

I'm trying to use the font creator you suggested, but when I run start.bat, nothing happens. A dos window blips on and off and then nothing.

I am going to look into it, but if you know what I'm doing wrong, let me know. Thanks.

***edit - got it working, had to add java to my PATH env variables

cpohara
Posts: 9
Joined: Sat Feb 11, 2012 5:15 am

Re: Dot Matrix Display

Post by cpohara » Thu Feb 16, 2012 4:53 am

When I import a font, it works perfectly, but when I try to create one from scratch, it turns to gibberish on screen. Below i've pasted the .h export. If you see something wrong, let me know. It appears weird that the height is a negative number but that's what happens when i export.

Code: Select all

 * File Name           : Font3x5.h
 * Date                : 14.02.2012
 * Font size in bytes  : 1542
 * Font width          : 2
 * 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 2
#define Font3x5_HEIGHT -5

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

#endif


debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Dot Matrix Display

Post by debenham » Thu Feb 16, 2012 5:10 am

That height filed is indeed causing the problem (shows up as font height of 0xFB - which is 251 pixels!)
Can you save the font (instead of exporting) and upload it - I'll give it a go as well

cpohara
Posts: 9
Joined: Sat Feb 11, 2012 5:15 am

Re: Dot Matrix Display

Post by cpohara » Thu Feb 16, 2012 5:18 am

Attached - I've only done 0,1 and 2 for this test.

I took the save file and added the .h, but this is not an export. i just added the .h because it was rejecting other file extensions.

EDIT: It seems to work fine if I set the heights to 7 in the .h file
Attachments
Font3x5.h
(8.71 KiB) Downloaded 336 times

debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Dot Matrix Display

Post by debenham » Fri Feb 17, 2012 1:39 am

I've made up a quick 3x5 font (see https://github.com/cjd/DMD/blob/master/Font3x5.h )
It works okay and has most characters (as best I could within 3x5 - except w and m which are 5 pixels wide)
Note that you will need to grab a new version of the library as in doing so I found a bug that stopped fontts smaller than 8 pixels from working properly.
See https://github.com/cjd/DMD

cpohara
Posts: 9
Joined: Sat Feb 11, 2012 5:15 am

Re: Dot Matrix Display

Post by cpohara » Fri Feb 17, 2012 4:50 pm

Very cool, thanks! I made a quick 4x5 font to display some text with the remaining room I had on the board and it worked.

I am now having trouble getting pin 1 to work as a digital input. I just get no input whereas if I put the wire over to pin 2, it does what I want immediately. Do I need to initialize it differently ?

Ian
Posts: 4
Joined: Sun Nov 11, 2012 10:25 pm

Re: Dot Matrix Display

Post by Ian » Thu Nov 15, 2012 8:19 pm

the code you posted contains errors and does not run ... could you please post some 'hello world' (easy code!) or link to some code that does work

many thanks

ian

42n8
Posts: 46
Joined: Wed Dec 26, 2012 8:10 pm
Location: Auckland, NZ

Re: Dot Matrix Display

Post by 42n8 » Wed Dec 26, 2012 9:04 pm

Ian wrote:the code you posted contains errors and does not run ... could you please post some 'hello world' (easy code!) or link to some code that does work

many thanks

ian
Which code doesn't work Ian?

Regards

Post Reply