10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 029b8f6 commit 0bc3fa2Copy full SHA for 0bc3fa2
libraries/Portenta_Camera/examples/Envie_camera/Envie_camera.ino
@@ -1,21 +1,26 @@
1
+
2
#include "camera.h"
3
4
CameraClass cam;
5
+uint8_t fb[320*240] __attribute__((aligned(32)));
6
7
void setup() {
8
- Serial.begin(115200);
- //while (!Serial);
9
+ Serial.begin(921600);
10
11
+ // Init the cam
12
+ cam.begin(320, 240);
13
- // put your setup code here, to run once:
- cam.begin(324, 244);
- cam.start();
- //cam.testPattern(true);
14
+ // Skip 60 frames
15
+ cam.skip_frames(fb, 60);
16
}
17
18
void loop() {
19
// put your main code here, to run repeatedly:
20
if (Serial) {
- Serial.write(cam.grab(), 324 * 244);
21
+ // Grab frame and write to serial
22
+ if (cam.grab(fb) == 0) {
23
+ Serial.write(fb, 320*240);
24
+ }
25
26
0 commit comments