USBMouse and USBKeyboard with the new Cortex-M0 mbed!
You've probably seen we've got a new mbed Microcontroller on its way, based on the upcoming Cortex-M0 LPC11U24 from NXP.
What you perhaps didn't realise is quite how great this is going to be for building USB devices!
This video shows how to emulate a USB mouse using the new libraries we're creating for it. You can programatically send movement, button clicks and states, and even scroll the scroll wheel, and of course do this dependant on any sensors or logic you like. A really neat feature is the absolute version of the mouse, meaning you can move to a location on the screen; great for direct interaction with program interfaces.
Another example is emulating a keyboard:
In this example, we're sending media keys to control the PC media player, but you could of course type strings or send interesting keycode combinations and sequences. For example, in our "robot racing" setup, we had a laser beam breaker sending a keypress that was picked up by Javascript to start the timer and trigger other behaviour in a standard webpage.
A raw USBHID interface is also available to allow driverless custom interfaces to your favourite USB-capable programming language on the PC. We also have some other interfaces on the way, including USB MIDI (Musical Instrument Digital Interface) and USB Virtual Serial.
The examples are demonstrated on the upcoming LPC11U24 mbed, which is going to be a great platform for prototyping USB devices; the chip it uses is going to be cheaper than a dedicated USB to Serial bridge, and you get a microcontroller included!
To see more about the upcoming mbed NXP LPC11U24, and to get on the mailing list to know when they hit the shops, see:
7 comments on USBMouse and USBKeyboard with the new Cortex-M0 mbed!:
You need to log in to post a discussion
I am experimenting with the mbed NXP LPC1768.
I want to use an optical mouse (no moving parts!) as a shaft encoder to measure displacement as I operate a 12 or 16 dot dotmatrix/inkjet printhead. It prints as the printhead is moved over a surface.
I currently use a digital pot. ( Hewlett Packard part HEDS-5700 F01 ) with direct interrupt/pulses counted for displacement and an 8031 circuit.
Is this possible with the mbed or your new setup ?