利用類比輸入腳位讀取電壓。將可變電阻的兩端分別接到Arduino的5V和GND,可變電阻中間腳接到A0腳位。 int sensorValue = analogRead(A0) ;. 讀取到類比腳位A0的值將介 ...
確定! 回上一頁