Keyestudio Adjustable Potentiometer Module for Arduino UNO and MEGA
เซ็นเซอร์การหมุนแบบ แบบ อนาล็อก (Analog) ต่อใช้งานง่าย ประกอบด้วย โพเทนซิโอมิเตอร์ (Potentiometer) ตัวต้านทานปรับค่าได้ หรืออาจจะเรียกสั้นๆว่า “pot” ซึ่งเป็นอุปกรณ์ที่มีสามขา ปรับค่าได้ โดยแรงดันไฟฟ้าสามารถแบ่งได้เป็น 1024 การใช้งานส่วนใหญ่จะต่อ อยู่ที่ Pin อนาล็อก ของ Arduino สำหรับอ่านค่าอินพุท
Introduction
This analog Rotation Sensor is aduino compatible. It is based on a potentiometer. Its voltage can be subdivided into 1024, easy to be connected to Arduino with our sensor shield. Combined with other sensors, we can make interesting projects by reading the analog value from the IO port.
Specification
Supply Voltage: 3.3V to 5V
Interface: Analog
Sample Code:
void setup()
{
Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0);//Read rotation sensor value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}
See product video:
..
ตัวอย่างโปรเจค