test public
Dependencies: HttpServer_snapshot_mbed-os
mbed-gr-libs/EasyAttach_CameraAndLCD/README.md@0:e9fd5575b10e, 2019-10-18 (annotated)
- Committer:
- anhtran
- Date:
- Fri Oct 18 03:09:43 2019 +0000
- Revision:
- 0:e9fd5575b10e
abc
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
anhtran | 0:e9fd5575b10e | 1 | # Easy Attach Camera And LCD - Easily add all supported Camera and LCD to your mbed OS project |
anhtran | 0:e9fd5575b10e | 2 | |
anhtran | 0:e9fd5575b10e | 3 | Just declare the desired camera and LCD in your `mbed_app.json` file, and call `EasyAttach_Init()` from your application. |
anhtran | 0:e9fd5575b10e | 4 | |
anhtran | 0:e9fd5575b10e | 5 | ## Enable camera and LCD |
anhtran | 0:e9fd5575b10e | 6 | |
anhtran | 0:e9fd5575b10e | 7 | Add the following to your ``mbed_app.json`` file: |
anhtran | 0:e9fd5575b10e | 8 | |
anhtran | 0:e9fd5575b10e | 9 | ```json |
anhtran | 0:e9fd5575b10e | 10 | { |
anhtran | 0:e9fd5575b10e | 11 | "config": { |
anhtran | 0:e9fd5575b10e | 12 | "camera":{ |
anhtran | 0:e9fd5575b10e | 13 | "help": "0:disable 1:enable", |
anhtran | 0:e9fd5575b10e | 14 | "value": "1" |
anhtran | 0:e9fd5575b10e | 15 | }, |
anhtran | 0:e9fd5575b10e | 16 | "lcd":{ |
anhtran | 0:e9fd5575b10e | 17 | "help": "0:disable 1:enable", |
anhtran | 0:e9fd5575b10e | 18 | "value": "1" |
anhtran | 0:e9fd5575b10e | 19 | } |
anhtran | 0:e9fd5575b10e | 20 | } |
anhtran | 0:e9fd5575b10e | 21 | } |
anhtran | 0:e9fd5575b10e | 22 | ``` |
anhtran | 0:e9fd5575b10e | 23 | |
anhtran | 0:e9fd5575b10e | 24 | ## Specifying Camera and LCD |
anhtran | 0:e9fd5575b10e | 25 | |
anhtran | 0:e9fd5575b10e | 26 | Add the following to your ``mbed_app.json`` file: |
anhtran | 0:e9fd5575b10e | 27 | |
anhtran | 0:e9fd5575b10e | 28 | ```json |
anhtran | 0:e9fd5575b10e | 29 | { |
anhtran | 0:e9fd5575b10e | 30 | "config": { |
anhtran | 0:e9fd5575b10e | 31 | "camera":{ |
anhtran | 0:e9fd5575b10e | 32 | "help": "0:disable 1:enable", |
anhtran | 0:e9fd5575b10e | 33 | "value": "1" |
anhtran | 0:e9fd5575b10e | 34 | }, |
anhtran | 0:e9fd5575b10e | 35 | "camera-type":{ |
anhtran | 0:e9fd5575b10e | 36 | "help": "Please see EasyAttach_CameraAndLCD/README.md", |
anhtran | 0:e9fd5575b10e | 37 | "value": "CAMERA_CVBS" |
anhtran | 0:e9fd5575b10e | 38 | }, |
anhtran | 0:e9fd5575b10e | 39 | "lcd":{ |
anhtran | 0:e9fd5575b10e | 40 | "help": "0:disable 1:enable", |
anhtran | 0:e9fd5575b10e | 41 | "value": "1" |
anhtran | 0:e9fd5575b10e | 42 | }, |
anhtran | 0:e9fd5575b10e | 43 | "lcd-type":{ |
anhtran | 0:e9fd5575b10e | 44 | "help": "Please see EasyAttach_CameraAndLCD/README.md", |
anhtran | 0:e9fd5575b10e | 45 | "value": "GR_PEACH_4_3INCH_SHIELD" |
anhtran | 0:e9fd5575b10e | 46 | } |
anhtran | 0:e9fd5575b10e | 47 | } |
anhtran | 0:e9fd5575b10e | 48 | } |
anhtran | 0:e9fd5575b10e | 49 | ``` |
anhtran | 0:e9fd5575b10e | 50 | |
anhtran | 0:e9fd5575b10e | 51 | | camera-type "value" | Description | |
anhtran | 0:e9fd5575b10e | 52 | |:---------------------------|:-----------------------------------| |
anhtran | 0:e9fd5575b10e | 53 | | CAMERA_CVBS | GR-PEACH NTSC signal | |
anhtran | 0:e9fd5575b10e | 54 | | CAMERA_MT9V111 | GR-PEACH MT9V111 | |
anhtran | 0:e9fd5575b10e | 55 | | CAMERA_OV7725 | GR-LYHCEE included camera | |
anhtran | 0:e9fd5575b10e | 56 | | CAMERA_OV5642 | GR-PEACH OV5642 | |
anhtran | 0:e9fd5575b10e | 57 | | CAMERA_WIRELESS_CAMERA | GR-PEACH Wireless/Camera shield (OV7725) | |
anhtran | 0:e9fd5575b10e | 58 | | CAMERA_RASPBERRY_PI | RZ/A2M Raspberry Pi camera | |
anhtran | 0:e9fd5575b10e | 59 | |
anhtran | 0:e9fd5575b10e | 60 | | lcd-type "value" | Description | |
anhtran | 0:e9fd5575b10e | 61 | |:---------------------------|:-----------------------------------| |
anhtran | 0:e9fd5575b10e | 62 | | GR_PEACH_4_3INCH_SHIELD | GR-PEACH 4.3 inch LCD shield | |
anhtran | 0:e9fd5575b10e | 63 | | GR_PEACH_7_1INCH_SHIELD | GR-PEACH 7.1 inch LCD shield | |
anhtran | 0:e9fd5575b10e | 64 | | GR_PEACH_RSK_TFT | GR-PEACH RSK board LCD | |
anhtran | 0:e9fd5575b10e | 65 | | GR_PEACH_DISPLAY_SHIELD | GR-PEACH Display Shield | |
anhtran | 0:e9fd5575b10e | 66 | | GR_LYCHEE_TF043HV001A0 | GR-LYHCEE TF043HV001A0 | |
anhtran | 0:e9fd5575b10e | 67 | | GR_LYCHEE_ATM0430D25 | GR-LYHCEE ATM0430D25 | |
anhtran | 0:e9fd5575b10e | 68 | | GR_LYCHEE_FG040346DSSWBG03 | GR-LYHCEE FG040346DSSWBG03 | |
anhtran | 0:e9fd5575b10e | 69 | | GR_LYCHEE_LCD | GR-LYHCEE TF043HV001A0 (For compatibility) | |
anhtran | 0:e9fd5575b10e | 70 | | RZ_A2M_LVDS_TO_HDMI | RZ/A2M LVDS To HDMI Board | |
anhtran | 0:e9fd5575b10e | 71 | | RZ_A2M_EVB_RSK_TFT | RZ/A2M RSK TFT APP BOARD | |
anhtran | 0:e9fd5575b10e | 72 | | RZ_A2M_DVI_STICK | RZ/A2M Display Output Board | |
anhtran | 0:e9fd5575b10e | 73 | |
anhtran | 0:e9fd5575b10e | 74 | If camera-type and lcd-type are not specified, the following are specified. |
anhtran | 0:e9fd5575b10e | 75 | * ``GR-PEACH`` camera:CAMERA_MT9V111, LCD:GR_PEACH_4_3INCH_SHIELD |
anhtran | 0:e9fd5575b10e | 76 | * ``GR-LYCHEE`` camera:CAMERA_OV7725, LCD:GR_LYCHEE_LCD |
anhtran | 0:e9fd5575b10e | 77 | * ``RZ/A2M Evaluation Board Kit`` camera:CAMERA_RASPBERRY_PI, LCD:RZ_A2M_DVI_STICK |
anhtran | 0:e9fd5575b10e | 78 | * ``SBEV-RZ/A2M`` camera:CAMERA_RASPBERRY_PI, LCD:RZ_A2M_LVDS_TO_HDMI |
anhtran | 0:e9fd5575b10e | 79 | * ``SEMB1402`` camera:CAMERA_RASPBERRY_PI, LCD:RZ_A2M_LVDS_TO_HDMI |
anhtran | 0:e9fd5575b10e | 80 | |
anhtran | 0:e9fd5575b10e | 81 | |
anhtran | 0:e9fd5575b10e | 82 | ## Using Easy Connect Camera from your application |
anhtran | 0:e9fd5575b10e | 83 | |
anhtran | 0:e9fd5575b10e | 84 | Easy Connect Camera has just one function: |
anhtran | 0:e9fd5575b10e | 85 | |
anhtran | 0:e9fd5575b10e | 86 | ```cpp |
anhtran | 0:e9fd5575b10e | 87 | #include "EasyAttach_CameraAndLCD.h" |
anhtran | 0:e9fd5575b10e | 88 | |
anhtran | 0:e9fd5575b10e | 89 | int main(void) { |
anhtran | 0:e9fd5575b10e | 90 | DisplayBase Display; |
anhtran | 0:e9fd5575b10e | 91 | |
anhtran | 0:e9fd5575b10e | 92 | EasyAttach_Init(Display); |
anhtran | 0:e9fd5575b10e | 93 | |
anhtran | 0:e9fd5575b10e | 94 | // Required processing of your program |
anhtran | 0:e9fd5575b10e | 95 | |
anhtran | 0:e9fd5575b10e | 96 | EasyAttach_CameraStart(Display, DisplayBase::VIDEO_INPUT_CHANNEL_0); |
anhtran | 0:e9fd5575b10e | 97 | |
anhtran | 0:e9fd5575b10e | 98 | // Required processing of your program |
anhtran | 0:e9fd5575b10e | 99 | |
anhtran | 0:e9fd5575b10e | 100 | EasyAttach_LcdBacklight(true); |
anhtran | 0:e9fd5575b10e | 101 | |
anhtran | 0:e9fd5575b10e | 102 | // Rest of your program |
anhtran | 0:e9fd5575b10e | 103 | } |
anhtran | 0:e9fd5575b10e | 104 | ``` |