Page 901 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 901
LED_All_Off();
Delay_ms(10);
if(S1==0) // 비금속
{
Delay_ms(5);
m2_left();
Delay_ms(10);
if(AD_value<100) // 플라스틱
{
P+=1;
value_first();
if(P==10)
{
P2+=1;
P=0;
}
GLCD_displayChar(Line3,60, P2+'0');
GLCD_displayChar(Line3,40, P+'0');
GPIO_SetBits(GPIOD, GPIO_Pin_0);
m1_left();
}
else if(AD_value>=100) // 유리
{
G+=1;
value_first();
if(G==10)
{
G2+=1;
G=0;
}
GLCD_displayChar(Line3,60, G2+'0');
GLCD_displayChar(Line4,40, G+'0');
GPIO_SetBits(GPIOD, GPIO_Pin_1);
m1_right();
}
- 894 -