So I am trying to program a pro micro to act as either a gamepad or a keyboard/mouse depending on whether a certain switch is on/off.
I have managed to program the micro to act as either a gamepad OR a keyboard/mouse but cannot get it to switch between these within the script (i.e. the pro micro will act as EITHER mouse/keyboard or a gamepad depending upon which program I upload).
If I upload the script attached it will do what I want it to (i.e. be a keyboard/mouse when switch 9 is HIGH but a gamepad when switch 9 is LOW) but only in Windows operating system (I want it to work with a raspberry pi in emulation station).
If I try to use this with emulation station on the raspberry pi it does not recognise any of the keys (or the pro micro itself).
I have provided the script below but have narrowed down the problem to the inclusion of the Mouse.h library. Without this library included the gamepad is recognised within emulation station however I cannot then use the micro as a mouse
Does anyone have any suggestions to this? At the moment the only resolution I can see is to use 2 pro micros programmed as either a gamepad or a keyboard/mouse and physically disconnecting the one and connecting the other to the pi but this seems a bit extreme.
Sorry I did try to attach the script but it keeps throwing up an error message when I try to download it. I don't suppose you know what I need to do so you can access it?
Thanks for the response. The pro micro does work on emulation station if I only upload the gamepad script without the mouse/keyboard libraries (sorry I should have made that clearer).
I will have a look on the raspberry pi forum. Thanks again