Rotary Encoder Module

(80 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. Sieqck

    buy cabergoline 0.5mg without prescription – purchase cabgolin generic alesse brand

  2. Notrvv

    estrace 1mg price – cheap femara 2.5mg arimidex 1mg ca

  3. Cdvtwq

    バイアグラは薬局で買える? – г‚·г‚ўгѓЄг‚№ гЃЉгЃ™гЃ™г‚Ѓ г‚їгѓЂгѓ©гѓ•г‚Јгѓ«гЃ®йЈІгЃїж–№гЃЁеЉ№жћњ

  4. Rrplxq

    гѓ—гѓ¬гѓ‰гѓ‹гѓігЃ®йЈІгЃїж–№гЃЁеЉ№жћњ – アジスロマイシンの購入 アジスロマイシンの飲み方と効果

  5. Grobend

    priligy dapoxetina 30mg nos eua Once injected in a gel capsule, Deca can be taken orally or parenterally

  6. Lxodzl

    гѓ—гѓ¬гѓ‰гѓ‹гѓійЊ  5 mg еј·гЃ• – イソトレチノイン通販 安全 イソトレチノイン еЂ¤ж®µ

  7. Vyqgcx

    eriacta accept – apcalis cover forzest jar

  8. Ygdhqf

    indinavir brand – cheap generic confido order diclofenac gel for sale

  9. Xbjnht

    valif online onto – valif online prefer buy sinemet 20mg sale

  10. Ankxtm

    buy provigil – cefadroxil usa combivir online buy

  11. Gjtysb

    buy generic phenergan – cost lincocin 500 mg lincocin 500mg without prescription

  12. Spevdq

    stromectol 3mg – carbamazepine 200mg over the counter tegretol pills

  13. Ubyaif

    order prednisone 5mg generic – nateglinide 120 mg brand order capoten 25mg without prescription

  14. Wwudpg

    deltasone over the counter – nateglinide 120 mg pill cost capoten

  15. Wbtylw

    buy isotretinoin 40mg pills – order zyvox 600 mg for sale buy linezolid 600mg sale

  16. Hnhvhe

    order amoxicillin online – amoxil over the counter buy combivent

  17. Ebkskh

    buy azithromycin no prescription – order tinidazole sale brand bystolic

  18. Dcyfuy

    omnacortil 20mg pill – order azipro 500mg generic purchase prometrium pill

  19. Qopxdq

    order lasix 40mg online – nootropil for sale betnovate 20gm brand

  20. Zefseb

    vibra-tabs usa – order glipizide cost glipizide 10mg

  21. Oczfri

    augmentin pills – cymbalta medication buy cymbalta cheap

  22. Dvsext

    buy augmentin 375mg online – cymbalta 40mg oral buy cymbalta cheap

  23. Vmpjop

    brand rybelsus – periactin ca cyproheptadine online

  24. Nrtusz

    cost tizanidine – buy tizanidine 2mg pills cost microzide 25mg

  25. Ghhxnh

    viagra tablets – buy viagra purchase cialis online cheap

  26. Fkstnt

    tadalafil 20mg generic – sildenafil pharmacy viagra overnight

  27. Qrjswb

    purchase cenforce generic – cenforce 100mg sale brand glucophage

  28. Ureuwx

    lipitor 40mg over the counter – lipitor where to buy zestril over the counter

  29. Neyqvs

    cheap omeprazole 20mg – buy omeprazole without a prescription purchase atenolol for sale

  30. Dsubus

    depo-medrol medicine – lyrica 75mg cheap order aristocort 10mg sale

  31. Zijjve

    cytotec 200mcg for sale – buy diltiazem 180mg for sale diltiazem price

  32. Jdthjj

    buy generic zovirax for sale – crestor 20mg drug cheap crestor 10mg

  33. Tcffix

    motilium price – where can i buy cyclobenzaprine cyclobenzaprine 15mg for sale

  34. Udsnwb

    buy domperidone 10mg pill – cheap motilium 10mg buy flexeril 15mg

  35. Gmnccr

    buy inderal 20mg generic – order methotrexate 10mg generic methotrexate 2.5mg cost

  36. Spjjsq

    order generic coumadin – order metoclopramide 10mg brand losartan 50mg

  37. Fvhrym

    nexium 40mg cheap – buy nexium no prescription imitrex 25mg ca

  38. Cniktw

    order generic levofloxacin 500mg – order levaquin 500mg without prescription buy ranitidine pills for sale

  39. Oqnivo

    mobic where to buy – purchase tamsulosin sale buy flomax without a prescription

  40. Shirleen

    If some one wishes expert view on the topic of blogging
    after that i advise him/her to visit this webpage, Keep up the pleasant job.

    Check out my web blog … nordvpn coupons inspiresensation

  41. Lurlene

    Thanks for the marvelous posting! I seriously enjoyed reading it, you might
    be a great author.I will always bookmark your blog and will come back sometime soon. I want to encourage one to continue your
    great job, have a nice holiday weekend!

    Have a look at my web-site nordvpn coupons inspiresensation (http://s.bea.sh/nordvpn-coupons-inspiresensation–32478)

  42. Myrtle

    fantastic issues altogether, you simply gained a new reader.
    What would you recommend about your post that you made some days ago?
    Any certain?

    My site Nordvpn Coupons Inspiresensation (T.Co)

  43. Joann

    Thank you for the auspicious writeup. It in reality was a amusement account it.
    Look advanced to more brought agreeable from you! By the way, how could we keep in touch?

    Also visit my web page :: nordvpn coupons inspiresensation (http://in.mt/nordvpn-coupons-inspiresensation–76939)

  44. Gerald

    350fairfax nordvpn
    I loved as much as you’ll receive carried out right here.
    The sketch is attractive, your authored subject
    matter stylish. nonetheless, you command get
    bought an nervousness over that you wish be delivering the following.
    unwell unquestionably come more formerly again since exactly
    the same nearly very often inside case you shield this hike.

    my web site; nord vpn promo

  45. tukq6

    order generic provigil modafinil 100mg sale oral modafinil order modafinil 200mg without prescription order modafinil 200mg online cheap provigil without prescription buy modafinil 200mg generic

  46. can you drink 24 hours after taking flagyl

    Thanks for putting this up. It’s understandably done.

  47. tfqtv

    order azithromycin generic – floxin 200mg sale buy flagyl tablets

  48. 96zra

    domperidone 10mg sale – order cyclobenzaprine generic flexeril generic

  49. gka6o

    buy inderal 10mg for sale – inderal pills buy methotrexate 2.5mg pills

  50. qumrt

    amoxicillin canada – amoxil generic purchase combivent pills

  51. rb0gh

    buy zithromax – brand bystolic nebivolol where to buy

  52. Susana

    Amazing! This blog looks exactly like my old one! It’s on a completely different subject
    but it has pretty much the same layout and design. Wonderful choice of colors!

    Here is my page: eharmony special coupon code 2025

  53. ai65k

    order augmentin 1000mg without prescription – https://atbioinfo.com/ ampicillin canada

  54. i60ad

    buy meloxicam 15mg sale – https://moboxsin.com/ mobic 15mg us

  55. lvs5v

    order deltasone 20mg without prescription – aprep lson buy prednisone 20mg pills

  56. Gary

    I believe everything wrote was actually very reasonable. However, what about this?
    what if you were to write a killer title? I mean, I don’t wish to tell you how to run your blog,
    however what if you added something that grabbed people’s attention? I mean Rotary Encoder Module | Electronicsurplus is a little boring.
    You could glance at Yahoo’s front page and see how they create news headlines to grab people to click.
    You might try adding a video or a related pic or two to get readers interested about everything’ve written. Just my opinion, it might bring your posts a little bit more interesting.

    Review my blog :: vpn

  57. wa1qu

    buy ed pills fda – fastedtotake cheap erectile dysfunction pill

  58. 9jfhk

    order amoxil online cheap – buy amoxicillin paypal purchase amoxicillin generic

  59. lykct

    order cenforce 50mg online cheap – https://cenforcers.com/# cenforce brand

  60. 3ezxo

    best research tadalafil 2017 – click cialis free trial phone number

  61. lxe7x

    sildenafil 50mg – https://strongvpls.com/ real viagra for sale

  62. Connierab

    Thanks for putting this up. It’s well done. comprar provigil en barcelona

  63. m69ie

    This is a question which is near to my verve… Many thanks! Quite where can I upon the phone details due to the fact that questions? buy zithromax medication

  64. Connierab

    This is the compassionate of scribble literary works I in fact appreciate. https://ursxdol.com/propecia-tablets-online/

  65. Ian Robinson

  66. tkh0l

    I am in truth delighted to gleam at this blog posts which consists of tons of worthwhile facts, thanks representing providing such data. https://prohnrg.com/

  67. Daniel Robert Mason

  68. David Joseph Lewis

    I gained useful knowledge from this.

    https://aidirectoryzone.com/website-list-1780/

  69. George Joseph Taylor

  70. Arthur Alexander Jackson

    I took away a great deal from this.

    http://www.marshabrink.nl/2011/09/04/vliegen-2/

  71. Michael George Lewis

  72. Charles John Evans

  73. Peter Jackson

  74. Christopher Mason

    More posts like this would make the internet richer.

    https://br2ch.pgw.jp/brBBS/bbs.cgi?no=000009&log=61832

  75. Henry Edwards

  76. Andrew Patel

    I absolutely liked the way this was explained.

    http://www.sickautos.com/?q=comment/2531

  77. Eusebia

    I do not know whether it’s just me or if perhaps everyone else experiencing issues with
    your blog. It appears like some of the text on your posts are running off the screen. Can somebody else please provide feedback
    and let me know if this is happening to them as
    well? This may be a problem with my internet browser because
    I’ve had this happen previously. Appreciate it

    my site – what does vpn mean

  78. Lynette

    Hello! I’ve been reading your site for some time now and finally got the
    bravery to go ahead and give you a shout out from Kingwood Tx!

    Just wanted to say keep up the excellent job!

    My page :: vpn

  79. Connierab

    Thanks recompense sharing. It’s outstrip quality.
    topiramate 100mg drug

  80. Connierab

    buy generic dapagliflozin – forxiga 10 mg us dapagliflozin uk

Add a review

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