Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "Adafruit_ImageReader.h"
  2. #include "Adafruit_GFX.h"
  3. #include <SPI.h>
  4. #include <SD.h>
  5. #include "Adafruit_ILI9341.h"// Hardware-specific library
  6.  
  7. #include <MCUFRIEND_kbv.h>
  8. MCUFRIEND_kbv tft;
  9. #define YP A3  // must be an analog pin, use "An" notation!
  10. #define XM A2  // must be an analog pin, use "An" notation!
  11. #define YM 9   // can be a digital pin
  12. #define XP 8   // can be a digital pin
  13.  
  14. #include <Fonts\GOTHICBI30pt7b.h>
  15. #include <Fonts\GOTHICBI10pt7b.h>
  16.  
  17. #define BLACK 0x0000
  18. #define NAVY 0x000F
  19. #define DARKGREEN 0x03E0
  20. #define DARKCYAN 0x03EF
  21. #define MAROON 0x7800
  22. #define PURPLE 0x780F
  23. #define OLIVE 0x7BE0
  24. #define LIGHTGREY 0xC618
  25. #define DARKGREY 0x7BEF
  26. #define BLUE 0x001F
  27. #define GREEN 0x07E0
  28. #define CYAN 0x07FF
  29. #define RED 0xF800
  30. #define MAGENTA 0xF81F
  31. #define YELLOW 0xFFE0
  32. #define WHITE 0xFFFF
  33. #define ORANGE 0xFD20
  34. #define GREENYELLOW 0xAFE5
  35. #define PINK 0xF81F
  36.  
  37. Adafruit_ImageReader reader;
  38. Adafruit_Image img;
  39.  
  40. void setup() {
  41.   // put your setup code here, to run once:
  42.   Serial.begin(9600);
  43.   tft.reset();
  44.   tft.begin();
  45.   ImageReturnCode stat;
  46.   Adafruit_ImageReader reader;
  47.   Adafruit_Image img;
  48.   tft.setRotation(0);
  49.   tft.fillScreen(BLACK);
  50.  
  51.   tft.setFont(&GOTHICBI30pt7b);
  52.   tft.setTextSize(1);
  53.   tft.setTextColor(WHITE);
  54.  
  55.   tft.setCursor(5, 10);
  56.   tft.setFont(&GOTHICBI10pt7b);
  57.   tft.print("_______________________");
  58.   tft.setCursor(49, 166);
  59.   tft.setFont(&GOTHICBI30pt7b);
  60.   tft.print("192");
  61.   tft.setCursor(150, 166);
  62.   tft.setFont(&GOTHICBI10pt7b);
  63.   tft.print("km/h");
  64.   stat = reader.loadBMP("/tt_logo1.bmp", img);
  65.   img.draw(tft, 21, 180);
  66.   tft.setCursor(5, 300);
  67.   tft.print("_______________________");
  68.  
  69.  
  70. }
  71.  
  72. void loop(void) {
  73.   // put your main code here, to run repeatedly:
  74.  
  75. }
  76.  
  77.  
  78. //*
  79.  
  80.  
  81. C:\Users\ST\Documents\Arduino\192font\192font.ino: In function 'void setup()':
  82.  
  83. 192font:64:36: error: no matching function for call to 'Adafruit_Image::draw(MCUFRIEND_kbv&, int, int)'
  84.  
  85.    Adafruit_Image::draw(tft, 21, 180);
  86.  
  87.                                     ^
  88.  
  89. In file included from C:\Users\ST\Documents\Arduino\192font\192font.ino:1:0:
  90.  
  91. C:\Users\ST\Documents\Arduino\libraries\Adafruit_ImageReader-master/Adafruit_ImageReader.h:45:20: note: candidate: void Adafruit_Image::draw(Adafruit_SPITFT&, int16_t, int16_t)
  92.  
  93.      void           draw(Adafruit_SPITFT &tft, int16_t x, int16_t y);
  94.  
  95.                     ^
  96.  
  97. C:\Users\ST\Documents\Arduino\libraries\Adafruit_ImageReader-master/Adafruit_ImageReader.h:45:20: note:   no known conversion for argument 1 from 'MCUFRIEND_kbv' to 'Adafruit_SPITFT&'
  98.  
  99. exit status 1
  100. no matching function for call to 'Adafruit_Image::draw(MCUFRIEND_kbv&, int, int)'
  101. *//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement