Electronic building blocks Dual PS2 game joystick button module compatible with UNO R3

Electronic building blocks Dual PS2 game joystick button module compatible with UNO R3

Default Title
$13.82
Sale price  $13.82 Regular price  $0.00
Skip to product information
Electronic building blocks Dual PS2 game joystick button module compatible with UNO R3
Electronic building blocks Dual PS2 game joystick button module compatible with UNO R3
$13.82
Sale price  $13.82 Regular price  $0.00
Default TitleDefault Title
Description

SPECIFICATIONS

Application: Computer

Brand Name: STJF

Choice: yes

Condition: New

Dissipation Power: ...

Functions: Electronic Module

High-concerned chemical: none

Operating Temperature: -40℃~+80℃

Origin: Mainland China

Range of application: Switch And Sensor For Arduino STM

Supply Voltage: ...

Type: Module

Thanks to the selfless sharing of the user Phoenix, the following test code is written for him, suitable for testing a variety of rocker or button code. Does not differentiate the board. IDE board with 1.8.6. If the latest update is not tested)


//This code is provided by phoenix.
// Only joysticks and buttons on all interfaces are tested.
//Only test the rocker and buttons on all interfaces.

void setup(void)
{
Serial.begin(9600); // Set the serial port communication rate to 9600 baud
for ( int i = 0;  i<=13;  i++)// Define the button position
{
pinMode(i,INPUT_PULLUP);
digitalWrite(i, 1);
}
}

void loop(void)
{
//******************* joystick position judgment, from port to port from 0-13; A1-A5(14-20)
for ( int i = 0;  i<=20;  i++)// From ports 0 to 20
{
Serial.print(i);
Serial.print("=");
Serial.print(analogRead(i)); // Read the value of rocker X axis, serial port display
Serial.print(";" );
}
/ / * * * * * * * * * * * * * * * * * * * * * * * * * * * * Button position judgment, from port 0-13,; A1-A5(14-20)
int i, someInt, flag = 0;
for (i = 0;  i<=20;  i++) // From ports 0 to 20
{
if (digitalRead(i) == 0) // Read the status of the button and determine whether to press it
{
Serial.print("button=");
Serial.print(i);
Serial.print(";" );
}
}
Serial.println(""); // End a line

delay(100);    // Refresh once 100ms
}



Free Shipping Over $199
  • Standard Shipping: Standard Shipping (12–18 Business Days)
  • Express Shipping: Expedited Shipping (5–9 Business Days)
  • Free Shipping: Orders over $199 qualify automatically
  • Tracking: Full tracking number provided for all orders
30-Day Return Policy
  • Returns: 30-day hassle-free return window
  • Condition: Items must be unused and in original packaging
  • Refund: Full refund processed within 3-5 business days
Why Choose Us?
  • Factory Direct: ISO/TS 16949 certified manufacturer
  • Quality: 100% electrical continuity tested before shipment
  • Experience: 15+ years in automotive connector industry
  • Support: Professional technical support available
Secure Payment Latest encryption technology
Money-Back Guarantee 30-day hassle-free returns
Quality Assured Factory certified products
Global Fast Shipping Worldwide express delivery

You may also like

Contact us

Subscribe to our emails

Be the first to know about new collections and special offers.