pico-bt-display/src/main.c
Minecon724 21fe876c0b
more work
life update yes I did get an icecream. it wasn't very good tho
2024-05-16 17:41:41 +02:00

31 lines
No EOL
725 B
C

#include "hardware/gpio.h"
#include "pico/stdlib.h"
#include "constants.h"
#include "st7789_lcd.h"
#include "bt4502.h"
int main() {
gpio_init(PICO_DEFAULT_LED_PIN);
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
lcd_initialize();
if (bt_initialize() != 0) {
return 1;
}
lcd_start_pixels();
for (int y = 0; y < SCREEN_HEIGHT; ++y) {
for (int x = 0; x < SCREEN_WIDTH; ++x) {
//uint16_t colour = 31; // red
//st7789_lcd_put(pio, sm, colour >> 8);
// st7789_lcd_put(pio, sm, colour & 0xff);
lcd_put_rgb(0, 0, 255);
}
}
lcd_end_pixels();
gpio_put(PICO_DEFAULT_LED_PIN, 1);
sleep_ms(1000);
lcd_backlight(0);
}