Image Zoom In/out Sample. This program uses GraphicsFramework library and GP2Y0A21YK sensor. Please use distance sensor in the range of 10-30cm.

Dependencies:   GR-PEACH_video GraphicsFramework R_BSP mbed-rtos mbed

Fork of RGA_HelloWorld by Renesas

About GP2Y0A21YK

GP2Y0A21YK is a distance sensor and can be controlled by using the AnalogIn.
The range of this sensor is 10-80cm.

About wiring

SensorGR-PEACH
White wireA0
Orange wireGND
Black wire5.0V
Revision:
5:ac895a9527ab
Parent:
4:ffbd2a93b02f
Child:
6:6cad61e4a4c1
--- a/main.cpp	Fri May 13 06:41:17 2016 +0000
+++ b/main.cpp	Fri May 13 07:10:27 2016 +0000
@@ -202,8 +202,8 @@
     Display.Graphics_Start(DisplayBase::GRAPHICS_LAYER_0);
     lcd_cntrst.write(1.0);
 
+    int work_height_pos = ZOOM_MAX_NUM;
     while (1) {
-        int work_height_pos = ZOOM_MAX_NUM;
         distance = get_distance();
         /* range of use = 10-30[cm] */
         if ((distance >= 10) && (distance <= 30)) {