本文整理汇总了C++中BSP_LCD_GetYSize函数的典型用法代码示例。如果您正苦于以下问题:C++ BSP_LCD_GetYSize函数的具体用法?C++ BSP_LCD_GetYSize怎么用?C++ BSP_LCD_GetYSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BSP_LCD_GetYSize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update_Color
/**
* @brief Updates the selected color
* @param None
* @retval None
*/
static void Update_Color(void)
{
static uint32_t color;
/* Get the current text color */
color = BSP_LCD_GetTextColor();
/* Update the selected color icon */
BSP_LCD_SetTextColor(color);
BSP_LCD_FillRect(450, (BSP_LCD_GetYSize() - 50), 30, 30);
BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
BSP_LCD_DrawRect(450, (BSP_LCD_GetYSize() - 50), 30, 30);
BSP_LCD_SetTextColor(color);
}
示例2: TouchscreenCalibration_SetHint
/**
* @brief Display calibration hint
* @param None
* @retval None
*/
static void TouchscreenCalibration_SetHint(void)
{
/* Clear the LCD */
BSP_LCD_Clear(LCD_COLOR_WHITE);
/* Set Touchscreen Demo description */
BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_SetFont(&Font12);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()/2 - 27, (uint8_t *)"Before using the Touchscreen", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()/2 - 12, (uint8_t *)"you need to calibrate it.", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()/2 + 3, (uint8_t *)"Press on the black circles", CENTER_MODE);
}
示例3: Prepare_Picture
/**
* @brief Prepares the picture to be saved in microSD.
* @param None
* @retval None
*/
static void Prepare_Picture(void)
{
uint32_t addrSrc = LCD_FRAME_BUFFER;
uint32_t addrDst = CONVERTED_FRAME_BUFFER;
static DMA2D_HandleTypeDef hdma2d_eval;
uint32_t lineCnt = 0;
/* Configure the DMA2D Mode, Color Mode and output offset : used to convert ARGB8888 to RGB888 */
/* used in BMP file format */
hdma2d_eval.Init.Mode = DMA2D_M2M_PFC;
hdma2d_eval.Init.ColorMode = DMA2D_RGB888; /* DMA2D Output format */
hdma2d_eval.Init.OutputOffset = 0;
/* Foreground Configuration */
hdma2d_eval.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d_eval.LayerCfg[1].InputAlpha = 0xFF;
hdma2d_eval.LayerCfg[1].InputColorMode = DMA2D_ARGB8888; /* DMA2D input format */
hdma2d_eval.LayerCfg[1].InputOffset = 70; /* skip 70 pixels on left when reading addrSrc : the left margin */
hdma2d_eval.Instance = DMA2D;
/* Go to start of last drawing pad useful line from LCD frame buffer */
addrSrc += ((BSP_LCD_GetYSize() - 70 - 1) * BSP_LCD_GetXSize() * ARGB8888_BYTE_PER_PIXEL);
/* Copy and Convert picture from LCD frame buffer in ARGB8888 to Converted frame buffer in
* RGB888 pixel format for all the useful lines of the drawing pad */
for(lineCnt=0; lineCnt < (BSP_LCD_GetYSize() - 80); lineCnt++)
{
/* DMA2D Initialization */
if(HAL_DMA2D_Init(&hdma2d_eval) == HAL_OK)
{
if(HAL_DMA2D_ConfigLayer(&hdma2d_eval, 1) == HAL_OK)
{
if (HAL_DMA2D_Start(&hdma2d_eval, addrSrc, addrDst,
(BSP_LCD_GetXSize() - 80), 1) == HAL_OK)
{
/* Polling For DMA transfer */
HAL_DMA2D_PollForTransfer(&hdma2d_eval, 10);
}
}
}
/* Increment the destination address by one line RGB888 */
addrDst += ((BSP_LCD_GetXSize() - 80) * RGB888_BYTE_PER_PIXEL);
/* Decrement the source address by one line */
addrSrc -= (BSP_LCD_GetXSize() * ARGB8888_BYTE_PER_PIXEL);
}
}
示例4: LCD_Config
/**
* @brief LCD configuration
* @param None
* @retval None
*/
static void LCD_Config(void)
{
/* LCD Initialization */
/* Two layers are used in this application but not simultaneously
so "LCD_MAX_PCLK" is recommended to programme the maximum PCLK = 25,16 MHz */
BSP_LCD_Init();
/* LCD Initialization */
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS+(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()*4));
/* Enable the LCD */
BSP_LCD_DisplayOn();
/* Select the LCD Background Layer */
BSP_LCD_SelectLayer(0);
/* Clear the Background Layer */
BSP_LCD_Clear(LCD_COLOR_BLACK);
/* Select the LCD Foreground Layer */
BSP_LCD_SelectLayer(1);
/* Clear the Foreground Layer */
BSP_LCD_Clear(LCD_COLOR_BLACK);
/* Configure the transparency for foreground and background :
Increase the transparency */
BSP_LCD_SetTransparency(0, 0);
BSP_LCD_SetTransparency(1, 100);
}
示例5: HdmiCec_DisplayConnectedDevices
/**
* @brief Display connected devices
* @param None
* @retval None
*/
static void HdmiCec_DisplayConnectedDevices(void)
{
uint8_t string[50] = {0};
uint8_t i, connected_devices = 0;
for (i = 0; i < 12; i++)
{
if (strcmp((const char*)(HDMI_CEC_Follower_String[i][1]), "0"))
{
connected_devices++;
}
}
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_FillRect(20, 175, BSP_LCD_GetYSize() - 40, 30);
BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
if (connected_devices == 0)
{
BSP_LCD_DisplayStringAt(20, 175, (uint8_t *)"No devices connected", LEFT_MODE);
}
else
{
sprintf((char *) string, "%d device(s) connected", connected_devices);
BSP_LCD_DisplayStringAt(20, 175, string, LEFT_MODE);
}
}
示例6: LCD_Config
/**
* @brief LCD configuration.
* @param None
* @retval None
*/
static void LCD_Config(void)
{
/* LCD Initialization */
/* Two layers are used in this application simultaneously
so "LCD_MIN_PCLK" is recommended to programme the PCLK at 20 MHz */
BSP_LCD_InitEx(LCD_MIN_PCLK);
/* LCD Layers Initialization */
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_LayerDefaultInit(1, (LCD_FB_START_ADDRESS+(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()*4)));
/* Enable the LCD */
BSP_LCD_DisplayOn();
/* Set LCD Background Layer */
BSP_LCD_SelectLayer(0);
/* Clear the Background Layer */
BSP_LCD_Clear(LCD_COLOR_WHITE);
/* Set LCD Foreground Layer */
BSP_LCD_SelectLayer(1);
/* Clear the Foreground Layer */
BSP_LCD_Clear(LCD_COLOR_BLACK);
/* Configure and enable the Color Keying feature */
BSP_LCD_SetColorKeying(1, 0);
/* Configure the transparency for foreground: Increase the transparency */
BSP_LCD_SetTransparency(1, 100);
}
示例7: AudioPlay_DisplayInfos
/**
* @brief Display audio file and control information
* @param format : structure containing informations of the audio file
* @retval None
*/
static void AudioPlay_DisplayInfos(WAVE_FormatTypeDef * format)
{
uint8_t string[50] = {0};
BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
sprintf((char *) string, "Sampling frequency : %lu Hz", format->SampleRate);
BSP_LCD_DisplayStringAt(20, 115, string, LEFT_MODE);
if (format->NbrChannels == 2)
{
sprintf((char *) string, "Format : %d bits stereo", format->BitPerSample);
BSP_LCD_DisplayStringAt(20, 130, string, LEFT_MODE);
}
else if (format->NbrChannels == 1)
{
sprintf((char *) string, "Format : %d bits mono", format->BitPerSample);
BSP_LCD_DisplayStringAt(20, 130, string, LEFT_MODE);
}
sprintf((char *) Volume_string, " Volume : %lu%% ", uwVolume);
BSP_LCD_DisplayStringAt((uint16_t)(-6), BSP_LCD_GetYSize()-60, Volume_string, RIGHT_MODE);
BSP_LCD_DisplayStringAt(20, 200, (uint8_t *)"Press KEY to Pause/Resume playback", LEFT_MODE);
BSP_LCD_DisplayStringAt(20, 215, (uint8_t *)"Press UP/DOWN to change Volume", LEFT_MODE);
}
示例8: Camera_LineEventCallbackRotation90
/**
* @brief Camera line event callback when camera image rotation of 90 degrees hour
* direction is required.
* @param None
* @retval None
*/
static void Camera_LineEventCallbackRotation90(void)
{
uint32_t LcdResX = BSP_LCD_GetXSize();
uint32_t LcdResY = BSP_LCD_GetYSize();
if (refresh_authorized)
{
if ((offset_lcd == 0) && (CameraResY <= LcdResX) && (CameraResX <= LcdResY))
{
/* If Camera resolution is lower than LCD resolution, set display in the middle of the screen */
offset_lcd = ((((LcdResY - CameraResX) / 2) * LcdResX) /* Middle of the screen on Y axis */
- ((LcdResX - CameraResY) / 2)) /* Middle of the screen on X axis */
* sizeof(uint32_t);
if ((CameraResY == CAMERA_QQVGA_RES_Y) || (CameraResIndex == CAMERA_R480x272))
{ /* Add offset for QQVGA : + 40 LCD lines */
offset_lcd += 40 * LcdResX * sizeof(uint32_t);
}
}
/* Count the number of line rotated copied to be able to stop when limit reached */
if (display_rotated_line_counter < CameraResY)
{
/* if number of rotated line copied is reaching horizontal resolution of display LCD : stop copying also */
if (display_rotated_line_counter < LcdResX)
{
/* Depending on CameraResX versus LcdResY */
/* clamp the column size copied to LcdResY if (CameraResX > LcdResY) */
if (CameraResX <= LcdResY)
{
ConvertCameraLineRgb565ToLcdColumnARGB8888((uint32_t *)(CAMERA_FB_START_ADDR + offset_cam),
(uint32_t *)(LCD_FB_START_ADDRESS + offset_lcd),
CameraResX,
(LcdResX - 1)); /* lineStridePixels for DMA is always one horizontal line LCD - 1 pixels */
}
else
{
ConvertCameraLineRgb565ToLcdColumnARGB8888((uint32_t *)(CAMERA_FB_START_ADDR + offset_cam),
(uint32_t *)(LCD_FB_START_ADDRESS + offset_lcd),
LcdResY,
(LcdResX - 1)); /* lineStridePixels for DMA is always one horizontal line LCD - 1 pixels */
}
offset_cam = offset_cam + (CameraResX * sizeof(uint16_t)); /* uint16_t : because format camera data is RGB565 */
/* offset_lcd is decremented after each line rotated copied by one pixel of the LCD buffer = 4 bytes (ARGB8888) */
/* from 'offset_lcd' pre computed in first if statement of the current function */
offset_lcd = offset_lcd - sizeof(uint32_t); /* uint32_t : because format of LCD Frame buffer is ARGB8888 */
}
display_rotated_line_counter++;
}
else
{
offset_cam = 0;
offset_lcd = 0;
display_rotated_line_counter = 0;
}
}
}
示例9: LCD_Config
/**
* @brief LCD configuration.
* @param None
* @retval None
*/
static void LCD_Config(void)
{
/* LCD Initialization */
BSP_LCD_Init();
/* LCD Layers Initialization */
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
BSP_LCD_LayerDefaultInit(1, (LCD_FB_START_ADDRESS+(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()*4)));
/* Enable the LCD */
BSP_LCD_DisplayOn();
/* Set LCD Background Layer */
BSP_LCD_SelectLayer(0);
/* Clear the Background Layer */
BSP_LCD_Clear(LCD_COLOR_WHITE);
/* Set LCD Foreground Layer */
BSP_LCD_SelectLayer(1);
/* Clear the Foreground Layer */
BSP_LCD_Clear(LCD_COLOR_BLACK);
/* Configure and enable the Color Keying feature */
BSP_LCD_SetColorKeying(1, 0);
/* Configure the transparency for foreground: Increase the transparency */
BSP_LCD_SetTransparency(1, 100);
}
示例10: Touchscreen_SetHint_Demo
/**
* @brief Display TS Demo Hint for all touchscreen demos depending on passed
* demoIndex in parameter.
* @param demoIndex : parameter of type @ref TouchScreenDemoTypeDef
* @retval None
*/
static void Touchscreen_SetHint_Demo(TouchScreenDemoTypeDef demoIndex)
{
if(demoIndex <= TOUCHSCREEN_DEMO_MAX)
{
/* Clear the LCD */
BSP_LCD_Clear(LCD_COLOR_WHITE);
/* Set Touchscreen Demo1 description */
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
BSP_LCD_FillRect(0, 0, BSP_LCD_GetXSize(), 80);
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_SetBackColor(LCD_COLOR_BLUE);
BSP_LCD_SetFont(&Font24);
if(demoIndex == TOUCHSCREEN_DEMO_1)
{
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"Touchscreen basic polling", CENTER_MODE);
BSP_LCD_SetFont(&Font12);
BSP_LCD_DisplayStringAt(0, 30, (uint8_t *)"Please use the Touchscreen to", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 45, (uint8_t *)"activate the colored circle", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 60, (uint8_t *)"inside the rectangle. Then press TAMPER button", CENTER_MODE);
}
else if (demoIndex == TOUCHSCREEN_DEMO_2)
{
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"Touchscreen dual touch polling", CENTER_MODE);
BSP_LCD_SetFont(&Font12);
BSP_LCD_DisplayStringAt(0, 30, (uint8_t *)"Please press the Touchscreen to", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 45, (uint8_t *)"activate single and", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 60, (uint8_t *)"dual touch", CENTER_MODE);
}
else /* demoIndex == TOUCHSCREEN_DEMO_3 */
{
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"Touchscreen dual touch interrupt", CENTER_MODE);
BSP_LCD_SetFont(&Font12);
BSP_LCD_DisplayStringAt(0, 30, (uint8_t *)"Please press the Touchscreen to", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 45, (uint8_t *)"activate single and", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, 60, (uint8_t *)"dual touch", CENTER_MODE);
}
/* Set the LCD Text Color */
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
BSP_LCD_DrawRect(10, 90, BSP_LCD_GetXSize() - 20, BSP_LCD_GetYSize() - 100);
BSP_LCD_DrawRect(11, 91, BSP_LCD_GetXSize() - 22, BSP_LCD_GetYSize() - 102);
} /* of if(demoIndex <= TOUCHSCREEN_DEMO_MAX) */
}
示例11: BSP_LCD_DrawRGBImage
/**
* @brief Draws RGB Image (16 bpp).
* @param Xpos: X position in the LCD
* @param Ypos: Y position in the LCD
* @param Xsize: X size in the LCD
* @param Ysize: Y size in the LCD
* @param pdata: Pointer to the RGB Image address.
* @retval None
*/
void BSP_LCD_DrawRGBImage(uint16_t Xpos, uint16_t Ypos, uint16_t Xsize, uint16_t Ysize, uint8_t *pdata)
{
SetDisplayWindow(Xpos, Ypos, Xsize, Ysize);
LCD_DrawRGBImage(Xpos, Ypos, Xsize, Ysize, pdata);
SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
}
示例12: Save_Picture
/**
* @brief Saves the picture in microSD.
* @param None
* @retval None
*/
void Save_Picture(void)
{
FRESULT res1, res2; /* FatFs function common result code */
uint32_t byteswritten = 0; /* File write count */
static uint32_t counter = 0;
uint8_t str[30];
/* Check if the SD card is plugged in the slot */
if(BSP_SD_IsDetected() != SD_PRESENT)
{
Error_Handler();
}
else
{
/* Format the string */
sprintf((char *)str, "image_%lu.bmp", counter);
/*##-1- Prepare the image to be saved ####################################*/
Prepare_Picture();
/*##-2- Create and Open a new bmp file object with write access ##########*/
if(f_open(&MyFile, (const char*)str, FA_CREATE_ALWAYS | FA_WRITE) != FR_OK)
{
/* 'image.bmp' file Open for write Error */
Error_Handler();
}
else
{
/*##-3- Write data to the BMP file #####################################*/
/* Write the BMP header */
res1 = f_write(&MyFile, (uint32_t *)aBMPHeader, 54, (void *)&byteswritten);
/* Write the BMP file */
res2 = f_write(&MyFile, (uint32_t *)CONVERTED_FRAME_BUFFER, ((BSP_LCD_GetYSize() - 80)*(BSP_LCD_GetXSize() - 80)*2), (void *)&byteswritten);
if((res1 != FR_OK) || (res2 != FR_OK) || (byteswritten == 0))
{
/* 'image.bmp' file Write or EOF Error */
Error_Handler();
}
else
{
/*##-4- Close the open BMP file ######################################*/
f_close(&MyFile);
/* Success of the demo: no error occurrence */
BSP_LED_On(LED1);
/* Wait for 2s */
HAL_Delay(2000);
/* Select Layer 1 */
BSP_LED_Off(LED1);
counter++;
}
}
}
}
示例13: main
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
/* STM32F4xx HAL library initialization:
- Configure the Flash prefetch, instruction and Data caches
- Configure the Systick to generate an interrupt each 1 msec
- Set NVIC Group Priority to 4
- Global MSP (MCU Support Package) initialization
*/
HAL_Init();
/* Configure the system clock to 168 MHz */
SystemClock_Config();
/* Configure LED1 and LED3 */
BSP_LED_Init(LED1);
BSP_LED_Init(LED3);
/*##-1- LCD Initialization #################################################*/
/* Initialize the LCD */
BSP_LCD_Init();
/* Enable the LCD */
BSP_LCD_DisplayOn();
/* Clear the LCD Background layer */
BSP_LCD_Clear(LCD_COLOR_WHITE);
/*##-2- Touch screen initialization ########################################*/
Touchscreen_Calibration();
BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
/*##-3- Link the SD Card disk I/O driver ###################################*/
if(FATFS_LinkDriver(&SD_Driver, SDPath) != 0)
{
/* FatFs Initialization Error */
Error_Handler();
}
/* Create a FAT file system (format) on the logical drive */
f_mkfs((TCHAR const*)SDPath, 0, 0);
/*##-4- Register the file system object to the FatFs module ################*/
if(f_mount(&SDFatFs, (TCHAR const*)SDPath, 0) != FR_OK)
{
/* FatFs Initialization Error */
Error_Handler();
}
/*##-5- Draw the menu ######################################################*/
Draw_Menu();
/* Infinite loop */
while (1)
{
/*##-6- Configure the touch screen and Get the position ####################*/
GetPosition();
}
}
示例14: main
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
uint32_t i;
uint32_t *ptrLcd;
/* Enable the CPU Cache */
CPU_CACHE_Enable();
/* STM32F7xx HAL library initialization:
- Configure the Flash ART accelerator on ITCM interface
- Systick timer is configured by default as source of time base, but user
can eventually implement his proper time base source (a general purpose
timer for example or other time source), keeping in mind that Time base
duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
handled in milliseconds basis.
- Set NVIC Group Priority to 4
- Low Level Initialization
*/
HAL_Init();
/* Configure the system clock to 200 MHz */
SystemClock_Config();
/*##-1- Initialise the LCD #################################################*/
BSP_LCD_Init();
/* Init LCD screen buffer */
ptrLcd = (uint32_t*)(LCD_FRAME_BUFFER);
for (i=0; i<(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()); i++)
{
ptrLcd[i]=0;
}
BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER);
/* Enable the LCD */
BSP_LCD_DisplayOn();
/* Select the LCD Foreground layer */
BSP_LCD_SelectLayer(1);
/* Set active window */
BSP_LCD_SetLayerWindow(1, xoffset, yoffset, xsize, ysize);
/*##-2- Camera Initialisation and start capture ############################*/
/* Initialize the Camera */
BSP_CAMERA_Init(resolution);
/* Wait 1s before Camera snapshot */
HAL_Delay(1000);
/* Start the Camera Capture */
BSP_CAMERA_SnapshotStart((uint8_t *)CAMERA_FRAME_BUFFER);
while (1)
{
}
}
示例15: Touchscreen_Calibration
/**
* @brief Performs the TS calibration
* @param None
* @retval None
*/
void Touchscreen_Calibration (void)
{
uint8_t status = 0;
uint8_t i = 0;
TouchscreenCalibration_SetHint();
status = BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
if (status != TS_OK)
{
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_SetTextColor(LCD_COLOR_RED);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 95, (uint8_t *)"ERROR", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 80, (uint8_t *)"Touchscreen cannot be initialized", CENTER_MODE);
}
while (1)
{
if (status == TS_OK)
{
aLogX[0] = 15;
aLogY[0] = 15;
aLogX[1] = BSP_LCD_GetXSize() - 15;
aLogY[1] = BSP_LCD_GetYSize() - 15;
for (i = 0; i < 2; i++)
{
GetPhysValues(aLogX[i], aLogY[i], &aPhysX[i], &aPhysY[i]);
}
A1 = (TUNE_FACTOR_X * ( aLogX[1] - aLogX[0]))/ ( aPhysX[1] - aPhysX[0]);
B1 = (TUNE_FACTOR_X * aLogX[0]) - A1 * aPhysX[0];
A2 = (TUNE_FACTOR_Y * ( aLogY[1] - aLogY[0]))/ ( aPhysY[1] - aPhysY[0]);
B2 = (TUNE_FACTOR_Y * aLogY[0]) - A2 * aPhysY[0];
if (B2 > 0)
B2 = 0;
Calibration_Done = 1;
return;
}
HAL_Delay(5);
}
}