360 درجة PWM الروتاري التشفير اندلاع

360 درجة PWM الروتاري التشفير اندلاع

$7.81 $7.81 USD
Model #AD-PB928027
Quantity
We have 6 of these in stock We have 6 of these in stock
and you currently have in your cart.
In Stock

Add 

Warranty Plus

Warranty Plus:
Your product will be replaced (including free shipping) with a new one within 12 months of purchase, even if it is damaged due to improper wiring, incorrect usage, a problem in the electrical installation or any other circumstance.

Standard Warranty:
12 month warranty comes with every purchase. Covers malfunctions when it is used within the described conditions/limits.

 +8%  ($0.62) ($0.62)

Shipping Cost Estimator

Note: You must have items in your cart already before you can see the estimated costs to ship your cart. This shipping tool will estimate the total shipping cost for your entire basket.

  • وصف

    هذا النوع من المفاتيح هو جهاز تشفير دوار تزايدي. في واقع الأمر، فهو الأكثر استخدامًا على نطاق واسع من بين جميع أجهزة التشفير الدوارة نظرًا لتكلفته المنخفضة وقدرته على توفير إشارات يمكن تفسيرها بسهولة لتوفير معلومات متعلقة بالحركة مثل السرعة.

    من خلال الدوران، يمكن للمشفر الدوار حساب تردد النبض الناتج في الاتجاه الموجب والعكسي أثناء الدوران، على عكس عداد الجهد الدوار دون حساب القيود. باستخدام الزر الموجود على جهاز التشفير الدوار، يمكن إعادة ضبطه إلى حالته الأولية بدءًا من الصفر.

  • رمز الاختبار

    كثافة العمليات redPin = 2;
    int YellowPin = 3؛
    إنت جرينبين = 4؛
    إنت أبين = 6؛
    كثافة العمليات bPin = 7؛
    int ButtonPin = 5;
    حالة كثافة العمليات = 0؛
    int longPeriod = 5000; // الوقت باللون الأخضر أو ​​الأحمر
    فترة قصيرة = 700؛ // الفترة الزمنية عند التغيير
    int targetCount = shortPeriod;
    عدد صحيح = 0؛
    الإعداد باطل()
    {
      pinMode(aPin, INPUT);
      pinMode(bPin, INPUT);
      pinMode(buttonPin, INPUT);
      pinMode(redPin, OUTPUT);
      pinMode(yellowPin, OUTPUT);
      pinMode(greenPin, OUTPUT);
    }
    حلقة فارغة()
    {
      العد++;
      إذا (القراءة الرقمية (زرPin))
      {
      setLights(HIGH, HIGH, HIGH);
      }
      آخر
      {
      int Change = getEncoderTurn();
      int newPeriod = longPeriod + (change * 1000);  
      إذا (فترة جديدة >= 1000 && فترة جديدة <= 10000)
        {
      longPeriod = newPeriod;
        }
      إذا (العدد > عدد الأهداف)
        {
      setState();
      العد = 0؛
        }
      }
      تأخير (1)؛
    }
    إنت getEncoderTurn()
    {

     // إرجاع -1 أو 0 أو +1
      static int oldA = LOW;
      static int oldB = LOW;
      نتيجة كثافة العمليات = 0؛
      int newA = digitalRead(aPin);
      int newB = digitalRead(bPin);
      إذا (newA != oldA || newB != oldB)
      {
      // لم يتغير شيء
      إذا (oldA == LOW && newA == HIGH)
        {
      النتيجة = -(oldB * 2 - 1);
        }
      }
      oldA = newA;
      oldB = newB;
      نتيجة الإرجاع؛
    }
    إنت سيتستات ()
      {
      إذا (الحالة == 0)
        {
      setLights(HIGH, LOW, LOW);
      targetCount = longPeriod;
      الحالة = 1؛
        }
      وإلا إذا (الحالة == 1)
        {
      setLights(HIGH, HIGH, LOW);
      targetCount = shortPeriod;
      الحالة = 2؛
        }
      وإلا إذا (الحالة == 2)
        {
      setLights(LOW, LOW, HIGH);
      targetCount = longPeriod;
      الحالة = 3؛
        }
      وإلا إذا (الحالة == 3)
        {
      setLights(LOW, HIGH, LOW);
      targetCount = shortPeriod;
      الحالة = 0؛
        }
      }
    مجموعة باطلة من الأضواء (أحمر داكن، أصفر فاتح، أخضر فاتح)
    {
      الكتابة الرقمية(redPin, red);
      الكتابة الرقمية(yellowPin, أصفر);
      الكتابة الرقمية(greenPin, green);

Frequently Bought Together

Total Price: $0.00 USD