PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

minimal.ino 849B

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include <SPI.h>
  2. #include <Adafruit_GFX.h>
  3. #include <TFT_ILI9163C.h>
  4. // Color definitions
  5. #define BLACK 0x0000
  6. #define BLUE 0x001F
  7. #define RED 0xF800
  8. #define GREEN 0x07E0
  9. #define CYAN 0x07FF
  10. #define MAGENTA 0xF81F
  11. #define YELLOW 0xFFE0
  12. #define WHITE 0xFFFF
  13. /*
  14. Teensy3.x and Arduino's
  15. You are using 4 wire SPI here, so:
  16. MOSI: 11//Teensy3.x/Arduino UNO (for MEGA/DUE refere to arduino site)
  17. MISO: 12//Teensy3.x/Arduino UNO (for MEGA/DUE refere to arduino site)
  18. SCK: 13//Teensy3.x/Arduino UNO (for MEGA/DUE refere to arduino site)
  19. the rest of pin below:
  20. */
  21. #define __CS 10
  22. #define __DC 9
  23. /*
  24. Teensy 3.x can use: 2,6,9,10,15,20,21,22,23
  25. Arduino's 8 bit: any
  26. DUE: check arduino site
  27. If you do not use reset, tie it to +3V3
  28. */
  29. TFT_ILI9163C tft = TFT_ILI9163C(__CS, __DC);
  30. void setup() {
  31. tft.begin();
  32. }
  33. void loop(void) {
  34. }