#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
Adafruit_ILI9341 screen = Adafruit_ILI9341(10,11,12,9);
struct Color {
byte r;
byte g;
byte b;
};
void setup() {
// put your setup code here, to run once:
screen.begin();
Serial1.begin(115200);
Color mycolor = {.r=255};
screen.setTextColor(screen.color565(255,0,0));
screen.println("Hello, Raspberry Pi Pico W!");
}
void loop() {
// put your main code here, to run repeatedly:
delay(1); // this speeds up the simulation
}
int toColor(Color color) {
return (color.r / 255) * 64 + (color.g / 255) * 128 >> 6 + (color.b / 255) * 64 >> 13;
}
int toColor(Color* color) {
return (color->r / 255) * 64 + (color->g / 255) * 128 >> 6 + (color->b / 255) * 64 >> 13;
}Loading
pi-pico-w
pi-pico-w
Loading
ili9341-cap-touch
ili9341-cap-touch