Page 7 of 11

Re: New beta release "DMD2" Library

Posted: Fri Jun 26, 2015 6:26 pm
by Vety
Hello

I think this is the best thread to find help. I've tried upload DMD2 to an Arduino Due and get an error message. Works great on my Arduino Mega but just couldn't wrap my head around the error. Does anyone have a suggestion?

Code: Select all

C:\Users\-\Documents\Arduino\libraries\DMD2-master/DMD2.h: In member function 'void DMDFrame::drawString(int, int, const __FlashStringHelper*, DMDGraphicsMode, const uint8_t*)':

C:\Users\-\Documents\Arduino\libraries\DMD2-master/DMD2.h:149:62: error: 'drawString_P' was not declared in this scope
     return drawString_P(x,y,(const char*)flashStr, mode, font);
                                                              ^
C:\Users\-\Documents\Arduino\libraries\DMD2-master/DMD2.h:149:62: error: return-statement with a value, in function returning 'void' [-fpermissive]

Re: New beta release "DMD2" Library

Posted: Sat Jun 27, 2015 3:45 pm
by Things
Haven't tried myself but the Due is an ARM based board, perhaps the library only supports AVR? (well, the original post seems to indicate this is the case).

Re: New beta release "DMD2" Library

Posted: Thu Jul 02, 2015 2:48 am
by angusgr
Hi Vety,

Thanks for reporting this. The DMD2 library does support Arduino Due, but this was a compiler bug on that platform. I've just updated the library on github, please download the latest version and try again. Sorry for the inconvenience.

Angus

Re: New beta release "DMD2" Library

Posted: Mon Jul 06, 2015 7:24 pm
by Loki
Hi, Your DMD2 library is just awesome, i want to ask if it is possible to speedup marqueeScrollX (DMDFrame), or if it can scroll bigger frame than frame DMDFrame(254,x) 254pixels wide frame, i have dificulties with this to work. If i try to get more wider than 254 pixels it just showns nothing.
for speed of marquee scroll :http://youtu.be/jRA_y-oAJYA it takes appx 200ms to redraw marqueeScrollX(-2):

Code: Select all

//scrolling function just for loop()
void ScrollX(){
int len=0;


if (MESSAGE.length()*8>254)
          { 
        len=254; 
          }
  else if (MESSAGE.length()*8<96)   
          {
        len=96;
          } 
        else if ((MESSAGE.length()*8+MESSAGE.length())>254){len=254;}
      else len=MESSAGE.length()*8+MESSAGE.length();


DMDFrame little=scroll.subFrame(0,0,len,16);

little.marqueeScrollX(-2);
scroll.copyFrame(little,0,0);
bool state;
 
 for(int x = 0; x < 96; x++)  {
    for(int y = 0; y < little.height; y++)  {
        if (little.getPixel(x,y)) {state = true;}else{state=false;}
           dmd.setPixel(x+128,y,state ? GRAPHICS_ON : GRAPHICS_OFF);
                                            }
                              }
}

Code: Select all

//print message from EEPROM to DMDFrame
      if (PrintMess==true){
      scroll.selectFont(Arial_bl_16);
      scroll.drawString(0,1,MESSAGE,GRAPHICS_ON);
      PrintMess=false;
      Serial.println("characters drawn");


}


Thank you for your perfect work

Still no-one?

Re: New beta release "DMD2" Library

Posted: Wed Sep 02, 2015 4:10 pm
by jcmanh
Binkles wrote: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

I was found the way to fix it:

in DMD_Text.cpp:
insert these code

else if (header.height<8) {
offset = header.height - 7;
}


after

if ((i == bytes - 1) && bytes > 1) {
offset = header.height - 8;
}

Re: New beta release "DMD2" Library

Posted: Thu Sep 03, 2015 6:13 am
by ledsarecool
Hello.

Has this DMD2 beta library been revised after these bugs and corrected?
Also is the display board sold separately for larger displays?

Re: New beta release "DMD2" Library

Posted: Fri Sep 04, 2015 12:32 am
by angusgr
ledsarecool wrote: Has this DMD2 beta library been revised after these bugs and corrected?
This library is still in beta so there are some issues (like marquee scrolling) that remain incomplete. Basic functionality works, and any bugs in that functionality have been fixed.

The original DMD library is still our stable release library for the DMD: https://github.com/freetronics/DMD
Also is the display board sold separately for larger displays?
No, I'm afraid not. We only sell the display adapter for the DMD displays that we sell and support.

It is possible to tile our displays and daisy-chain the connections to create larger panels.

Re: New beta release "DMD2" Library

Posted: Wed Sep 09, 2015 1:15 am
by angusgr
There is now a new release 0.0.3 of DMD2, featuring ESP8266 Arduino support contributed by h4rm0nic. The release should be available in the Arduino IDE Library Manager shortly.

Regarding the bug with very short fonts, I hope to have some time to test and merge the fix for this soon.

Angus

Re: New beta release "DMD2" Library

Posted: Thu Sep 10, 2015 5:31 am
by ledsarecool
Hello.

Can the beta version be used in the same library folder as the first release or will there be conflict?

Re: New beta release "DMD2" Library

Posted: Fri Sep 11, 2015 12:59 am
by stryker
ledsarecool wrote:Can the beta version be used in the same library folder as the first release or will there be conflict?
Hi,

I use both and they coexist as DMD and DMD2 in the libary menu fine.

Cheers !
Geoff