01palettetest.ino
1 // 16-bit Adafruit_GFX-compatible framebuffer for RP2350 HSTX 2 3 #include <Adafruit_dvhstx.h> 4 5 // If your board definition has PIN_CKP and related defines, DVHSTX_PINOUT_DEFAULT is available 6 DVHSTX8 display(DVHSTX_PINOUT_DEFAULT, DVHSTX_RESOLUTION_640x360); 7 // If you get the message "error: 'DVHSTX_PINOUT_DEFAULTx' was not declared" then you need to give 8 // the pins numbers explicitly, like the example below. The order is: {CKP, D0P, D1P, D2P} 9 // DVHSTX8 display({12, 14, 16, 18}, DVHSTX_RESOLUTION_640x360); 10 11 void setup() { 12 Serial.begin(115200); 13 //while(!Serial); 14 if (!display.begin()) { // Blink LED if insufficient RAM 15 pinMode(LED_BUILTIN, OUTPUT); 16 for (;;) digitalWrite(LED_BUILTIN, (millis() / 500) & 1); 17 } 18 Serial.println("display initialized"); 19 } 20 21 void loop() { 22 // Draw random lines 23 display.drawLine(random(display.width()), random(display.height()), random(display.width()), random(display.height()), random(65536)); 24 sleep_ms(1); 25 }