I have purchased a ITDB02-3.2WD display & associated mega shield from iteadstudio, downloaded the libraries from http://henningkarlsen.com/electronics/library.php?id=51 & had the screen displaying text at startup.
I want to display a bitmap (converted JPG) & have converted the file at the http://henningkarlsen.com website, I have placed the file (Lizard.c) in the code folder. The code compiles ok but when I try & load it I get the following error message.
avrdude: verification error, first mismatch at byte 0x06d4
0x14 != 0xff
avrdude: verification error; content mismatch
If I comment out my bitmap in the void setup section & un-comment the //myGLCD.drawBitmap (0, 0, 64, 64, tux, 2); bitmap the code loads & displays the image.
Can anyone give me an idea of what is causing the problem.
I have tried converting a couple of similar jpg files & using them but I get a similar message each time.
My code is all working except when I try & display my bitmaps, obviously I have not included all of the code.
#include <IRremote.h>
#include <IRremoteInt.h>
#include <Wire.h> // For I2C
#include <EEPROM.h> // We will use the eeprom to store values
#include <memorysaver.h> // Disables other screen chip information & savers memory space/ Didn't do anything?
// CONSTANT DEFINITION
#include <UTFT.h>
//#include <Arial_bold_14.h>
#include <AVR/pgmspace.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t Sinclair_S[];
extern uint8_t DotMatrix_M[];
extern uint8_t Shruti_Bold_num_48x70[];
extern unsigned int Lizard[9455];
#define B 0xFF // The character for a completely filled box
#define A 0x20 // The character for blank
UTFT myGLCD(ITDB32WD,38,39,40,41);
#define RECV_PIN 12 // IR Receiver pin
#define Relay1 5 // Mains Relay
#define Relay2 11 // Amps Relay
#define Relay3 9 // Cross Over Relay
#define RemoteLED 3 // Remote LED Flashes when Signal Received
#define RECV_Power 13 // To Power IR Reciever using Mega Test Platform
#define ON 1
#define OFF 0
#define CentreButtonCode 2011281932 // Power On & Off
#define MenuButtonCode 2011250700 // Sleep Function, 15min, 30min, 45min & reset
#define UpButtonCode 2011287564 // Volume Up
#define DownButtonCode 2011279372 // Volume Down
#define RightButtonCode 2011291660 // Source selection cycles through 4 inputs
//#define potPin A0 // define the analog pin, pin A0 in this case
//int val = 0; // variable to store the value coming from the potentiometer
//int volumeToDisplay; // variable to store the volume to be displayed
const int motor1Pin = 10; // H-bridge leg 1 (pin 2, 1A)
const int motor2Pin = 6; // H-bridge leg 2 (pin 7, 2A)
const int enablePin = 4; // H-bridge enable pin
int selectionPin1 = 7; // Selection Pin 1 = B0 or 6 Pin on TP I/O Connector
int selectionPin2 = 8; // Selection Pin 2 = B1 or 8 Pin on TP I/O Connector
int TurnOffDACXODelay = 2000; // turn DAC and Xover off after 2 seconds
unsigned long NoSleepDelay = 0;
unsigned long DelayIncrement = 900000;
unsigned long MaxDelay = 2700000;
unsigned long Timer = 0; // Setting up Timer On
unsigned long MotorRunTime = 700; // the amount of time we want to run the motor for volume when the button pressed
unsigned long EnablePinTime = 50; // time after motor turned off that we can disable the pin.
unsigned long LastMotorButton = 0; // so we know which was the last motor code pressed.
unsigned long DelayRequired = 0; // current delay selected (or cycled through)
unsigned long TurnOffWhenReached = 0; // will hold the time at which the Sleep action is initiated.
// Create values for 'storing' states
int centreButtonState;
IRrecv irrecv(RECV_PIN);
decode_results results;
// Setup & Configuration
void setup()
{
myGLCD.InitLCD();
myGLCD.clrScr();
myGLCD.setBackColor(0, 0, 0);
myGLCD.setFont(BigFont);
myGLCD.setColor(255, 255, 0);
myGLCD.print("L I Z A R D", CENTER, 50);
delay(4000);
myGLCD.clrScr();
myGLCD.fillScr(255, 255, 255);
myGLCD.drawBitmap(1, 1, 155, 61, Lizard);
//myGLCD.drawBitmap (0, 0, 64, 64, tux, 2);
delay(4000);
myGLCD.clrScr();