In this example, the image data acquired from the camera is stored on the Micro SD card and displayed through a web browser.

Dependencies:   Ethernet_Camera_LS_Y201_SDcard SDFileSystem WIZnetInterface mbed

Fork of HTTP_SDcard_file_server_WIZwiki-W7500 by justin kim

Prerequisite

In this example, the image data acquired from the camera is stored on the Micro SD card and displayed through a web browser.

To implement this function, you need a Platform board, network Interface board, camera module.

This example uses LS-Y201 Camera module.

  • WIZwiki-W7500 from WIZnet (Platform board and Ethernet I/F board)
  • LS-Y201 (Camera module)
  • Micro SD Card

Hardware Configuration

/media/uploads/Ricky_Kwon/camera_ls-y201.png

  • connect Ethernet Cable & USB Cable
  • connect Camera module

Software

Init network information

#define IP      "192.168.0.100"
#define MASK    "255.255.255.0"
#define GATEWAY "192.168.0.1"
#define PORT    80

Caution

Must fix network information

Revision:
2:f2d70f552a3e
Parent:
0:fbb29d9ea96b
--- a/filelib.h	Tue Jun 23 03:44:18 2015 +0000
+++ b/filelib.h	Mon Jun 29 07:36:30 2015 +0000
@@ -72,9 +72,9 @@
     FRESULT res = f_stat(path,&finfo);    /* Get file status */
     if (EnDebugMSG)
         if (res)
-            printf("\n-->get_fileInfo:%s ,res=%d ,Not Found!",path,res);
+            printf("\r\n-->get_fileInfo:%s ,res=%d ,Not Found!",path,res);
         else
-            printf("\n-->get_fileInfo:%s ,res=%d ,Found!",path,res);
+            printf("\r\n-->get_fileInfo:%s ,res=%d ,Found!",path,res);
     return res;
 }
 
@@ -83,9 +83,9 @@
     FRESULT res= f_opendir (&dinfo,path);   /* FR_OK(0): successful, !=0: error code */
     if (EnDebugMSG)
         if (res)
-            printf("\n-->get_dirInfo :%s res=%d ,This is Not Directory!",path,res);
+            printf("\r\n-->get_dirInfo :%s res=%d ,This is Not Directory!",path,res);
         else
-            printf("\n-->get_dirInfo :%s res=%d ,This is Directory!",path,res);
+            printf("\r\n-->get_dirInfo :%s res=%d ,This is Directory!",path,res);
     return res;
 }
 
@@ -98,7 +98,7 @@
         buf->st_mode = 4;   //?
     }
     if (EnDebugMSG)
-        printf("\n--Mystat Path:%s ,filesize:%14lld ,res=%d",path, buf->st_size, res);
+        printf("\r\n--Mystat Path:%s ,filesize:%14lld ,res=%d",path, buf->st_size, res);
     return res;
 }
 
@@ -108,7 +108,7 @@
     char* extension;
     extension = strrchr( filename, '.' );   //get string after last .
     if (EnDebugMSG)
-        printf("\n-->get_mime_tipe filename:%s, extension:%s",filename, extension);
+        printf("\r\n-->get_mime_tipe filename:%s, extension:%s",filename, extension);
     if (extension !=NULL) {
         if (strcasecmp(extension,".htm")==0  || strcasecmp(extension,".html") ==0)
             return "text/html; charset=iso-8859-1";