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条)