loading
3 Comments

Tell us about yourself!

Complete Your Profile
  • BitKraken commented on Yoruk's instructable Easy bluetooth controlled scrolling text1 month ago
    Easy bluetooth controlled scrolling text

    I see what Rafael Silva 1088 means by lack of memory. Program worksperfect but after compiling I get the following warning:Low memory available, stability problems may occur.I might be wrong, but it seems that since “fontDefinition”array is using too much RAM space, we get this warning. I’m a noob so I’m not sure howto correct this problem. I have tried to include the ARRAY in FLASH MEMORY byincluding the PROGMEM attribute:const int fontDefinitions[480] PROGMEM = {and tried to retrieve a character from the buffer by using:Buffer[i+0] =pgm_read_word_near(fontDefinitions[((stringToDisplay[caract] - 32) * 5) + 0]);I was able to eliminate the lack of memory warning but no luck in getting the characters. I only get garbage. Any ideas on how to modify the program with ...see more »I see what Rafael Silva 1088 means by lack of memory. Program worksperfect but after compiling I get the following warning:Low memory available, stability problems may occur.I might be wrong, but it seems that since “fontDefinition”array is using too much RAM space, we get this warning. I’m a noob so I’m not sure howto correct this problem. I have tried to include the ARRAY in FLASH MEMORY byincluding the PROGMEM attribute:const int fontDefinitions[480] PROGMEM = {and tried to retrieve a character from the buffer by using:Buffer[i+0] =pgm_read_word_near(fontDefinitions[((stringToDisplay[caract] - 32) * 5) + 0]);I was able to eliminate the lack of memory warning but no luck in getting the characters. I only get garbage. Any ideas on how to modify the program with the progmem attribute?

    Solved!! After many hours and thanks to our friend Google Iwas able to use PROGMEM and avoid the lack of memory warning. Just substitutethe following lines:const int fontDefinitions[480] PROGMEM = {and...Buffer[i+0] =pgm_read_byte(&(fontDefinitions[((stringToDisplay[caract] - 32) * 5)+ 0]));Buffer[i+1] =pgm_read_byte(&(fontDefinitions[((stringToDisplay[caract]- 32) * 5) + 1]));Buffer[i+2] =pgm_read_byte(&(fontDefinitions[((stringToDisplay[caract] - 32) * 5)+ 2]));Buffer[i+3] =pgm_read_byte(&(fontDefinitions[((stringToDisplay[caract] - 32) * 5)+ 3]));Buffer[i+4] =pgm_read_byte(&(fontDefinitions[((stringToDisplay[caract] - 32) * 5)+ 4]));Buffer[i+5] =B00000000;//one blank column ofleds between two charactersI hope it helps everyone.

    Thanks Yoruk for sharing this project!!

    View Instructable »