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
Committer:
1050186
Date:
Wed Jan 20 02:35:42 2016 +0000
Revision:
0:84e4649e7707
Child:
1:a07212e32dcb
Child:
2:c7faef0ef374
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
1050186 0:84e4649e7707 1 /*
1050186 0:84e4649e7707 2 Permission is hereby granted, free of charge, to any person obtaining a copy
1050186 0:84e4649e7707 3 of this software and associated documentation files (the "Software"), to deal
1050186 0:84e4649e7707 4 in the Software without restriction, including without limitation the rights
1050186 0:84e4649e7707 5 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1050186 0:84e4649e7707 6 copies of the Software, and to permit persons to whom the Software is
1050186 0:84e4649e7707 7 furnished to do so, subject to the following conditions:
1050186 0:84e4649e7707 8
1050186 0:84e4649e7707 9 The above copyright notice and this permission notice shall be included in
1050186 0:84e4649e7707 10 all copies or substantial portions of the Software.
1050186 0:84e4649e7707 11
1050186 0:84e4649e7707 12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1050186 0:84e4649e7707 13 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1050186 0:84e4649e7707 14 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1050186 0:84e4649e7707 15 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050186 0:84e4649e7707 16 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1050186 0:84e4649e7707 17 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1050186 0:84e4649e7707 18 THE SOFTWARE.
1050186 0:84e4649e7707 19 */
1050186 0:84e4649e7707 20
1050186 0:84e4649e7707 21 #ifndef RGA_FUNC_H
1050186 0:84e4649e7707 22 #define RGA_FUNC_H
1050186 0:84e4649e7707 23
1050186 0:84e4649e7707 24 #include "RGA.h"
1050186 0:84e4649e7707 25
1050186 0:84e4649e7707 26 #define IMG_DRAW_WIDTH 241
1050186 0:84e4649e7707 27 #define IMG_DRAW_HEIGHT 180
1050186 0:84e4649e7707 28 #define IMAGE_WIDTH_SCROLL_FUNC 352 // Image width of Scroll function
1050186 0:84e4649e7707 29 #define IMAGE_HEIGHT_SCROLL_FUNC 233 // Image height of Scroll function
1050186 0:84e4649e7707 30 #define IMAGE_WIDTH_ZOOM_FUNC 352 // Image width of Zoom function
1050186 0:84e4649e7707 31 #define IMAGE_HEIGHT_ZOOM_FUNC 233 // Image height of Zoom function
1050186 0:84e4649e7707 32
1050186 0:84e4649e7707 33 #define DISSOLVE_MAX_NUM 256
1050186 0:84e4649e7707 34 #define SCROLL_MAX_NUM IMAGE_WIDTH_SCROLL_FUNC - IMG_DRAW_WIDTH
1050186 0:84e4649e7707 35 #define ZOOM_MAX_NUM IMAGE_HEIGHT_ZOOM_FUNC / 2
1050186 0:84e4649e7707 36 #define ROTATION_MAX_NUM 360
1050186 0:84e4649e7707 37 #define ACCELERATE_MAX_NUM 256
1050186 0:84e4649e7707 38
1050186 0:84e4649e7707 39
1050186 0:84e4649e7707 40
1050186 0:84e4649e7707 41 extern void Set_RGAObject(frame_buffer_t* frmbuf_info);
1050186 0:84e4649e7707 42 extern void Get_AnimationTiming(char_t *timing_name);
1050186 0:84e4649e7707 43 extern void RGA_Func_ClrScreen(frame_buffer_t* frmbuf_info);
1050186 0:84e4649e7707 44 extern void RGA_Func_DrawTopScreen(frame_buffer_t* frmbuf_info);
1050186 0:84e4649e7707 45 extern void RGA_Func_DrawReturnButton(frame_buffer_t* frmbuf_info);
1050186 0:84e4649e7707 46 extern void RGA_Func_DrawRectangle(frame_buffer_t* frmbuf_info);
1050186 0:84e4649e7707 47 extern void RGA_Func_DrawImage(frame_buffer_t* frmbuf_info);
1050186 0:84e4649e7707 48 extern void RGA_Func_Dissolve(frame_buffer_t* frmbuf_info, float32_t global_alpha);
1050186 0:84e4649e7707 49 extern void RGA_Func_Scroll(frame_buffer_t* frmbuf_info, int src_width_pos);
1050186 0:84e4649e7707 50 extern void RGA_Func_Zoom(frame_buffer_t* frmbuf_info, int src_height_pos);
1050186 0:84e4649e7707 51 extern void RGA_Func_Rotation(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle);
1050186 0:84e4649e7707 52 extern void RGA_Func_Accelerate(frame_buffer_t* frmbuf_info, float32_t relative_pos);
1050186 0:84e4649e7707 53
1050186 0:84e4649e7707 54 #endif