PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

40 rindas
960B

  1. /*
  2. Simple test of BTE block move
  3. */
  4. #include <SPI.h>
  5. #include <RA8875.h>
  6. #define RA8875_CS 4 //see below...
  7. #define RA8875_RESET 3//any pin or 255 to disable it!
  8. RA8875 tft = RA8875(RA8875_CS,RA8875_RESET);//arduino's
  9. void setup()
  10. {
  11. Serial.begin(38400);
  12. //long unsigned debug_start = millis ();
  13. //while (!Serial && ((millis () - debug_start) <= 400)) ;
  14. Serial.println("RA8875 start");
  15. tft.begin(RA8875_800x480);
  16. //fill a gradient, so we can test BTEing stuff around the screen
  17. for(int i=0;i<tft.height();i++) tft.drawLine(0,i,tft.width()-1,i,tft.Color565(map(i,0,tft.height(),128,40), map(i,0,tft.height(),255,40), map(i,0,tft.height(),40,128)));
  18. tft.setTextColor(RA8875_PINK,RA8875_BLUE);
  19. tft.setCursor(30,30);
  20. tft.print("HELLO WORLD!");
  21. //The transparent-move option uses the foreground colour as the transparent colour.
  22. tft.setTextColor(RA8875_BLUE);
  23. tft.BTE_move(20,20,30,30,200,200,0,0,true);
  24. }
  25. void loop()
  26. {
  27. }