Camera in sample for GR-PEACH

Dependencies:   GR-PEACH_video USBHost_custom

Video Links on how to setup and run Camera_in Application:

Your video will be live at: Part1 of 1

Camera in sample for GR-PEACH. While USER_BUTTON0 is pressed, it will save the image to the USB memory.

The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.

Please refer to following link about Audio/Camera Shield.

You can configure this sample application via the following definitions:


/**** User Selection *********/
#define VIDEO_INPUT_METHOD     (VIDEO_CVBS)        /* Select  VIDEO_CVBS or VIDEO_CMOS_CAMERA                       */
#define VIDEO_INPUT_FORMAT     (VIDEO_RGB888)      /* Select  VIDEO_YCBCR422 or VIDEO_RGB888 or VIDEO_RGB565        */
#define USE_VIDEO_CH           (0)                 /* Select  0 or 1            If selecting VIDEO_CMOS_CAMERA, should be 0.)               */
#define VIDEO_PAL              (0)                 /* Select  0(NTSC) or 1(PAL) If selecting VIDEO_CVBS, this parameter is not referenced.) */
    Specify how to input video data. The allowable value is either VIDEO_CVBS and VIDEO_CMOS_CAMERA
    Specify the color format of input video data. The allowable value is any of VIDEO_YCBCR422, VIDEO_RGB888 or VIDEO_RGB565. Note that the captured image data is saved as Bitmap file only when VIDEO_RGB888 is specified. Otherwise, it's saved in binary (raw) data format.
    Specify the channel of USB port to be used. The allowable value is either 0 or 1. For more details, please refer to the USB related description stated below.
    Specify the video data format. When the format is NTSC, 0 should be specified. Otherwise, 1 should be specified.
    Also, if you would like to configure higher resolution, you should change the definition PIXEL_HW and PIXEL_VW. In addition, you should revise sct file in order to increase the size of NC_BSS section.
    (Reference information : [other]How to change sct file in mbed online compiler)

#define PIXEL_HW               (320u)  /* QVGA */
#define PIXEL_VW               (240u)  /* QVGA */

Example of sct file modification is shown below:


    RW_DATA_NC 0x60900000 0x00100000
    { * (NC_DATA) }              ; Application RW data Non cached area

    ZI_DATA_NC +0
    { * (NC_BSS) }               ; Application ZI data Non cached area

    RW_DATA_NC 0x60800000 0x00100000
    { * (NC_DATA) }              ; Application RW data Non cached area

    ZI_DATA_NC +0
    { * (NC_BSS) }               ; Application ZI data Non cached area

  • USB channel available in this sample program
    By default, the GR-PEACH's USB connector (USB0) is configured to be used. When using USB0, please close GR-PEACH's JP3.

    Or, you can use the Audio/Camera Shield's USB connector (USB1). When using USB1, you need to close JP1 of Audio/Camera Shield.

    Also, in order to use USB1, you should change the USB_HOST_CH definition (define 0:USB0、define 1:USB1) as follows:


#define USB_HOST_CH                           0
#define USB_HOST_CH                           1