Remy_Martin
(Permpol Thanapunnamas)
3
นำค่าที่ได้ไป เข้าฟังก์ชัน map ครับ ตัวอย่าง
ตัวอย่างคำสั่งในการแปลง เราต้องรู้ค่าสูงสุด และต่ำสุดด้วย เพื่อนำมาแปลงในสเกล 100
int SoilSensorValue_1 = analogRead(SoilSensor_1);
int mapSoilSensorValue_1 = map(SoilSensorValue_1, 0, 4095, 100, 0);