請問
CNY70是否有所謂的發射與接收的問題
類似跟按鍵ㄧ樣有彈跳的問題
我無法設ㄧ個變數使用計數的方式來確定讀取到第2次時該停
我讀取到第一個就停了
下面是我的程式碼
if(OneSecond == 1 && stop == 0)
{
OneSecond = 0;
CNY70_ADC( ) ;
normalized_CNY70( );
if( nor_CNY70_ADCValue[0]>190 && nor_CNY70_ADCValue[8]<90)
{
c=c+1;
if(c==2)
{
stop = 1;
PDC3=50;
PDC4=50;
}
else
{
PDC3=100;
PDC4=100;
Delay(90);
}
}
}
請麻煩給我些意見
謝謝