Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 7 months ago.
Getting started with USBDevice
I'm trying to write an mbed program to control a USB nerf missile launcher (http://www.dreamcheeky.com/thunder-missile-launcher). I'll eventually be polling an HTTP server to check for commands to pass to the missile launcher, but for now I just need to make sure I'm on the right track with regard to how to interface with a USB device. I've never done any USB programming before.
I'm assuming I just need to instantiate a USBDevice with the vendor & product IDs with and then call connect(), and eventually use the write methods to control the device. Does that sound correct?
This is the USBDevice header file that I'm planning to use: http://mbed.org/users/mbed_official/code/USBDevice/file/5b7d31d9d3f3/USBDevice/USBDevice.h
Thanks, Rob
1 Answer
10 years, 7 months ago.
I guess the quickest way would be to receive serial commands from a PC, and relate that to motor movement.
This way, you can use terminal like program.
Myself, I would use HID, mainly because I can use DELPHI to make a custom controller.
But, if you wanted to show off - set MBED up as HOST for mouse ..
then left/right/scroll moves motors, click fires !!!
Ceri