-2

I'm a very beginner of using STM32 and now I'm trying to move a robot by using STM32F4.

Now I can move a robot by controlling a device such as motor, encoder and other devices.

However, I don't have any idea about reading gamepad (HID device of USB).

I'm trying this because I want to control a robot by gamepad.

Is it possible to read gamepad which use USB by STM32F4?

If there are a page which write about this problem, I'm afraid you tell me the URL.

Thank you.

  • Welcome to Stack Overflow! Please [edit] your question to show [the code you have so far](http://whathaveyoutried.com). You should include at least an outline (but preferably a [mcve]) of the code that you are having problems with, then we can try to help with the specific problem. You should also read [ask]. – Toby Speight May 01 '17 at 12:49

1 Answers1

0

It is possible if your uC has the USB interface which can be configured as a host device. Check with your micro DS. but you have to remember - it is not an easy task, you will have to learn USB deeply, and implement the host stack.

0___________
  • 60,014
  • 4
  • 34
  • 74
  • Actually I do not understand your comment . To read a USB HID device it is necessary to implement USB host stack. Because @S.takeru did not clarify what F4 micro he has - he needs to check in the DS what the USB interface in simplemented in this micro ( Device or Host). – 0___________ May 01 '17 at 12:44
  • 1
    Yes, the question is poor - but in that case, you should try to improve the question to a point where it can be answered clearly and crisply. Providing general guidance as to how to go about finding the answer is a step removed from being an actual answer, even if that's really the fault of the question. – Toby Speight May 01 '17 at 12:48
  • Yes but even in this circumstances - my answer gives information about the first steps on the way to this implementation 1. Checking the micro interface, 2. implementation of the USB host stack (I have added one sentence now to make it more clear). Unfortunately it is quite complex issue and I do not think that it is possible to explain how to implement it in one simple forum answer. – 0___________ May 01 '17 at 13:15