# SDCardSaveJPEGTimelapse Example Saves 0KB Images

**URL:** https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591
**Category:** Peripherals
**Tags:** rtl8735b
**Created:** [December 2, 2024, 3:28pm UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591 "2024-12-02T15:28:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Clay](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Clay](https://forum.amebaiot.com/u/Clay)
#### Post date: [December 2, 2024, 3:28pm UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591/1 "2024-12-02T15:28:19Z")

</div>

I used the `SDCardSaveJPEGTimelapse` example program, but the images saved to the SD card are all 0KB.

It seems that `Camera.getImage(CHANNEL, &img_addr, &img_len);` cannot read the photos there.

I’m certain the CAMERA is functioning properly because it can perform object detection.

can’t find the reason at all…

---

<div class="post-metadata">

### Author: ![KaiFai\_Y](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kaifai_y/32/2252_2.png) [@KaiFai\_Y](https://forum.amebaiot.com/u/KaiFai_Y)
#### Post date: [December 3, 2024, 1:19am UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591/2 "2024-12-03T01:19:34Z")

</div>

Hi @Clay, i had tried on my side it seems to be working fine, however If the picture files shows 0kb then the pictures might have not properly moved/copied to the sd card. You may check on your sd card whether is working or remove and reinsert to AMB pro2. Thanks.

---

<div class="post-metadata">

### Author: ![Clay](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Clay](https://forum.amebaiot.com/u/Clay)
#### Post date: [December 3, 2024, 3:58am UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591/3 "2024-12-03T03:58:14Z")

</div>

thank you for your reply.

The SD card is working fine, and I have monitored that `img_len` is always equal to 0, which is why I suspect there is an issue with `Camera.getImage`.

Below are the messages I printed

11:56:47.666 → Build @ 15:49:32, Nov 11 2024

11:56:47.666 →

11:56:47.666 → $8735b\>[video\_voe\_presetting] fps:30 w:1920 h:1080

11:56:47.666 → fwin(1),enc\_en(0),IQ\_OFFSET = 0x17b60

11:56:47.666 → fwin(1),enc\_en(0),SENSOR\_OFFSET = 0x2fba0

11:56:47.666 → sensor id 1 iq\_data 17b60 sensor\_data 2fba0

11:56:47.666 → VOE not init

11:56:47.666 → VOE\_OUT\_CMD type 2 command fail -1

11:56:47.666 → hal\_voe\_ready 0x0 0x1718

11:56:47.666 → sensor timestamp: 2024/09/12

11:56:47.699 → iq timestamp: 2023/05/15 14:48:54

11:56:47.699 → The fcs setup is finished

11:56:47.699 → [VOE]load time sensor:254us iq:4587us itcm:1018us dtcm:52us ddr:12134us ddr2:11278us

11:56:47.699 → [VOE]VOELOAD(18045)/FCS(43427)/ISPReady(25836)/FrameDone(59614) KMRST(139438) us

11:56:47.746 → fcs\_start\_time 62 fcs\_voe\_time 71 frame\_done\_time 130

11:56:47.746 → g\_enc\_buff\_size 0 = 2356352

11:56:47.746 → g\_enc\_buff\_size 1 = 1163776

11:56:47.746 → g\_enc\_buff\_size 2 = 8

11:56:47.746 → Register disk driver to Fatfs.

11:56:47.825 → FATFS Register: disk driver 0

11:56:47.825 → SD\_Init 0

11:56:47.870 → part\_count = 0

---

<div class="post-metadata">

### Author: ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)
#### Post date: [December 3, 2024, 5:14am UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591/4 "2024-12-03T05:14:47Z")

</div>

Hi @Clay,

Can I check what SDK version are you using? Also what are your options that you set on the Arduino IDE when you compile and upload the example? For example, camera option and is fast camera start enabled?

Thank you.

---

<div class="post-metadata">

### Author: ![Clay](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Clay](https://forum.amebaiot.com/u/Clay)
#### Post date: [December 3, 2024, 6:21am UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591/5 "2024-12-03T06:21:05Z")

</div>

> [@Kelvin\_Huang](#):
>
> ra option and is fast camera start enabled?

Thanks for your reply

I am using Arduino 2.3.3

board manager 4.0.8

and

[https://github.com/ambiot/ambpro2\_arduino/raw/main/Arduino\_package/package\_realtek\_amebapro2\_index.json](https://github.com/ambiot/ambpro2_arduino/raw/main/Arduino_package/package_realtek_amebapro2_index.json)

setup is as follows:

 ![Screenshot 2024-12-03 141800](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/d/d76e3194b196c10f8303649ae2012521f255baf3.png)

---

<div class="post-metadata">

### Author: ![Clay](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Clay](https://forum.amebaiot.com/u/Clay)
#### Post date: [December 3, 2024, 6:30am UTC](https://forum.amebaiot.com/t/sdcardsavejpegtimelapse-example-saves-0kb-images/3591/6 "2024-12-03T06:30:39Z")

</div>

I just compiled it again, and it seems to work now.

Reinstalling the board manager 4.0.8 fixed the issue.

Thank you all! @Kelvin_Huang@KaiFai_Y
