旋轉可變電阻+map()函式
輸入以下程式碼,馬上試試看讀取數值
void setup(){
Serial.begin(9600);
}
void loop(){
Serial.println(analogRead(A0));
delay(100);
}
map()函式原廠定義,
https://www.arduino.cc/reference/en/language/functions/math/map/
機器人教學-Arduino、raspberrypi、etc.
《小老師大夢想》
輸入以下程式碼,馬上試試看讀取數值
void setup(){
Serial.begin(9600);
}
void loop(){
Serial.println(analogRead(A0));
delay(100);
}
map()函式原廠定義,
https://www.arduino.cc/reference/en/language/functions/math/map/