作者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/m.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