-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (25 loc) · 597 Bytes
/
main.cpp
File metadata and controls
32 lines (25 loc) · 597 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <Arduino.h>
#include <rm67162.h>
#include <TFT_eSPI.h>
#include "true_color.h"
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite sprite = TFT_eSprite(&tft);
#define HEIGHT LCD_V_RES
#define WIDTH LCD_H_RES
void setup()
{
Serial.begin(115200);
while (!Serial)
;
rm67162_init();
lcd_setRotation(1);
sprite.createSprite(WIDTH, HEIGHT);
sprite.setSwapBytes(1);
}
void loop()
{
Serial.println("Hello World T-Display");
sprite.pushImage(0, 0, WIDTH, HEIGHT, (uint16_t *)gImage_true_color);
lcd_PushColors(0, 0, WIDTH, HEIGHT, (uint16_t *)sprite.getPointer());
delay(2000);
}