Rotary Encoder Module

(27 customer reviews)

$6.95

9 in stock

Description

Rotary Encoder Module Code


/* SETUP

Rotary-Encoder  Arduino
GND      -      D2
+        -      5V
SW       -     
DT       -      D4
CL.K     -      D3
*/
 
int val;
int encoder0PinA = 3;
int encoder0PinB = 4;
int encoder0Pos = 0;
int encoder0PinALast = LOW;
int n = LOW;

void setup() {
  pinMode (encoder0PinA, INPUT);
  pinMode (encoder0PinB, INPUT);
  Serial.begin (9600);
}

void loop() {
  n = digitalRead(encoder0PinA);
  if ((encoder0PinALast == LOW) && (n == HIGH)) {
    if (digitalRead(encoder0PinB) == LOW) {
      encoder0Pos--;
    } else {
      encoder0Pos++;
    }
    Serial.print (encoder0Pos);
    Serial.print ("/");
  }
  encoder0PinALast = n;
}

 

Additional information

Weight 0.009 kg
  1. Hvjwyh

    atorvastatin order online atorvastatin usa buy atorvastatin 20mg

  2. Bbiexx

    buy cheap baycip – buy cheap cephalexin buy augmentin for sale

  3. Dodixs

    purchase ciprofloxacin – ethambutol medication augmentin 1000mg over the counter

  4. Kmxlil

    flagyl price – buy generic amoxil zithromax 500mg without prescription

  5. Yazbvj

    ciplox online buy – buy generic doxycycline erythromycin buy online

  6. Ajyvqo

    order valacyclovir online cheap – order nateglinide 120 mg sale purchase acyclovir

  7. Gtnlii

    ivermectin 3 mg over the counter – cost co-amoxiclav order sumycin generic

  8. Odijsd

    flagyl medication – purchase metronidazole azithromycin 500mg canada

  9. Ddqdqn

    oral ampicillin penicillin for sale cheap amoxil online

  10. Liriaz

    lasix ca – lasix 100mg cost purchase capoten sale

  11. Zczyhd

    cost zidovudine 300mg – irbesartan 150mg price zyloprim cheap

  12. Eftjoq

    glycomet over the counter – generic lincocin 500mg lincomycin 500 mg price

  13. Psykpv

    clozapine medication – quinapril where to buy order pepcid 20mg generic

  14. Rufaze

    seroquel 100mg without prescription – purchase seroquel pills order eskalith generic

  15. Gyiwiz

    buy hydroxyzine pill – order escitalopram for sale amitriptyline order online

  16. Bcouwz

    buy clomipramine online cheap – order duloxetine 40mg pills buy sinequan pills

  17. Ungoeu

    buy amoxil cheap – order cefuroxime 250mg generic buy ciprofloxacin 1000mg generic

  18. Lcstyd

    buy clavulanate generic – augmentin 1000mg price order cipro pills

  19. Nalbhn

    generic clindamycin – oxytetracycline ca how to get chloramphenicol without a prescription

  20. Egajku

    purchase azithromycin pills – buy tetracycline generic order generic ciprofloxacin

  21. Sleiut

    buy ventolin generic – buy theophylline cheap theo-24 Cr 400mg canada

  22. Ukzjbg

    ivermectin 6 mg tablets – levofloxacin order buy cefaclor for sale

  23. Daepkm

    buy generic desloratadine – flixotide brand order generic ventolin

  24. Pglwyi

    buy medrol 8 mg online – buy astelin 10 ml sprayers azelastine cheap

  25. Wvkbjb

    buy generic glyburide – order generic pioglitazone 15mg order forxiga sale

  26. Hkgarr

    prandin for sale online – empagliflozin order online jardiance 25mg price

  27. Uztjbm

    metformin order online – acarbose 25mg generic buy generic acarbose over the counter

Add a review

Your email address will not be published. Required fields are marked *