-
1Compilation and upload
Open the example, “Files” -> “Examples” -> “AmebaBLE” -> “BLEHIDGamepad”.
-
2Setup on BLE capable host PC device
Upload the code and press the reset button once the upload is finished.
Immediately after reset, the board will begin BLE advertising as “AMEBA_BLE_HID”. On your host device, go to the Bluetooth settings menu, scan, and connect to the board.
You should ensure that the connection process is completed before proceeding.
On Windows, ensure that any driver installation is finished, and the board shows up in the Bluetooth menu under the “Mouse, keyboard & pen” category. -
3Setup on BLE capable host Mobile device
On Android, ensure that “Input device” is enabled for the board.
-
4Test the results
After the Bluetooth connection process is completed, the board is ready to send gamepad input to the host device. Connect digital pin 8 to 3.3V to start sending input, and connect to GND to stop.
To view the input, open a browser window and go to https://gamepad-tester.com/. The connected gamepad device should show up here, and some of the buttons and axes should show changing values.
On Windows, gamepad input can also be viewed by going to “Control Panel” -> “Devices and Printers” -> “AMEBA_BLE_HID” -> “Game Controller Settings” -> “Properties”. The buttons and axes should also show changing values here.
On Android, gamepad testing apps such as https://play.google.com/store/apps/details?id=com.chimera.saturday.evogamepadtester can also be used to view the gamepad input.
-
5Code Reference
By default, the board emulates a gamepad with an 8-direction hat switch (d-pad), 6 analog axes, and 16 buttons. How the inputs are interpreted is dependent on the host device, and the button order may differ between devices. Also, some axes or buttons may be disabled or missing on certain host devices.
-
6More References
Please visit the following websites for more details about the board & other examples:
- AmebaIoT Official Website: https://www.amebaiot.com/en/
- AmebaIoT Official FB Page: https://www.facebook.com/groups/AmebaIoT
- AmebaIoT Forum: https://forum.amebaiot.com/
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.