How to use the camera
The camera is another I2C peripheral, but to display video we need to read the array pixels that make up an image and write their values to the GLCD very rapidly. We achieve this by using Direct Memory Access (DMA) to stream image frames directly to the GLCD rather than writing individual values as we did for the audio codec demo. We'll name this recipe cameraDemo_c6v0
.
How to do it…
- Create a new project named
cameraDemo
. Using the RTE manager, go to Board Support and select the Camera (API) and Graphic LCD (API) software components. - Set the CMSIS and Device software components, as we've done for previous projects. Set the Use MicroLIB project option.
- Create a file named
cameraDemo.c
and add boilerplate code to configure clocks, ...
Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.