Wish List 0

5D Rocker Joystick For Arduino Mcu Avr Game

Rs. 76.00 Rs. 94.00

  • Product Code: SEN-JOYSTICK
  • SKU -
  • Availability: In Stock
  • Price in reward points: 1
  • For Bulk Order 9962060070
    Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
-Do you need a 5D navigation button module? Here we have Five Direction Navigation Button Module especially for you.
-You can use it for MCU AVR Game 5D Rocker Joystick and as an Independent Keyboard for Arduino Joystick Modul
-COM (Common end): VCC or GND connected to the MCU development board
-UP (Up direction button): Connect to IO pin of the MCU
-DWN (Down direction button): Connect to IO pin of the MCU
-LFT (Left direction button): Connect to IO pin of the MCU
-RHT (Right direction button): Connect to IO pin of the MCU
-MID (Middle direction button): Connect to IO pin of the MCU
-SET (Set button): Connect to IO pin of the MCU
-RST (Reset button): Connect to IO pin of the MCU

Features:
-supports up/down/left/right/middle with extra set and reset button
-2V-9V wide working voltage
-7 IO port pinout compatible for most MCU development board
SPECIFICATIONS:
Operating Voltage (VDC)            2 ~ 9
Operating Temperature Range (°C)   40 to 85

OVERVIEW:

-Supports up/down/left/right/middle with extra set and reset button

-2V-9V wide working voltage

-The number of IO: 7

-Operating temperature: -40℃ to 85℃


PACKAGE INCLUDES:

1 PCS x 5D Rocker Joystick For Arduino Mcu Avr Game


//SOURCE CODE TAKEN FROM BELOW LINK

//https://create.arduino.cc/projecthub/MisterBotBreak/how-to-use-a-joystick-with-serial-monitor-1f04f0


int VRx = A0;

int VRy = A1;

int SW = 2;


int xPosition = 0;

int yPosition = 0;

int SW_state = 0;

int mapX = 0;

int mapY = 0;


void setup() {

  Serial.begin(9600); 

  

  pinMode(VRx, INPUT);

  pinMode(VRy, INPUT);

  pinMode(SW, INPUT_PULLUP); 

  

}


void loop() {

  xPosition = analogRead(VRx);

  yPosition = analogRead(VRy);

  SW_state = digitalRead(SW);

  mapX = map(xPosition, 0, 1023, -512, 512);

  mapY = map(yPosition, 0, 1023, -512, 512);

  

  Serial.print("X: ");

  Serial.print(mapX);

  Serial.print(" | Y: ");

  Serial.print(mapY);

  Serial.print(" | Button: ");

  Serial.println(SW_state);


  delay(100);

  

}

15 days

Write a review

Please login or register to review