Skip to content

Commit dcc823f

Browse files
authored
Merge pull request #453 from arduino/marqdevx/portenta-vision-shield/camera2Bitmap
Vision Shield Camera to bitmap SD, fix sketch
2 parents 4cddd06 + bfec1b7 commit dcc823f

File tree

1 file changed

+5
-2
lines changed
  • content/hardware/04.pro/shields/portenta-vision-shield/tutorials/camera-to-bitmap-sd-card

1 file changed

+5
-2
lines changed

content/hardware/04.pro/shields/portenta-vision-shield/tutorials/camera-to-bitmap-sd-card/content.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ mbed::FATFileSystem fileSystem("fs");
9595
#include "himax.h" // Exclusive Camera library for the Portenta Vision Shield
9696
HM01B0 himax;
9797
Camera cam(himax);
98+
FrameBuffer fb; // Buffer to save the capture
9899
```
99100
100101
For the bitmap headers binary file we will need some information like the resolution of the image, the bits per pixel and more, so we define our settings as shown:
@@ -244,8 +245,8 @@ Once the capture is saved, remove the SD Card and plug it into a computer/phone
244245
#### Full Sketch
245246

246247
```cpp
247-
#include "SDMMCBlockDevice.h" // Multi Media Card APIs
248-
#include "FATFileSystem.h" // Mbed API for portable and embedded systems
248+
#include "SDMMCBlockDevice.h" // Multi Media Card APIs
249+
#include "FATFileSystem.h" // Mbed API for portable and embedded systems
249250
SDMMCBlockDevice blockDevice;
250251
mbed::FATFileSystem fileSystem("fs");
251252

@@ -254,6 +255,8 @@ mbed::FATFileSystem fileSystem("fs");
254255
HM01B0 himax;
255256
Camera cam(himax);
256257

258+
FrameBuffer fb; // Buffer to save the capture
259+
257260
// Settings for our setup
258261
#define RES_H (unsigned int)240
259262
#define RES_W (unsigned int)320

0 commit comments

Comments
 (0)