Page 521 - MDP2020-1
P. 521
················································································ 명장양성프로젝트 【MDP】 과제발표회 자료집 Ⅰ | 515
제 3 장 소프트웨어 설계
1. 개요
arm프로세서를 이용해 적외선 센서로 사람을 감지하여 리니어모터의 높낮이를 조절하는 신호
를 보내주는 프로그램을 작성하였습니다.
2. 소프트웨어
arm프로세서
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes
------------------------------------------------------------------*/
#include "main.h"
/* Private includes
----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#define tx_buffer_size (countof(tx_buffer)-1)
#define rx_buffer_size 0xff
#define countof(a)(sizeof(a) / sizeof(*(a)))
uint8_t rx_buffer[rx_buffer_size];
uint8_t tx_buffer[]="a \n";