#include <stdint.h> #include <LCD.h> #include <SPI.h> #include <XPT2046.h> #include <Touch.h> #include <EEPROM.h> long x = 0; void setup() { SPI.setDataMode(SPI_MODE3); SPI.setBitOrder(MSBFIRST); SPI.setClockDivider(SPI_CLOCK_DIV4); SPI.begin(); Tft.lcd_init(); Tft.lcd_clear_screen(BLACK); Tft.lcd_display_string(10, 10, (const uint8_t *)"ArduBlock EN", FONT_1206, WHITE); Tft.lcd_display_string(10, 30, (const uint8_t *)"ArduBlock EN", FONT_1608, WHITE); } void loop() { Tft.lcd_display_num(10, 60, x, 4, 16, BLACK); x = x + 1; Tft.lcd_display_num(10, 60, x, 4, 16, WHITE); delay(1000); }
Открыть пример: Online ArduBlock
Видеоурок: