Many thanks for the reply.
This is the code I've used to draw a crosshair on the screen with an Arduino bitmap and a letter W. This seems to work ok.
#include <glcd.h>
#include "fonts/allFonts.h"
#include "Bitmaps/allBitmaps.h"
void setup () {
GLCD.Init(NON_INVERTED); // Initialise the glcd library
GLCD.ClearScreen(); // Clear Screen
}
void loop ()
{
showDisplay(); // display data *NECESSARRY!
}
void showDisplay(){
GLCD.SelectFont(Arial14);
GLCD.GotoXY(50,50);
GLCD.Puts("W");
GLCD.DrawLine(0,32,128,32 ,BLACK); // HORIZONTAL LINE
GLCD.DrawLine(64,180,64,0 ,BLACK); // VERTICAL LINE
GLCD.DrawBitmap(ArduinoIcon32x32,30,0, BLACK); //Call bitmap from Arduino Library and draw it to a XY point
}
I used a bitmap creator called LCD assistant to change a monochrome bitmap image of an AC symbol into an array. The software can be found here : Bitmap converter for mono and color LCD displays
I then saved the image to the bitmap library within Arduino. I couldn't get this to compile in a sketch and reading several forum entries I discovered that LCD assistant can give arrays that will not work. Someone suggested The Dot Factory located here : Home - Technology In The Arts - Emerging Science and Technology Trends
With the array it produced I saved it as AClogo.h in the folder my main sketch called LCD quarters is saved in. This is the code I got from The Dot Factory :
include <avr/pgmspace.h>
include <inttypes.h>
ifndef AClogo_H
define AClogo_H
static uint8_t AClogo[] PROGMEM={
//
const uint_8 aClogoBitmaps =
{
0x00, 0x07, 0xFC, 0x00, 0x00, // #########
0x00, 0x3F, 0xFF, 0x80, 0x00, // ###############
0x00, 0x7C, 0x03, 0xE0, 0x00, // ##### #####
0x01, 0xE0, 0x00, 0xF0, 0x00, // #### ####
0x03, 0x80, 0x00, 0x38, 0x00, // ### ###
0x07, 0x00, 0x00, 0x0E, 0x00, // ### ###
0x0E, 0x00, 0x00, 0x06, 0x00, // ### ##
0x1C, 0x00, 0x00, 0x03, 0x00, // ### ##
0x38, 0x00, 0x00, 0x03, 0x80, // ### ###
0x30, 0x00, 0x00, 0x01, 0x80, // ## ##
0x70, 0x00, 0x00, 0x00, 0xC0, // ### ##
0x60, 0x38, 0x00, 0x00, 0xC0, // ## ### ##
0x60, 0xFE, 0x00, 0x00, 0x60, // ## ####### ##
0xC1, 0xC7, 0x00, 0x00, 0x60, // ## ### ### ##
0xC1, 0x83, 0x00, 0x00, 0x60, // ## ## ## ##
0xC3, 0x01, 0x80, 0x00, 0x60, // ## ## ## ##
0xC7, 0x01, 0xC0, 0x00, 0x60, // ## ### ### ##
0xC6, 0x00, 0xE0, 0x00, 0x30, // ## ## ### ##
0xC0, 0x00, 0x60, 0x0C, 0x30, // ## ## ## ##
0xC0, 0x00, 0x30, 0x0C, 0x60, // ## ## ## ##
0xC0, 0x00, 0x38, 0x18, 0x60, // ## ### ## ##
0xC0, 0x00, 0x1C, 0x38, 0x60, // ## ### ### ##
0xC0, 0x00, 0x0E, 0x70, 0x60, // ## ### ### ##
0x60, 0x00, 0x07, 0xE0, 0x60, // ## ###### ##
0x60, 0x00, 0x01, 0x80, 0xC0, // ## ## ##
0x70, 0x00, 0x00, 0x00, 0xC0, // ### ##
0x30, 0x00, 0x00, 0x01, 0x80, // ## ##
0x18, 0x00, 0x00, 0x03, 0x80, // ## ###
0x1C, 0x00, 0x00, 0x07, 0x00, // ### ###
0x0E, 0x00, 0x00, 0x0E, 0x00, // ### ###
0x07, 0x00, 0x00, 0x1C, 0x00, // ### ###
0x03, 0x80, 0x00, 0x38, 0x00, // ### ###
0x01, 0xE0, 0x00, 0xF0, 0x00, // #### ####
0x00, 0x7C, 0x07, 0xC0, 0x00, // ##### #####
0x00, 0x1F, 0xFF, 0x00, 0x00, // #############
0x00, 0x03, 0xF8, 0x00, 0x00, // #######
};
// Bitmap sizes for aClogo
const uint_8 aClogoWidthPages = 5;
const uint_8 aClogoHeightPixels = 36;
// Bitmap info for aClogo
extern const uint_8 aClogoBitmaps;
extern const uint_8 aClogoWidthPages;
extern const uint_8 aClogoHeightPixels;
#endif //define AClogo_H
I changed the already working code called glcd_quarters to include AClogo.h and called this bitmap so the sketch now looks like this :
#include <glcd.h>
#include "fonts/allFonts.h"
#include "Bitmaps/allBitmaps.h"
#include "AClogo.h"
void setup () {
GLCD.Init(NON_INVERTED); // Initialise the glcd library
GLCD.ClearScreen(); // Clear Screen
}
void loop ()
{
showDisplay(); // display data *NECESSARRY!
}
void showDisplay(){
GLCD.SelectFont(Arial14);
GLCD.GotoXY(50,50);
GLCD.Puts("W");
GLCD.DrawLine(0,32,128,32 ,BLACK); // HORIZONTAL LINE
GLCD.DrawLine(64,180,64,0 ,BLACK); // VERTICAL LINE
GLCD.DrawBitmap(Aclogo,30,0, BLACK); //Call bitmap from folder and draw it
}
These are the compiler errors :
In file included from glcd_quarters.cpp:5:
AClogo.h:8: error: expected primary-expression before 'const'
AClogo.h:8: error: expected `}' before 'const'
AClogo.h:8: error: expected ',' or ';' before 'const'
AClogo.h:49: error: 'uint_8' does not name a type
AClogo.h:50: error: 'uint_8' does not name a type
AClogo.h:54: error: 'uint_8' does not name a type
AClogo.h:55: error: 'uint_8' does not name a type
AClogo.h:56: error: 'uint_8' does not name a type
glcd_quarters.cpp: In function 'void showDisplay()':
glcd_quarters:25: error: 'Aclogo' was not declared in this scope
Any help or advice would be greatly received.