Control a Espruino board with a gamepad #1757
Replies: 7 comments
-
Posted at 2017-08-24 by @gfwilliams Hi! For standard Bluetooth you might be able to find some firmware for an HC-05 bluetooth module, but I think it's unlikely. HC-05s can handle being a Bluetooth UART host, so I'd think it's possible that they could also be a HID host. It's just finding the firmware to do it :( I think you're right in that you'd need a USB host shield and a Bluetooth dongle - and even then I'd double-check because to me it seems like it would be more difficult than that. However, you can also get Bluetooth LE controllers (be careful though - I just had a quick look on eBay and found a few that appeared to be mis-advertised), and if you're using those then something like Puck.js could communicate directly with them over BLE. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-25 by user80672 Hello, Thank you for your fast answer. I did some searching and I think that these would meet requirements: http://www.hobbytronics.co.uk/usb-host-board-v2 and http://www.hobbytronics.co.uk/bluetooth-4-dongle That board can be ordered with preinstalled PS3/4 firmware and gamepad data can be read from a serial output. Do you think it would work? Best regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-26 by Robin Hello Kari @user80672, To clarify, which Espruino board are you intending to use? ref #1 above
Will you be using I2C to communicate with the Espruino board? Is this what you had in mind? Make sure the Bluetooth adapter supports BLE if communicating with the Puck. This article implies ver 4.1 is required for BLE: http://noahklugman.com/talks/ble_presentation.pdf
@gfwilliams Does the Puck support Bluetooth LE 4.0 ? (yes?) - BLE 4.1 ? (?) Features section doesn't specify, but both references are used on the page and to add to the confusion wikipedia indicates 'Bluetooth_4.1' This helps in Bluetooth version clarification
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-26 by user80672 Hello Robin, I have an original Espruino board and a micro one, not yet a Puck. And yes, I think I could utilise this: http://www.hobbytronics.co.uk/ps3-ps4-controller-bluetooth My plan is like this:
I don't have to care about step two and three but I'm only guessing that I'm able to do step one. I'm a total beginner with these things, so please let me know if I'm guessing wrong. Best regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-26 by Robin Thank you Kari @user80672, your explanation clarifies you understand which module will do what. Although I don't have practical experience with the USB host controller, your plan appears sound to me. Are you at a point where you are comfortable in creating a communication language between the two devices, or are you still searching for modules that may cut down on development time? I think it would be a challenge and a load of fun creating a language for the robot. Something unique and one could be proud of when done. As a thought would you post 'as you go' pictures in the 'Projects' forum Good luck and have fun!! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-28 by user80672 Hello, And thank you for encouraging words. I will share information about the progress. Best regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-29 by @gfwilliams Hi Kari, That all looks great to me! Serial or I2C should work just fine, with any Espruino board. I'm not quite sure what you'd be doing on the Espruino, but if you're controlling neopixels you'd want to use I2C (not Serial) as Espruino turns interrupts off during neopixel transmission and that can cause you to lose some serial data. If you have any questions when you get the parts just let us know though! Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-08-24 by user80672
Hello,
I would like to make a robot with a Espruino board and control it with a bluetooth gamepad (e.g. PS4 dualshock controller or practically any HID device).
What would be the easiest way to make controlling work?
I have read that a USB host shield and a Bluetooth dongle can be used to achieve this goal, but is there any cleaner solution, e.g. some Bluetooth module that can work as a HID host?
Best regards
Kari Surakka
Beta Was this translation helpful? Give feedback.
All reactions