float cm; int adc = analogRead(A0); //讀入指定類. 比腳位的ADC 值 if (adc>0) { cm = 27.66 * pow(adc, -0.586);// 讀值與距離. 的曲線轉換公式. Serial.print(adc);.
確定! 回上一頁