Skip to content

Commit f682e46

Browse files
committed
Update full sketch
1 parent d4cf348 commit f682e46

File tree

1 file changed

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

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,10 @@ void setup(){
321321
if (!cam.begin(CAMERA_R320x240, IMAGE_MODE, 30)){
322322
Serial.println("Unable to find the camera");
323323
}
324-
324+
countDownBlink();
325325
Serial.println("Fetching camera image...");
326326
unsigned char *imageData = captureImage();
327+
digitalWrite(LEDB, HIGH);
327328

328329
Serial.println("Saving image to SD card...");
329330
saveImage(imageData, IMAGE_PATH);
@@ -416,6 +417,15 @@ void saveImage(unsigned char *imageData, const char* imagePath){
416417
// Close the file stream
417418
fclose(file);
418419
}
420+
421+
void countDownBlink(){
422+
for (int i = 0; i < 6; i++){
423+
digitalWrite(LEDG, i % 2);
424+
delay(500);
425+
}
426+
digitalWrite(LEDG, HIGH);
427+
digitalWrite(LEDB, LOW);
428+
}
419429
```
420430
421431
## Conclusion

0 commit comments

Comments
 (0)