Новое поступление
Магазина Ruiye Electronics работает с 04.08.2014. его рейтинг составлет 94.14 баллов из 100. В избранное добавили 5315 покупателя. Средний рейтинг торваров продавца 4.8 в продаже представленно 295 наименований товаров, успешно доставлено 30216 заказов. 700 покупателей оставили отзывы о продавце.
Характеристики
*Текущая стоимость 747,10 / lot уже могла изменится. Что бы узнать актуальную цену и проверить наличие товара, нажмите "Добавить в корзину"
| Месяц | Минимальная цена | Макс. стоимость | Цена |
|---|---|---|---|
| Feb-19-2026 | 949.92 руб. | 968.74 руб. | 958.5 руб. |
| Jan-19-2026 | 769.36 руб. | 784.55 руб. | 776.5 руб. |
| Dec-19-2025 | 934.20 руб. | 953.44 руб. | 943.5 руб. |
| Nov-19-2025 | 926.25 руб. | 945.34 руб. | 935.5 руб. |
| Oct-19-2025 | 740.8 руб. | 755.47 руб. | 747.5 руб. |
| Sep-19-2025 | 911.95 руб. | 929.21 руб. | 920 руб. |
| Aug-19-2025 | 904.57 руб. | 922.76 руб. | 913 руб. |
| Jul-19-2025 | 896.20 руб. | 914.89 руб. | 905 руб. |
Описание товара



Factory Wholesale 10pcs/Lot Rotary Encoder Module Brick Sensor Development Dropshipping KY-040
Rotary encoder can be counted by rotating forward and reverse direction during rotation of the output pulse frequency,
Unlike counter rotating potentiometer, this rotation counts are not limited.
With the buttons on the rotary encoder can be reset to its initial state, that starts counting from 0.
******************
ARDUI-NO test code:
const int interruptA = 0; / / Interrupt 0 (pin 2)
const int interruptB = 1; / / Interrupt 1 (pin 3)
int CLK = 2; / / PIN2
int DAT = 3; / / PIN3
int BUTTON = 4; / / PIN4
int LED1 = 5; / / PIN5
int LED2 = 6; / / PIN6
int COUNT = 0;
void setup ()
{
attachInterrupt (interruptA, RoteStateChanged, FALLING);
/ / AttachInterrupt (interruptB, buttonState, FALLING);
pinMode (CLK, INPUT);
digitalWrite (2, HIGH); / / Pull High Restance
pinMode (DAT, INPUT);
digitalWrite (3, HIGH); / / Pull High Restance
pinMode (BUTTON, INPUT);
digitalWrite (4, HIGH); / / Pull High Restance
pinMode (LED1, OUTPUT);
pinMode (LED2, OUTPUT);
Serial.begin (9600);
}
void loop ()
{
if (! (digitalRead (BUTTON)))
{
COUNT = 0;
Serial.println ("STOP COUNT = 0");
digitalWrite (LED1, LOW);
digitalWrite (LED2, LOW);
delay (2000);
}
Serial.println (COUNT);
}
/ / -------------------------------------------
void RoteStateChanged () / / When CLK FALLING READ DAT
{
if (digitalRead (DAT)) / / When DAT = HIGH IS FORWARD
{
COUNT;
digitalWrite (LED1, HIGH);
digitalWrite (LED2, LOW);
delay (20);
}
else / / When DAT = LOW IS BackRote
{
COUNT -;
digitalWrite (LED2, HIGH);
digitalWrite (LED1, LOW);
delay (20);
}
}





Смотрите так же другие товары: