stream to the display via usb
The snippet can be accessed without any authentication.
Authored by
schneider
snippetfile1.txt 827 B
```
stty -F /dev/ttyACM1 -icrnl -imaxbel -onlcr -opost -isig -icanon -echo
ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -f rawvideo -pix_fmt rgb565 -s 160x80 -r 8 -vcodec rawvideo - > /dev/ttyACM1
```
diff --git a/epicardium/main.c b/epicardium/main.c
index 75bb9c7..65644e7 100644
--- a/epicardium/main.c
+++ b/epicardium/main.c
@@ -54,6 +54,16 @@ int main(void)
LOG_ERR("startup", "USB-Serial unavailable");
}
+ uint8_t buf[160 * 80 * 2];
+
+ while (1) {
+ for (int i = 0; i < 160 * 80 * 2; i += 2) {
+ buf[i + 1] = cdcacm_read();
+ buf[i] = cdcacm_read();
+ }
+ LCD_Set(buf, sizeof(buf));
+ }
+
fatfs_init();
api_interrupt_init();
stream_init();
Please register or sign in to comment