This will make the netduino a USB HID, so the netduino will simulate a keyboard in this case.
To get your netduino ready for this:
1 Install firmware 4.1.1 http://forums.netdui...re-v411-beta-1/
2. Transfer to Serial deployment http://forums.netdui...b-and-com1com2/
3. Create a project and put the class in it, add the test code to your program's main method
4. Hook up a usb to serial like this: http://www.sparkfun.com/products/9873 to your netduino's com1 or 2, which ever you chose while setting serial deployment
5. Change deployment in VS to Serial, select your com port
6. Power your netduino with a 9V battery or whatever, except usb. Deploy.
7. You need the code to run and set up the usb stream first, then connect your usb cable.
Class: Keyboard.cs 16.63KB 241 downloads
Add a reference to:
Microsoft.SPOT.Hardware.Usb
Sample use. As in the video.
string setupResult = Keyboard.SetUp(); Debug.Print(setupResult); if (setupResult != "Success") return; while (true) { led.Write(true); if (button.Read()) Keyboard.SendString("/*\n" + "* Supported Characters (with this method):\n" + "* abcdefghijklmnopqrstuvwxyz\n" + "* ABCDEFGHIJKLMNOPQRSTUVWXYZ\n" + "* 0123456789\n" + "* enter escape backspace deletethis\b\b\b\b\b\b\b\b\b\b \ttab space\n" + "* - = [ { ] } \\ | , > . < / ? ! @ # $ % ^ & * ( )\n" + "*/"); led.Write(false); Thread.Sleep(2000); }
Projects using the netduino as a keyboard coming sometime soon. I want to make a mouse class next.
I found this:
/* Custom USB HID Communication Device
* Copyright © Secret Labs LLC. All Rights Reserved.
*
*
* Licensed under the Apache 2.0 open source license
*/
in the original code from the USB HID example. I added that I expanded it. I am not big on licenses, but I think I must add it to my code as well. License info here: http://www.apache.or...ICENSE-2.0.html