Joystick Module

(28 customer reviews)

$10.50

5 in stock

Description

Analog joysticks are a great way to add some control in your projects. The module has 5 pins: Vcc, Ground, X, Y, Key. The thumbstick is analog and should provide more accurate readings than simple ‘directional’ joysticks tat use some forms of buttons, or mechanical switches. Additionally, you can press the joystick down to activate a ‘press to select’ push-button.

Joystick Module Code


/* SETUP

Joystick        Arduino
GND       -     GND
+5V       -     5V
VRx       -     A0
VRy       -     A1
SW        -     D2
*/
 
// Arduino pin numbers
const int SW_pin = 2; // digital pin connected to switch output
const int X_pin = 0; // analog pin connected to X output
const int Y_pin = 1; // analog pin connected to Y output
 
void setup() {
  pinMode(SW_pin, INPUT);
  digitalWrite(SW_pin, HIGH);
  Serial.begin(115200);
}
 
void loop() {
  Serial.print("Switch:  ");
  Serial.print(digitalRead(SW_pin));
  Serial.print("\n");
  Serial.print("X-axis: ");
  Serial.print(analogRead(X_pin));
  Serial.print("\n");
  Serial.print("Y-axis: ");
  Serial.println(analogRead(Y_pin));
  Serial.print("\n\n");
  delay(200);
}

 

Additional information

Weight 0.012 kg
  1. Pycwdb

    atorvastatin 40mg drug order lipitor 40mg online atorvastatin 80mg cost

  2. Lbommx

    buy cipro paypal – order baycip sale purchase amoxiclav without prescription

  3. Efrsbn

    buy cipro sale – cheap septra clavulanate where to buy

  4. Vhpxxx

    order ciplox 500mg pill – buy doryx tablets order generic erythromycin 250mg

  5. Cwaxlp

    flagyl 400mg without prescription – buy cefaclor 500mg generic buy cheap generic azithromycin

  6. Olwwzp

    ivermectin oral – buy cefixime online sumycin 250mg brand

  7. Ojgsur

    buy valacyclovir generic – order mebendazole 100mg acyclovir 400mg usa

  8. Cqschn

    acillin usa order amoxil amoxicillin over the counter

  9. Lpppbb

    flagyl 400mg over the counter – order cefaclor generic where can i buy zithromax

  10. Zsigit

    furosemide pills – order capoten 25mg pill buy captopril online

  11. Amiyqf

    cost glycomet 500mg – buy lincomycin cheap lincocin 500mg ca

  12. Fdzprl

    buy generic retrovir over the counter – allopurinol 100mg generic buy generic zyloprim

  13. Quyjue

    clozaril over the counter – cheap altace pepcid 40mg brand

  14. Ucrrsg

    buy quetiapine sale – oral eskalith cheap eskalith

  15. Tkrvfo

    buy clomipramine 50mg – celexa cost brand doxepin

  16. Gxumtf

    atarax 25mg price – escitalopram 10mg canada order endep online

  17. Saxfks

    buy generic augmentin for sale – buy generic bactrim buy generic ciprofloxacin for sale

  18. Kphuop

    amoxil medication – buy cheap amoxicillin cipro 500mg tablet

  19. Yniehd

    buy cheap generic zithromax – ciprofloxacin price purchase ciprofloxacin generic

  20. Qbwfzh

    order cleocin online cheap – buy doxycycline sale chloromycetin tablets

  21. Ntnemm

    stromectol coupon – order eryc pill buy cefaclor 500mg without prescription

  22. Trurye

    buy medrol 16 mg – buy generic fluorometholone for sale azelastine 10ml usa

  23. Mauapp

    desloratadine oral – buy zaditor without prescription strongest over the counter asthma

  24. Lblzuk

    micronase medication – order micronase 2.5mg generic order dapagliflozin 10mg without prescription

  25. Oyunhh

    glucophage medication – order losartan 25mg online buy precose 25mg generic

  26. Ebsolh

    where can i buy repaglinide – order prandin 2mg online empagliflozin 25mg pills

  27. Uvaasf

    order rybelsus 14 mg sale – buy glucovance no prescription DDAVP usa

  28. Cprvmo

    order lamisil online – terbinafine buy online order grifulvin v for sale

Add a review

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