{"product_id":"electronic-building-blocks-dual-ps2-game-joystick-button-module-compatible-with-uno-r3","title":"Electronic building blocks Dual PS2 game joystick button module compatible with UNO R3","description":"\u003ch1\u003eSPECIFICATIONS\u003c\/h1\u003e\u003cp\u003e\u003cspan\u003eApplication\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eComputer\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eBrand Name\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eSTJF\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eChoice\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eyes\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eCondition\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eNew\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eDissipation Power\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e...\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eFunctions\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eElectronic Module\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eHigh-concerned chemical\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003enone\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eOperating Temperature\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e-40℃~+80℃\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eOrigin\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eMainland China\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eRange of application\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eSwitch And Sensor For Arduino STM\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eSupply Voltage\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e...\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eType\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eModule\u003c\/span\u003e\u003c\/p\u003e\u003cdiv class=\"detailmodule_html\"\u003e\u003cdiv class=\"detail-desc-decorate-richtext\"\u003e\n\u003cp\u003e\u003cspan style=\"font-size:28px;\"\u003eThanks 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)\u003c\/span\u003e\u003c\/p\u003e\n\u003cbr\u003e\u003cp\u003e\u003cspan style=\"font-size:28px;\"\u003e\/\/This code is provided by phoenix.\u003cbr\u003e\/\/ Only joysticks and buttons on all interfaces are tested.\u003cbr\u003e\/\/Only test the rocker and buttons on all interfaces.\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size:28px;\"\u003evoid setup(void)\u003cbr\u003e{\u003cbr\u003eSerial.begin(9600); \/\/ Set the serial port communication rate to 9600 baud\u003cbr\u003efor ( int i = 0;  i\u0026lt;=13;  i++)\/\/ Define the button position\u003cbr\u003e{\u003cbr\u003epinMode(i,INPUT_PULLUP);\u003cbr\u003edigitalWrite(i, 1);\u003cbr\u003e}\u003cbr\u003e}\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size:28px;\"\u003evoid loop(void)\u003cbr\u003e{\u003cbr\u003e\/\/******************* joystick position judgment, from port to port from 0-13; A1-A5(14-20)\u003cbr\u003efor ( int i = 0;  i\u0026lt;=20;  i++)\/\/ From ports 0 to 20\u003cbr\u003e{\u003cbr\u003eSerial.print(i);\u003cbr\u003eSerial.print(\"=\");\u003cbr\u003eSerial.print(analogRead(i)); \/\/ Read the value of rocker X axis, serial port display\u003cbr\u003eSerial.print(\";\" );\u003cbr\u003e}\u003cbr\u003e\/ \/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * Button position judgment, from port 0-13,; A1-A5(14-20)\u003cbr\u003eint i, someInt, flag = 0;\u003cbr\u003efor (i = 0;  i\u0026lt;=20;  i++) \/\/ From ports 0 to 20\u003cbr\u003e{\u003cbr\u003eif (digitalRead(i) == 0) \/\/ Read the status of the button and determine whether to press it\u003cbr\u003e{\u003cbr\u003eSerial.print(\"button=\");\u003cbr\u003eSerial.print(i);\u003cbr\u003eSerial.print(\";\" );\u003cbr\u003e}\u003cbr\u003e}\u003cbr\u003eSerial.println(\"\"); \/\/ End a line\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size:28px;\"\u003edelay(100);    \/\/ Refresh once 100ms\u003cbr\u003e}\u003c\/span\u003e\u003c\/p\u003e\n\u003cbr\u003e\u003cp\u003e\u003cimg style=\"width:1000px;\" width=\"1000px\" src=\"https:\/\/ae01.alicdn.com\/kf\/S09ca558147bc42149ce71108e37ddb2cy.jpg\" slate-data-type=\"image\" data-src=\"https:\/\/ae01.alicdn.com\/kf\/S09ca558147bc42149ce71108e37ddb2cy.jpg\"\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cimg style=\"width:1000px;\" width=\"1000px\" src=\"https:\/\/ae01.alicdn.com\/kf\/S7d23d1d96baa4f829b958fe9f960c478Z.jpg\" slate-data-type=\"image\" data-src=\"https:\/\/ae01.alicdn.com\/kf\/S7d23d1d96baa4f829b958fe9f960c478Z.jpg\"\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cimg style=\"width:1000px;\" width=\"1000px\" src=\"https:\/\/ae01.alicdn.com\/kf\/S246963d455e6417b9a707d6afdd78681a.jpg\" slate-data-type=\"image\" data-src=\"https:\/\/ae01.alicdn.com\/kf\/S246963d455e6417b9a707d6afdd78681a.jpg\"\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cimg style=\"width:1000px;\" width=\"1000px\" src=\"https:\/\/ae01.alicdn.com\/kf\/S0237fa2a64284f0aa54bb5dc57ce3732F.jpg\" slate-data-type=\"image\" data-src=\"https:\/\/ae01.alicdn.com\/kf\/S0237fa2a64284f0aa54bb5dc57ce3732F.jpg\"\u003e\u003c\/p\u003e\n\u003cbr\u003e\n\u003c\/div\u003e\u003c\/div\u003e\r\n","brand":"Yoeruyo","offers":[{"title":"Default Title","offer_id":55421250076971,"sku":"\u003cnone\u003e","price":13.82,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1000\/5744\/8747\/files\/Sc46ced83b9e74e7e8ded3a015aafa169n.webp?v=1788512971","url":"https:\/\/yoeruyo.com\/products\/electronic-building-blocks-dual-ps2-game-joystick-button-module-compatible-with-uno-r3","provider":"Yoeruyo","version":"1.0","type":"link"}