Advertisement
Guest User

Untitled

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