top of page

DUPLA TENGELYŰ JOYSTICK

 

- Analóg dupla-tengelyű joystick sapkával

- tápfeszültség: 3.3 - 5V DC

- méret: 34 x 26 mm

- magasság: 32 mm

- két, integrált kétirányú 10k ellenállás

- integrált nyomógomb

- ideális az Arduino családhoz

 

Arduino kód:

 

int joystick_x = 0; // x tengely

int joystick_y = 1; // y tengely

int joystick_z = 3; // nyomógomb

 

void setup () {

pinMode (joystick_x, INPUT);

pinMode (joystick_y, INPUT);

pinMode (joystick_z, INPUT);

Serial.begin (9600);

}

 

void loop () {

int x = analogRead(Joystick_X);  // read x axle
  int y = analogRead(Joystick_Y);  // read y axle
  int z = digitalRead(Joystick_Z);   // read button status

Serial.print(x, DEC); Serial.print( ",");
  Serial.print(y, DEC); Serial.print( ",");
  Serial.println(z, DEC);
}

Dupla tengelyű joystick

Cikkszám: DUALJOY
2,00€Ár
    bottom of page