Electronic building blocks Dual PS2 game joystick button module compatible with UNO R3
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
}




- 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
- 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
- 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
You may also like
Blog posts
Title
Subscribe to our emails
Be the first to know about new collections and special offers.