27 lines
507 B
C++
27 lines
507 B
C++
|
|
#include "colors.h"
|
|
|
|
#include <Arduino.h>
|
|
#include <Adafruit_SSD1351.h>
|
|
#include <SPI.h>
|
|
|
|
|
|
#include "screen-settings.h"
|
|
|
|
SPIClass hspi(HSPI);
|
|
Adafruit_SSD1351 screen(SCREEN_WIDTH, SCREEN_HEIGHT, &hspi, CS_PIN, DC_PIN, RST_PIN);
|
|
|
|
void setup() {
|
|
screen.begin(32000000);
|
|
screen.fillScreen(0xFF4444_rgb565);
|
|
}
|
|
|
|
int hue = 0;
|
|
|
|
void loop() {
|
|
uint16_t color = HSL(hue, 100, 50).toRGB().alpha_blend_over_to565(RGB(00,50,00), 50);
|
|
screen.fillScreen(color);
|
|
hue += 1;
|
|
if (hue >= 360) hue -= 360;
|
|
delay(50);
|
|
} |