All right so I have been trying to build a library for a game system and building library called gamebuino. I had a working set of libraries for the display but after getting a lil advice from their lead I decide bto try it that way which included merging my gfx files to my display files so intead of having a lcd_2000_7775.h and .cpp and a gfx.h and .cpp, just one of each. so I merged the four libraries int two. while doing som I mhad a couple different class thingies with LCD_2000_7775 funtions mixed with gfx functions. but now that ive created the library im not sure how to compose sketches with it.
im hoping some one can clue me into me errors and help figure this out
errors
Arduino: 1.6.11 (Windows 7), TD: 1.30-beta3, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz optimize speed (overclock), US English"
BITMAP:37: error: no matching function for call to 'Display::Display()'
Display display;
^
C:\Users\duhjoker\Documents\Arduino\BITMAP\BITMAP.ino:37:9: note: candidates are:
In file included from C:\Users\duhjoker\Documents\Arduino\BITMAP\BITMAP.ino:19:0:
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:48:3: note: Display::Display(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)
Display(uint8_t cs,uint8_t wr ,uint8_t rs , uint8_t rest ,uint8_t pmw );
^
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:48:3: note: candidate expects 5 arguments, 0 provided
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:46:3: note: Display::Display(int16_t, int16_t)
Display(int16_t w, int16_t h);// Constructor
^
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:46:3: note: candidate expects 2 arguments, 0 provided
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:42:7: note: constexpr Display::Display(const Display&)
class Display : public Print
^
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:42:7: note: candidate expects 1 argument, 0 provided
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:42:7: note: constexpr Display::Display(Display&&)
C:\Users\duhjoker\Documents\Arduino\libraries\mylcd/DisplayRGB.h:42:7: note: candidate expects 1 argument, 0 provided
BITMAP:40: error: redefinition of 'Display display'
Display display(10,11,12,13,14);
^
BITMAP:37: error: 'Display display' previously declared here
Display display;
^
BITMAP: In function 'void setup()':
BITMAP:72: error: 'class Display' has no member named 'display'
display.display();
^
no matching function for call to 'Display::Display()'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
sketch
//#include "Adafruit_GFX.h"
#include "DisplayRGB.h"
#include <SPI.h>
// pin definition for the UNO
#define cs 11
#define wr 10
#define rs 12
//#define le 13
//#define D0 9
//#define D1 8
//#define D2 7
//#define D3 6
//#define D4 5
//#define D5 4
//#define D6 3
//#define D7 2
Display display;
//DisplayRGB TFTscreen(cs,wr,rs,le);
Display display(10,11,12,13,14);
// position of the line on screen
int xPos = 0;
const byte green_square[] PROGMEM = {
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,
B11111111,B11111111,};
// const byte *bitmap[] = {green_square};
void setup(){
// initialize the serial port
//TFTscreen.setdatapin(D0,D1,D2,D3,D4,D5,D6,D7);
display.begin();
// initialize the display
display.display();
// clear the screen with a pretty color
//TFTscreen.background(250,16,200);
}
void loop(){
display.drawBitmap(70, 70, green_square, 16, 16, 0x07E0);
}