LCD Shield sample. 4.3inch.
Dependencies: GR-PEACH_video mbed-rtos mbed
Fork of GR-PEACH_LCD_sample by
Information
Japanese version is available in lower part of this page.
このページの後半に日本語版が用意されています.
This program displays the NTSC input from NTSC1A of LCD Shield on the screen. Touch coordinates are displayed on the terminal when you touch the screen. You can touch at the same time up to 2 points.
When you connect the "GR-PEACH AUDIO CAMERA Shield", you can display an image of the CMOS Camera(MT9V111).
If you use CMOS Camera, Please change the below in the “main.cpp”.
main.cpp
#define VIDEO_INPUT_METHOD (VIDEO_CVBS) -> #define VIDEO_INPUT_METHOD (VIDEO_CMOS_CAMERA)
Please refer to following link about "GR-PEACH AUDIO CAMERA Shield".
https://developer.mbed.org/teams/Renesas/wiki/Audio_Camera-shield
このプログラムは、NTSC1AからのNTSC入力をLCDシールドの画面上に表示します。画面をタッチすると、タッチ座標がprintf表示されます。2点まで同時にタッチできます。
GR-PEACH AUDIO CAMERA Shieldを接続すると、CMOSカメラ(MT9V111)の画像を表示することができます。CMOSカメラを使用する場合は、「main.cpp」の以下を変更してください。
main.cpp
#define VIDEO_INPUT_METHOD (VIDEO_CVBS) -> #define VIDEO_INPUT_METHOD (VIDEO_CMOS_CAMERA)
GR-PEACH AUDIO CAMERA Shieldについては下記を参照ください。
https://developer.mbed.org/teams/Renesas/wiki/Audio_Camera-shield
Diff: main.cpp
- Revision:
- 3:b5aaf7215800
- Parent:
- 2:8e78c957adb5
- Child:
- 4:c1e61a1d75df
--- a/main.cpp Fri Nov 06 10:52:15 2015 +0000 +++ b/main.cpp Thu Apr 07 07:28:19 2016 +0000 @@ -62,6 +62,7 @@ #if(1) //lcd DigitalOut lcd_pwon(P7_15); DigitalOut lcd_blon(P8_1); +DigitalOut touch_reset(P4_0); PwmOut lcd_cntrst(P8_15); I2C mI2c(I2C_SDA, I2C_SCL); @@ -72,18 +73,17 @@ valid: 1; uint8_t x_l; uint8_t y_l; - uint8_t z; } xyz_data_t; typedef struct { - uint8_t fingers: 4, - reserved: 4; + uint8_t fingers: 3, + reserved: 5; uint8_t keys; xyz_data_t xyz_data[2]; } stx_report_data_t; static int get_coordinates(uint8_t *count, uint32_t *x0, uint32_t *y0, uint32_t *x1, uint32_t *y1) { - char buf[10]; + char buf[8]; stx_report_data_t *pdata; int ret = -1; *count = 0; // Set point detected count to 0. @@ -162,10 +162,12 @@ #if(1) //lcd lcd_pwon = 0; lcd_blon = 0; + touch_reset = 0; Thread::wait(100); lcd_pwon = 1; lcd_blon = 1; + touch_reset = 1; Thread::wait(100); DisplayBase::lcd_config_t lcd_config;