作者stuqooq (二次元萝莉控)
看板ASM
标题[问题] Arduino include mouse library问题
时间Sun Feb 14 14:14:45 2016
各位大大们午安 菜逼巴初次发文 有问题还请指正
最近想做一个摇杆来打音game 就想到了arduino 但是在使用Mouse的library出了问题
使用的板子是UNO R3
MCU是ATmega16U2
先附上code
#include <Mouse.h>
void setup() {
Mouse.begin();
}
void loop() {
}
还有Error Message
Arduino:1.6.7 (Windows 7), 板子:"Arduino/Genuino Uno"
In file included from C:\Users\DS\Documents\Arduino\sketch_feb14d\sketch_feb14d.ino:1:0:
D:\Arduino\libraries\Mouse\src/Mouse.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]
#warning "Using legacy HID core (non pluggable)"
^
C:\Users\DS\Documents\Arduino\sketch_feb14d\sketch_feb14d.ino: In function 'void setup()':
sketch_feb14d:3: error: 'Mouse' not found. Does your sketch include the line '#include <Mouse.h>'?
Mouse.begin();
^
exit status 1
'Mouse' not found. Does your sketch include the line '#include <Mouse.h>'?
是因为UNO不支援滑鼠...? 可是ATmega16U2这颗应该是没问题的啊
另外 keyboard的library也会有一样的问题
还是说我应该直接去买Leonardo回来...Orz
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 210.240.245.73
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/ASM/M.1455430488.A.919.html
1F:→ alibuda174: Mouse library is for Leonardo/Micro only 02/14 15:05
2F:→ stuqooq: (′・ω・`) .....糗大了 02/14 15:10