您好,欢迎访问本站!
商品分类

mindplus + arduino ps2通信案例代码示例拖拽编程小钉锤扩展板

可以使用的模块:

XDC009 小钉锤PS2扩展板

mindplus + arduino  ps2通信案例代码示例拖拽编程小钉锤扩展板

小钉锤PS2转接板

mindplus + arduino  ps2通信案例代码示例拖拽编程小钉锤扩展板

mindplus + arduino  ps2通信案例代码示例拖拽编程小钉锤扩展板
/*!
 * MindPlus
 * uno
 *
 */
#include <DFRobot_PS2X.h>
// 创建对象
DFRobot_PS2X ps2x;


// 主程序开始
void setup() {
	Serial.begin(9600);
	ps2x.config_gamepad(13,11,10,12, true, false);
	delay(300);
}
void loop() {
	ps2x.read_gamepad();
	delay(30);
	if (ps2x.ButtonPressed(PSB_PAD_UP)) {
		Serial.println("hello");
	}
}

更新记录:

2024.10.09 添加视频

2024.09.30发布

发表回复

登录后才能评论

评论列表(1条)

公众号
公众号
创客圈 配件商城
分享本页
返回顶部