not declared and argument/candidates explanations

ive been playing around building a library for the past few weeks and ive made a lot progress but now Im at a place where I needed a few custom functions called tilemap for a gaming library that this will upgrade.

i have the functions in the h file correct but now im stuck on the cpp file. So here are the 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"

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp: In member function 'void Adafruit_GFX::drawTilemap(int, int, const uint8_t*, const uint8_t**, uint8_t, uint8_t, uint8_t, uint8_t)':

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:464:6: error: 'flagcollision' was not declared in this scope

  if (flagcollision)numcolision = 0;                           //summoner123     //Line 735 - clear numcolision - ADD by Summoner123

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:464:20: error: 'numcolision' was not declared in this scope

  if (flagcollision)numcolision = 0;                           //summoner123     //Line 735 - clear numcolision - ADD by Summoner123

                    ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:472:72: error: no matching function for call to 'Adafruit_GFX::drawBitmap(int8_t&, int8_t&, uint8_t&, uint8_t&, const uint8_t*&)'

     drawBitmap(drawX, drawY, tile_width, tile_height, spritesheet[tile]);                          //summoner123

                                                                        ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:472:72: note: candidates are:

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:352:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:352:6: note:   candidate expects 6 arguments, 5 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:370:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:370:6: note:   candidate expects 7 arguments, 5 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:387:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, uint8_t*, int16_t, int16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:387:6: note:   candidate expects 6 arguments, 5 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:403:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, uint8_t*, int16_t, int16_t, uint16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:403:6: note:   candidate expects 7 arguments, 5 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:474:9: error: 'flagcollision' was not declared in this scope

     if (flagcollision) {                                                            //summoner123

         ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:475:6: error: 'solid' was not declared in this scope

      solid[numcolision].x = drawX;                     //Save X coordinate      - ADD by Summoner123

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:475:12: error: 'numcolision' was not declared in this scope

      solid[numcolision].x = drawX;                     //Save X coordinate      - ADD by Summoner123

            ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:482:88: error: no matching function for call to 'Adafruit_GFX::drawBitmap(int8_t&, int8_t&, uint8_t&, uint8_t&, const uint8_t*&, uint8_t&, uint8_t&, uint8_t&, uint8_t&)'

     drawBitmap(drawX, drawY, tile_width, tile_height, spritesheet[tile], dx, dy, dw, dh);   //summoner123

                                                                                        ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:482:88: note: candidates are:

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:352:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:352:6: note:   candidate expects 6 arguments, 9 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:370:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:370:6: note:   candidate expects 7 arguments, 9 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:387:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, uint8_t*, int16_t, int16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:387:6: note:   candidate expects 6 arguments, 9 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:403:6: note: void Adafruit_GFX::drawBitmap(int16_t, int16_t, uint8_t*, int16_t, int16_t, uint16_t, uint16_t)

 void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,

      ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:403:6: note:   candidate expects 7 arguments, 9 provided

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp: In member function 'void Adafruit_GFX::drawChar(int16_t, int16_t, unsigned char, uint16_t, uint16_t, uint8_t)':

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src\utility\Adafruit_GFX.cpp:586:14: warning: unused variable 'xa' [-Wunused-variable]

              xa = pgm_read_byte(&glyph->xAdvance);

              ^

Error compiling for board Teensy 3.2 / 3.1.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

maybe some one could explain this in lay term? i would appreciate any help

I don’t understand about the not declared in this scope stuff I copied the tile map commands straight from the original code and I’ve double and triple checked.

The candidate argument thing really confuses me. It’s I have more than need but o don’t know what exactly to do with it

LCD_2000_7775.zip (277 KB)

This one is self-explanatory:-error: 'flagcollision' was not declared in this scopeThat variable hasn’t been declared. Not just locally - not at all, either in the *.h or *.cpp file.

Same with this one:-error: 'numcolision' was not declared in this scopeIt’s not declared in either file.

error: 'solid' was not declared in this scopeAs in the cases above. ‘solid’ is a variable that’s referenced a number of times, but has never been declared, either in the *.h or *.cpp file.

(I quickly searched both the *.h and *.cpp file for the above variables, and they simply don’t exist.)

As explained the other day, “candidate” is a function that closely matches the function that you call.
The error occurs because the passed parameters are wrong, in this case, the number of parameters.
That’s what this refers to:-note:  candidate expects 6 arguments, 5 provided(‘argument’ means ‘parameter’)

You rock!!!! So I need to check the variables in the () parameters and correct them so they match with the .h file?

And a super thank you on the collision stuff now I know what to look for.

Ok the collision stuff was a piece of cake. Seems I absent mindedly for got to add the declarations from the Gamebuino but now I have them at line 122 in the .h file.

Duhjoker:
You rock!!!! So I need to check the variables in the () parameters and correct them so they match with the .h file?

In reality, the parameters will no doubt be used within the function, so the parameters in the function prototype in the header file need to match the function, rather than the other way around.
Removing the parameters from the function will result in errors, when the variables are used but they haven't been passed to the function.
That's where you'll need a good understanding of exactly what the function will achieve.

It actually sounds like there might be overridden functions, with each version requiring a different number of parameters, but you only copied one of the versions. Just guessing there.

What I mean there is that you can have multiple versions of a function, all with the same name, but each requiring different parameters.
e.g.

void func(void)
{
    // Do stuff
}

void func(int ival)
{
    // Do stuff
}

void func(int iVal, char* aString)
{
    // Do stuff
}

Then, the correct version of the function is called depending on the parameters that are passed:-
func();would call the first version.

func(58);would call the second version, etc.

Maybe you didn't copy over all versions of the functions. That would explain the mismatch in the number of parameters that are required.

Ok the collision stuff was a piece of cake. Seems I absent mindedly for got to add the declarations from the Gamebuino but now I have them at line 122 in the .h file.

At least this bit was straightforward. :slight_smile:

Ok it's just not clicking with me. I checked the .h versions with the .cpp versions using the given lines in the errors but the errors are way off from what is in the parameters

Cpp352 candidate expects 6 arguments 5 provided
Cpp370 void adafruit_gfx::drawBitMap(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t, uint16_t) ////which makes no since

Actual Cpp line 370

Void adafruit_gfx::drawBitMap (int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) 6 arguments

Matching function in .h

Line 61

DrawBitMap(int16_t X, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg), 7 arguments

Wtf??? Lol!!!!!

And why did it give this error now? It compiled before I added the tilemap stuff.

The first thing I see in your above post is this:-drawBitMap(``DrawBitMap(I guess that's just a typo on your part.

What you're not understanding is that it's the call to the function that's passing the wrong number of parameters. You're only looking at the prototype and the definition, not the call to the function from elsewhere.

That will either be in the *.ino file that you're trying to compile, or in another library that uses the GFX library and calls 'drawBitmap()'

This 'drawbitmap()' takes 5 parameters:-

void  LCD_2000_7775::drawbitmap(uint16_t* data, uint16_t x ,uint16_t y,uint16_t with , uint16_t height)
{

(It's in line 232 of "LCD_2000_7775.cpp", and the prototype is in line 37 of the associated header file.)
Maybe the calls or spelling are being mixed up somewhere along the way?

I can't see the code you're compiling, which is very likely where the problem stems from.

If you don't already have it, get a copy of 'grep', or 'grepWin' if you're using Windows, and it'll make things a lot easier when it comes to searching for this stuff.

Anyway, I've spent quite a bit of time on this already today. I need to do some other stuff right now.

As always I appreciate your help. Ok so I really wanted to get rid of all the “processing like primatives” stuff with the background and fill and stuff. I’m only gonna be using the it for displaying bit maps and tile maps made up of bit maps so it’s just wasting space and adding to the confusion.

Problem is that the examples use some of that to display the bar graph. So I need to write a function to display a bitmap instead so I can test it properly.

Now in Gamebuino, the function would go…

#include <SPI.h>
#include <Gamebuino.h>

Gamebuino gb;

Void loop(){

if.(gb.update()){


gb.display.drawBitmap(player_x, player_y, "bitmap name");

}

Here’s a pic of an example from the dk,

Would I use TFTscreen.display.drawBitmap?

ok so I started over one more time, cleaned a lot of it out like all the stuff mentioned earlier. I think correcting the typo in lcd_2000_7775.h fixed the problem with the arguments. I also removed more I didn’t need like, void drawPixel, marked out the virtual void in favor of not virtual from lines 29 to 36 gfx.h. Notes in both gfx files showing all changes.

I know that this is rookie thing but I cant get it ive looked at my reference and I don’t see what im missing unless its more arguments in the command. 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: In function 'void loop()':
BITMAP:76: error: expected primary-expression before ',' token
 TFTscreen.drawBitmap(0,0,sever_front_1,color,); 

                                             ^

BITMAP:76: error: expected primary-expression before ')' token
 TFTscreen.drawBitmap(0,0,sever_front_1,color,); 

                                              ^

expected primary-expression before ',' token

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

sketch listed in attached files named bitmap

/*
  Arduino LCD-2000-7775 TFT text example For UNO
  
  This example demonstrates how to draw text on the 
  TFT with an Arduino. The Arduino reads the value 
  of an analog sensor attached to pin A0, and writes 
  the value to the LCD screen, updating every
  quarter second.
  
  This example code is in the public domain

  Created 30 April 2014 by INHAOS
 
  http://www.inhaos.com
 
 */

#include <LCD_2000_7775.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

//LCD_2000_7775 TFTscreen(cs,wr,rs,le);
LCD_2000_7775 TFTscreen(cs,wr,rs);

// position of the line on screen
//int xPos = 0;


const byte sever_front_1[] PROGMEM = {16,16,0x00,0xff,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0xff,0x00,0x00
,0x00,0xff,0xff,0xff,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xff,0xff,0xff,0x00,0x00
,0x00,0x00,0x00,0xff,0xff,0x07,0xff,0xff,0xff,0x07,0xff,0xff,0x00,0x00,0x00,0x00
,0x00,0xff,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00
,0x00,0xff,0x00,0x07,0xf6,0x07,0xf6,0xf6,0xf6,0x07,0xf6,0x07,0x00,0x00,0x00,0x00
,0x00,0xff,0x07,0xf6,0xf6,0x07,0xf6,0xf6,0xf6,0x07,0xf6,0xf6,0x07,0x00,0x00,0x00
,0x00,0xff,0x07,0x07,0xf6,0xf6,0xf6,0x07,0xf6,0xf6,0xf6,0x07,0x07,0x07,0x07,0x00
,0x00,0xff,0x07,0xff,0x07,0x07,0xf6,0xf6,0xf6,0x07,0x07,0x07,0xff,0xff,0xff,0x07
,0x00,0xff,0x07,0xff,0xff,0x07,0x07,0x07,0x07,0x07,0x07,0xff,0x07,0x07,0x07,0xff
,0x07,0x07,0x07,0xff,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xff,0x07,0xf6,0x07,0xff
,0x07,0xf6,0xf6,0x00,0xff,0x07,0xff,0xff,0xff,0xff,0x07,0xff,0x07,0xf6,0x07,0xff
,0x07,0xf6,0xf6,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xff,0x07,0x07,0x07,0xff
,0x00,0xff,0x00,0x07,0x07,0xff,0x07,0x07,0x07,0x07,0x07,0xff,0xff,0xff,0xff,0x00
,0x00,0x00,0x00,0x07,0xff,0xff,0x07,0x07,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0xf6,0xf6,0xf6,0x00,0x00,0xf6,0xf6,0xf6,0xf6,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00
};

void setup(){
  // initialize the serial port
  TFTscreen.setdatapin(D0,D1,D2,D3,D4,D5,D6,D7);
  TFTscreen.begin();

  // initialize the display
  TFTscreen.begin();

  // clear the screen with a pretty color
  //TFTscreen.background(250,16,200); 
}

void loop(){

{
TFTscreen.drawBitmap(0,0,sever_front_1,color,); 
}
}

oops accidentally gave wrong file. file is now proper

VERSION3.zip (275 KB)

This:-

BITMAP:76: error: expected primary-expression before ')' token
 TFTscreen.drawBitmap(0,0,sever_front_1,color,);

is because of the comma after “color”.
5 parameters are expected.
ie There’s a parameter missing.

And in the example, “BITMAP.ino”, you only passed 3 parameters. (No “color” even).:-

TFTscreen.drawBitmap(0,0,sever_front_1,);

But then, when all 5 parameters are passed, there are other errors relating to passing the wrong types.

In the version of ‘drawBitmap()’ that takes 5 parameters, the third parameter is supposed to be ‘uint16_t’, but you pass a ‘const byte*’.

You’ll have to do some more digging.

As I’ve indicated a number of times, you’ve taken on a job that requires a better understanding of the language, so I think you’re doomed to failure.
(Although not an expert, I have considerably more experience than you, and I wouldn’t take on this project.)

All right I think I may have found something. I opened up an un-modified version of the LCD_2000_7785 library specifically the adafruit GFX files and it seems I only need one of the DrawBitMap functions. Looks the same with the 7775 files too.

So I think I can remove the extras and replace the functions with the ones from the original file.

I am a lil confused about the color parameter. What do I add there? The word color, the color an integer naming the color?

Duhjoker:
I am a lil confused about the color parameter. What do I add there? The word color, the color an integer naming the color?

If you don't know, I sure don't.
I've already deleted everything, but from memory a 'uint16_t' is called for.
Check out the original examples.

Starting to wear thin but back to to the drawBitMap problem with the arguments. Ok after changing the files to one drawBitMap and filling in all 6 variables I still get the problem.

I'm wondering if I should place all the drawBitMap commands in all 4 LCD files.

All right so when I call a function and I've got several versions, are the arguments provided (when provided correctly) telling the compiler which drawBitMap to use?

Duhjoker:
All right so when I call a function and I've got several versions, are the arguments provided (when provided correctly) telling the compiler which drawBitMap to use?

Yep, like in this:-

void setup()
{
    Serial.begin(115200);
    byte bVal = 14;
    int iVal = 23;
    int iVal2 = 10;
    func(iVal);             // Prints 46
    func(iVal, iVal2);      // Prints 33
    func(bVal);             // Prints 16
}

void loop() {}

void func(int iVal)
{
    iVal *= 2;
    Serial.println(iVal);
}

void func(int val1, int val2)
{
    int iResult = val1 + val2;
    Serial.println(iResult);
}

void func(byte bVal)
{
    bVal += 2;
    Serial.println(bVal);
}

Awesome. I wanted to make sure I understood that.

Ok so in the LCD's regular source files the .h and the.cpp only have one version of drawBitMap in its code but the GFX file has four.

Would you guess that this was done on purpose or do you think that I should add the same bitmap functions to the 7775 files.

Duhjoker:
Awesome. I wanted to make sure I understood that.

Ok so in the LCD's regular source files the .h and the.cpp only have one version of drawBitMap in its code but the GFX file has four.

Would you guess that this was done on purpose or do you think that I should add the same bitmap functions to the 7775 files.

I guess that depends on how and where they're used. I don't have the files in front of me any more. (But a guess isn't the right approach. You need to study the library files and examples to get the proper answer.
I got tired of downloading the latest version of it every day and spending all that time searching through the files to help you correct minor mistakes.

You have a vested interest in it, because you want to use the finished project, but I have no such motivation, and it's already become tiresome, I'm afraid.
(That's why nobody else is replying.)

Perhaps you should have started a thread in the "Gigs and Collaborations" section, and asked for someone that felt like putting in the time to work along with you from start to end. Someone that actually had a use for the finished item.

Ok so I looked up the draw bit map functions for the adafruit GFX library and I think I might have figured out what I'm doing wrong with the sketch and the bitmap images. I found this....

You can draw small monochrome (single color) bitmaps, good for sprites and other mini-animations or icons:

void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color);

This issues a contiguous block of bits to the display, where each '1' bit sets the corresponding pixel to 'color,' while each '0' bit is skipped. x, y is the top-left corner where the bitmap is drawn, w, h are the width and height in pixels.
The bitmap data must be located in program memory using the PROGMEM directive. This is a somewhat advanced function and beginners are best advised to come back to this later. For an introduction, see the Arduino tutorial on PROGMEM usage.

Ok so I know about Progmem but what I don't get with this is if I am supposed to store my image in binary to Progmem

Const byte water Progmem = {00000000,00110000, etc
Const byte terrain Progmem = { 10001000,0110011, etc

then assign it an integer by grouping the bit maps all together

Const byte bitmaps = {water, bridge}

So the const would 1 for water or 2 for bridge

Also needed is to define the colors and thier 0xFFFF hex code, then put the name of the color in the parameters. If I want multiple colored bit sprites bit maps I have to call the function as many times as I want colors.

So I think TFTscreen.drawBitmap( 70= integer y, 70= integer X, 1= bitmap const integer, integer H = pixel height, integer W = pixel width, color as defined above);

The first two are screen coordinates then the bitmap name or const integer height in pixels, width in pixels and the color previously defined.

Ummmmm got bored and decided to see what the difference was between the LCD's GFX library and the teensy. There's not much of a difference and I see nothing that would hinder the teensy programming if I used the LCD's GFX Library.

I really need to start reading all my library files instead of skimming them and do comparisons before even starting work. So here I went from 0 to stupid and let fly.

I compared the differences between the LCD's GFX file and the teensy's and they are exactly the same.

If I had known that, it would have saved us all some time and frustration but that's what you call not a rookie mistake but a typhoon.

So now all I have to do is add the needed functions and try to compile them. After all the tries I made this should be a piece of cake. At least I hope so.

ok so I rewrote most of the sketch by making the bitmap out of binary and storing it to progmem then created a const byte *bitmap and turned that into a const byte. but when I complile this function

drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap,int16_t w, int16_t h, uint16_t color),

which the arguments are… placement X, placement Y, const byte of bitmap, bitmap height, bitmap width, color.

ive defined the color but it still gives me argument errors and also says by binary is not declared. Every thing I try fails.numbers words everything.

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:46: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:47: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:48: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:49: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:50: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:51: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:52: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:53: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:54: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:55: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:56: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:57: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:58: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:59: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:60: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,

  ^

BITMAP:61: error: 'B1111111111111111' was not declared in this scope
  B1111111111111111,};

  ^

BITMAP: In function 'void loop()':
BITMAP:80: error: no matching function for call to 'LCD_2000_7775::drawBitmap(int, int, const byte [1], int, int, int)'
 TFTscreen.drawBitmap(70, 70, green_square, 16, 16, GREEN); 

                                                         ^

C:\Users\duhjoker\Documents\Arduino\BITMAP\BITMAP.ino:80:57: note: candidate is:

In file included from C:\Users\duhjoker\Documents\Arduino\BITMAP\BITMAP.ino:19:0:

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src/LCD_2000_7775.h:34:8: note: void LCD_2000_7775::drawBitmap(uint16_t*, uint16_t, uint16_t, uint16_t, uint16_t)

   void drawBitmap(uint16_t* data, uint16_t x ,uint16_t y,uint16_t with , uint16_t height);

        ^

C:\Users\duhjoker\Documents\Arduino\libraries\LCD_2000_7775\src/LCD_2000_7775.h:34:8: note:   candidate expects 5 arguments, 6 provided

'B1111111111111111' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
#include <LCD_2000_7775.h>

#define GREEN  0X07E0
 
 // 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

//LCD_2000_7775 TFTscreen(cs,wr,rs,le);
LCD_2000_7775 TFTscreen(cs,wr,rs);

// position of the line on screen
//int xPos = 0;


const byte green_square[] PROGMEM = {
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,
 B1111111111111111,};

 const byte *bitmap[] = {green_square};

void setup(){
  // initialize the serial port
 // TFTscreen.setdatapin(D0,D1,D2,D3,D4,D5,D6,D7);
  TFTscreen.begin();

  // initialize the display
  TFTscreen.begin();

  // clear the screen with a pretty color
  //TFTscreen.background(250,16,200); 
}

void loop(){


TFTscreen.drawBitmap(70, 70, green_square, 16, 16, GREEN); 
}

LCD_2000_7775.zip (277 KB)

Duhjoker:
Every thing I try fails.numbers words everything.

It's time for you to accept the fact that you have no idea what you're doing. I've hinted at that a number of times, but you haven't taken any notice.

If it's really important to you to get this working, you have two options:-

  1. Put it aside, go away and learn the C++ language, then return and have another go at it.
  2. Get someone else to do it.

You're in waaay over your head.

Sorry to be so blunt, but I had to say something. This is like watching a very slow train wreck. :frowning:

I think once I figure out the correct way to display a bitmap I'll be fine. The code for color bit maps is quite different from what I'm used to and I need to figure out how GFX does it. Adafruit has learning pages bu they only do a small part of the drawBitMap function and no actual tutorials. I hate vaguery!

On the binary I figured that out. I should be doing them in groups of 8 instead of 16.