Robofun 機器人論壇

標題: Arduino image SD Ethernet 問題 [打印本頁]

作者: bye30    時間: 2014-5-6 10:02
標題: Arduino image SD Ethernet 問題
本帖最後由 bye30 於 2014-5-6 18:13 編輯

請問一下各位先進
SD照片只能存到512張 會是哪裡出問題呢?

以下是原版程式碼 該如何更改呢??
char filename[13];
  strcpy(filename, "IMAGE00.JPG");
  for (int i = 0; i < 100; i++) {
    filename[5] = '0' + i/10;
    filename[6] = '0' + i%10;
    // create if does not exist, do not open existing, write, sync after write
    if (! SD.exists(filename)) {
      break;


另外想把照片透過網路送到指定ip
指令有哪些可以參考呢?

感謝各位⋯
作者: vegewell    時間: 2014-5-8 03:29
回復 1# bye30


   try this code:
for (uint8_t i = 0; i < 100; i++) {

    filename[5] = i/10 + '0';

    filename[6] = i%10 + '0';

作者: vegewell    時間: 2014-5-8 04:12
本帖最後由 vegewell 於 2014-5-8 04:21 編輯

The SD library uses a static 512 byte buffer for the data. It is flushed when it gets full.同一序列的檔案名只能一次到512,
要多存就換檔名再存after flushed  buffer,




歡迎光臨 Robofun 機器人論壇 (https://robofun.net/forum/) Powered by Discuz! X3.2