-10%








Grove – Rotary Angle Sensor 旋轉電位器模組 / 旋轉角度傳感器
0 out of 5
NT$100 原始價格:NT$100。NT$90目前價格:NT$90。 (未稅)
- 描述
- 評價 (0)
描述
描述
Grove – Rotary Angle Sensor 旋轉電位器模組 / 旋轉角度傳感器
Grove – Rotary Angle Sensor 旋轉電位器模 在其 D1 連接器上產生 0 和 Vcc(5V DC,Seeeduino)之間的模擬輸出。不使用 D2 連接器。角度範圍為 300 度,值呈線性變化。電阻值為 10k 歐姆,非常適合 Arduino 使用。這也可以稱為“電位計”。
Arduino
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
/*macro definitions of Rotary angle sensor and LED pin*/ #define ROTARY_ANGLE_SENSOR A0 #define LED 3 //the Grove - LED is connected to PWM pin D3 of Arduino #define ADC_REF 5 //reference voltage of ADC is 5v.If the Vcc switch on the seeeduino //board switches to 3V3, the ADC_REF should be 3.3 #define GROVE_VCC 5 //VCC of the grove interface is normally 5v #define FULL_ANGLE 300 //full value of the rotary angle is 300 degrees void setup() { Serial.begin(9600); pinMode(ROTARY_ANGLE_SENSOR, INPUT); pinMode(LED,OUTPUT); } void loop() { float voltage; int sensor_value = analogRead(ROTARY_ANGLE_SENSOR); voltage = (float)sensor_value*ADC_REF/1023; float degrees = (voltage*FULL_ANGLE)/GROVE_VCC; Serial.println("The angle between the mark and the starting position:"); Serial.println(degrees); int brightness; brightness = map(degrees, 0, FULL_ANGLE, 0, 255); analogWrite(LED,brightness); delay(500); } |
The potentiometer twig produces analog output between 0 and Vcc (5V DC with Seeeduino) on its D1 connector. The D2 connector is not used. The angular range is 300 degrees with a linear change in value. The resistance value is 10k ohms, perfect for Arduino use. This may also be known as a rotary angle sensor.
評價 (0)
相關商品
-
按鍵 / 輸入 / 人機介面模組
Grove – Gesture PAJ7620U2 手勢感測器
0 out of 5NT$480原始價格:NT$480。NT$420目前價格:NT$420。 (未稅)加入購物車產品速覽 -
按鍵 / 輸入 / 人機介面模組
Grove – Mouse Encoder 機械式旋轉編碼器
0 out of 5NT$219原始價格:NT$219。NT$210目前價格:NT$210。 (未稅)加入購物車產品速覽 -
按鍵 / 輸入 / 人機介面模組
Arduino Micro SD 記憶卡讀寫模組 Micro SDHC 卡讀寫卡器 SPI介面
0 out of 5NT$53原始價格:NT$53。NT$39目前價格:NT$39。 (未稅)加入購物車產品速覽 -
按鍵 / 輸入 / 人機介面模組
Grove – Speech Recognizer 語音識別模組
0 out of 5NT$830原始價格:NT$830。NT$790目前價格:NT$790。 (未稅)
商品評價
目前沒有評價。