Using Camera module, FTP Client on WIZwiki-W7500, send the image data to FTP Server.
Dependencies: CameraC328 SDFileSystem WIZnetInterface mbed-src
Fork of Camera_FTP_WIZwiki-W7500 by
Prerequisite
This example send the image data acquired from the camera to an FTP Server.
To implement this function, you need a Platform board, network Interface board, camera module.
Available camera modules are C328, LJ-DSC02. Because the cameras listed above all have similar internal protocols.
This example uses LJ-DSC02.
- WIZwiki-W7500 from WIZnet (Platform board and Ethernet I/F board)
- LJ-DSC02 (Camera module)
- FTP Server(AL FTP)
- Micro SD Card
Hardware Configuration
- connect Ethernet Cable & USB Cable
- connect Camera module
Software
Init FTP Server information
static char ID[]={"abc"}; //Set FTPServer Login ID
static char PASSWORD[]={"123"}; //Set FTPServer Login Password
const char ftpServer_control_ip_addr[] = "192.168.1.2";
Caution
Must fix FTP server ip, id, pass
Revision 3:55b7af329281, committed 2015-07-29
- Comitter:
- Ricky_Kwon
- Date:
- Wed Jul 29 01:39:43 2015 +0000
- Parent:
- 2:c469227cb913
- Child:
- 4:573ca8ea6629
- Commit message:
- optimization
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jul 22 01:14:39 2015 +0000
+++ b/main.cpp Wed Jul 29 01:39:43 2015 +0000
@@ -4,7 +4,7 @@
#include "CameraC328.h"
/* CAMERA */
-#define USE_JPEG_HIGH_RESOLUTION 1
+#define USE_JPEG_HIGH_RESOLUTION 3 //1=80x64 <--- not working -_-;;, 2=160x128, 3=320x240, 4=640x480
/* FTP */
#define USER "user "
@@ -83,7 +83,7 @@
const char ip_addr[] = "192.168.0.123";
const char mask_addr[] = "255.255.255.0";
const char gateway_addr[] = "192.168.0.1";
- const char ftpServer_control_ip_addr[] = "192.168.0.230";
+ const char ftpServer_control_ip_addr[] = "192.168.0.2";
EthernetInterface eth;
@@ -283,10 +283,14 @@
void test_jpeg_snapshot_picture(void) {
CameraC328::ErrorNumber err = CameraC328::NoError;
-#if USE_JPEG_HIGH_RESOLUTION
+#if (USE_JPEG_HIGH_RESOLUTION==1)
+ err = camera.init(CameraC328::Jpeg, CameraC328::RawResolution80x60, CameraC328::JpegResolution80x64);
+#elif (USE_JPEG_HIGH_RESOLUTION==2)
+ err = camera.init(CameraC328::Jpeg, CameraC328::RawResolution80x60, CameraC328::JpegResolution160x128);
+#elif (USE_JPEG_HIGH_RESOLUTION==3)
+ err = camera.init(CameraC328::Jpeg, CameraC328::RawResolution80x60, CameraC328::JpegResolution320x240);
+#elif (USE_JPEG_HIGH_RESOLUTION==4)
err = camera.init(CameraC328::Jpeg, CameraC328::RawResolution80x60, CameraC328::JpegResolution640x480);
-#else
- err = camera.init(CameraC328::Jpeg, CameraC328::RawResolution80x60, CameraC328::JpegResolution320x240);
#endif
if (CameraC328::NoError == err) {
printf("[ OK ] : CameraC328::init\r\n");
@@ -311,4 +315,4 @@
fclose(fp_jpeg);
-}
\ No newline at end of file
+}
