Notice: file_put_contents(): write of 4049 bytes failed with errno=28 No space left on device in /home/libs.com/public_html/libs_chung/v4/_product.php on line 111

Warning: file_put_contents(): Only -1 of 4049 bytes written, possibly out of free disk space in /home/libs.com/public_html/libs_chung/v4/_product.php on line 111
Tay cầm Sony PS2 không dây - Lotte Market

Tay cầm Sony PS2 không dây tại Lotte Market

Thương hiệu: | Xem thêm Phụ kiện Console Thương hiệu  

Mô tả ngắn về Tay cầm Sony PS2 không dây tại Lotte Market

Tay cầm Sony PS2 không dây. Chuyên cung cấp linh kiện điện tử, thiết bị công nghiệp, dịch vụ tự động hoá. Để biết thêm thông tin về sản phẩm vui long nhắn tin cho shop. //Khai bao chan PS2. #define PS2_CMD 11. #define PS2_CLK 12. #define relay 8. #define pressures false. #define rumble false. int error = 0;. byte
: Còn hàng
: Shopee
199.000đ 199.000đ
** Quét mã QR bằng Zalo để mua trên điện thoại

Giới thiệu Tay cầm Sony PS2 không dây tại Lotte Market

Tay cầm Sony PS2 không dâyTay cầm Sony PS2 không dây
ĐIỆN TỬ NGUYỄN HIỀN
Chuyên cung cấp linh kiện điện tử, thiết bị công nghiệp, dịch vụ tự động hoá.
Địa chỉ: 24/2 Ngô Sĩ Liên, Hòa Khánh Bắc, Liên Chiểu, Đà Nẵng
Để biết thêm thông tin về sản phẩm vui long nhắn tin cho shop
Xin cảm ơn
#include
//Khai bao chan PS2
#define PS2_DAT 13
#define PS2_CMD 11
#define PS2_SEL 10
#define PS2_CLK 12
//Khai bao chan dieu khien relay
#define relay 8

//#define pressures true
#define pressures false
//#define rumble true
#define rumble false

PS2X ps2x; // create PS2 Controller Class
int error = 0;
byte type = 0;
byte vibrate = 0;

void setup() {
// put your setup code here, to run once:
pinMode(relay, OUTPUT);

Serial.begin(57600);
digitalWrite(relay, HIGH);
delay(300);
//setup pins and settings: GamePad(clock, command, attention, data, Pressures?, Rumble?) check for error
error = ps2x.config_gamepad(PS2_CLK, PS2_CMD, PS2_SEL, PS2_DAT, pressures, rumble);

if(error == 0){Tay cầm Sony PS2 không dây
Serial.print(”Found Controller, configured successful ”);
Serial.print(”pressures = ”);
if (pressures)
Serial.println(”true ”);
else
Serial.println(”false”);
Serial.print(”rumble = ”);
if (rumble)
Serial.println(”true)”);
else
Serial.println(”false”);
Serial.println(”Try out all the buttons, X will vibrate the controller, faster as you press harder;”);
Serial.println(”holding L1 or R1 will print out the analog stick values.”);
Serial.println(”Note: Go to www.billporter.info for updates and to report bugs.”);
}
else if(error == 1)
Serial.println(”No controller found, check wiring, see readme.txt to enable debug. visit www.billporter.info for troubleshooting tips”);

else if(error == 2)
Serial.println(”Controller found but not accepting commands. see readme.txt to enable debug. Visit www.billporter.info for troubleshooting tips”);

else if(error == 3)
Serial.println(”Controller refusing to enter Pressures mode, may not support it. ”);

type = ps2x.readType();
switch(type) {
case 0:
Serial.print(”Unknown Controller type found ”);
break;
case 1:
Serial.print(”DualShock Controller found ”);
break;
case 2:
Serial.print(”GuitarHero Controller found ”);
break;Tay cầm Sony PS2 không dây
case 3:
Serial.print(”Wireless Sony DualShock Controller found ”);
break;
}
}

void loop() {
// put your main code here, to run repeatedly:
if(error == 1) //skip loop if no controller found
return;
if(type == 2){
ps2x.read_gamepad();
}
else
{
ps2x.read_gamepad(false, vibrate);
vibrate = ps2x.Analog(PSAB_CROSS);
if (ps2x.NewButtonState())
{
if(ps2x.Button(PSB_L1))
{
digitalWrite(relay, LOW);
}
else
{
digitalWrite(relay, HIGH);
}
}
}
}

Chi Tiết Tay cầm Sony PS2 không dây

Nền tảng tương thích Playstation