Require help with some code for special character on lcd 128*64 ......

Hi to all i am busy with a small project (mega2560-lcd128*64-st7920-serial-spi mode)i would just like to display these special symbols i have created using a bitmap programme (fastlcd)on the display ..have tried using font creators to get the hex for the custom characters but how do i insert it into the *.h/ *.cpp file so that it will display ... I dont even know if the hex is correct ..i noticed there are two files attached to project im setting up with help of another friend.... namely font10x10 & font16x16....if that helps any ..

It is basically a Thermometer symbol with a small bargraph inside it that represents temparature basically in 6 blocks in height , 20-80 degrees in three steps i have no clue on that code either using lm35 sensors via the anologue pins ...

  • Added a picture of what i am trying to get drawn on lcd attached to this message (bitmap)

  • Tried using drawroundrect but get error message when compiling ..basically that the command im using is not a member of *.h....

  • Am new to all of this any or some help would be very much appreciated ...

thermobit maps x3.BMP (1.06 KB)

Tried using drawroundrect but get error message when compiling ..basically that the command im using is not a member of *.h

Commands aren't members of any class. Methods are. So, you can only use the methods that are part of the class that you have an instance of.

Since you didn't explain what class you are talking about, nor did you explain what instance of that class you have created nor what member you are trying to call, nor specifically what errors you got, the best we can do is wish you luck.

Good luck.

Ok i have gotten a better copy of the code in trying to integrate ...perhaps this can help

Im trying to implement this code into the program :

//read LM35 temperature sensor data
//DrawRoundRect(63, 28, 52, 30, 10, BLACK);
GLCD.GotoXY(75,40);
//x = 0.48876 * analogRead(SENSOR); //this use 1k of memory
x = (analogRead(SENSOR)>>1)-1; //We need more memory!!!!
GLCD.PrintNumber(x);
GLCD.Puts(";");

//Termo Graphic
GLCD.DrawRoundRect(120, 39, 5, 22, 2, BLACK);
x /= 3; //22*3 => 66 max temperature on graph
GLCD.FillRect(122, 61 - x, 1, x, BLACK); //61=39+22
}
the error i get is the following :

psu_controller_sam_modified.cpp: In function 'void updateDisplay()':
psu_controller_sam_modified:449: error: 'GLCD' was not declared in this scope
psu_controller_sam_modified:451: error: 'x' was not declared in this scope
psu_controller_sam_modified:451: error: 'SENSOR' was not declared in this scope
psu_controller_sam_modified:456: error: 'BLACK' was not declared in this scope
psu_controller_sam_modified:463: error: 'circSymbol1' was not declared in this scope
psu_controller_sam_modified:463: error: 'circSymbol2' was not declared in this scope
psu_controller_sam_modified:466: error: 'BLACK' was not declared in this scope
psu_controller_sam_modified:466: error: 'DrawRoundRect' was not declared in this scope
psu_controller_sam_modified:467: error: 'x' was not declared in this scope
psu_controller_sam_modified:468: error: 'FillRect' was not declared in this scope
psu_controller_sam_modified:493: error: 'updateTime' was not declared in this scope
psu_controller_sam_modified.cpp: At global scope:
psu_controller_sam_modified:499: error: expected declaration before '}' token

Hope this is more specific ...thanks again ...

"Snippets are us" is down the road a ways. We expect to see ALL of your code. Without it, all we can do is agree that the compiler it right.

To the previous poster i could not enclose my code here as it is to big (9500 characters max) i mailed you via the board.
Thanks for the reply

You can attach the code to the post. Click 'Additional Options...' under the text input box.

Ok i have gotten a better copy of the code in trying to integrate ...perhaps this can help

Im trying to implement this code into the program :

//read LM35 temperature sensor data
//DrawRoundRect(63, 28, 52, 30, 10, BLACK);
GLCD.GotoXY(75,40);
//x = 0.48876 * analogRead(SENSOR); //this use 1k of memory
x = (analogRead(SENSOR)>>1)-1; //We need more memory!!!!
GLCD.PrintNumber(x);
GLCD.Puts(";");

//Termo Graphic
GLCD.DrawRoundRect(120, 39, 5, 22, 2, BLACK);
x /= 3; //22*3 => 66 max temperature on graph
GLCD.FillRect(122, 61 - x, 1, x, BLACK); //61=39+22
}


lcd7920.h (5.29 KB)

lcd7920.cpp (12.3 KB)

glcd16x16.cpp (21.7 KB)

the last file added to complete the code

glcd10x10.cpp (17.6 KB)

The compiler is absolutely right. Look for GLCD in your sketch. The only occurrence is in a comment.

You must create an instance of the lcd class, and do the drawing on that instance.

WIll do so Paul ..thank you