chipKIT® Development Platform

Inspired by Arduino™

Network Shield USB Mouse & USB Keyboard Examples?

Created Tue, 11 Oct 2011 15:11:08 +0000 by TECH GEEK


Tue, 11 Oct 2011 15:11:08 +0000

Does anyone has example code for the network shield that allows the chipKIT to act as a USB Mouse and USB Keyboard?


Tue, 11 Oct 2011 21:34:13 +0000

I just need something basic like the max sending same signal as if i typed "abc ABC 123 !@#" & if i moved my mouse for 500 milliseconds for a total of 1 inch at a constant rate of speed


Tue, 11 Oct 2011 21:41:00 +0000

You probably need to download Microchip USB libraries that have HID Device sample code for Mouse and Keyboard This will give you HID descriptor examples

Combine them with Generic HID code available and you can have mouse and keyboard


Tue, 11 Oct 2011 21:44:25 +0000

Here is some more info I typed up earlier...

Dear Digilent Inc, I've been working with the chipKIT Max32 & Uno32 as well as the two shields, the Basic I/O Shield & the Network Shield, for some time now. I am currently working on a project that uses both the Network shield, & the Basic I/O shield, which will be stacked on top of the Max32 & Uno32 respectively. I plan on writing up some code for the Uno32 & Max32 which will allow the Uno32 to simply read the buttons, switches and potentiometer. Then the Uno32 will send the data it read as two bytes over serial on pins 0 & 1 to pins 18 & 19 on the Max32. Based on what data is sent, the Max32 will act as a USB Keyboard and type in the MPIDE random portions of code, like the ones listed here: (>[ur=]LINK[/url]<) The code typed will be random, however how random it will be is limited to what can be used where the Max32 is currently typing. When the Max32 is finished typing the code, it will switch from acting as a USB Keyboard, to acting as a USB Mouse. The Max32 will then move the pointer to the upper left corner and past that location, without going right/down. This will ensure the courser is at a known location. Finally the Max32, while setup to upload a sketch, will move the courser over the MPIDE's "Upload" button, and send the left mouse click signal. Basically I'm making a Microcontroller reprogram itself... There are only two things preventing me from finishing my project. First is that I need an example that first acts as a USB Keyboard and types, "Hello World!" In this same example should then switch to acting as a USB Mouse, & move up at a given speed for 500ms, then move right, then down, then left. The example would then right click, then left click, it would then loop forever without preforming any actions. My second issue is that I need the values for the keys listed below & what value corresponds to which key. These values would be the ones which would be sent to the PC while the Max32 is acting as a USB Keyboard.. abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 ~!@#$%^&*()_+{}|:"<>?`-=[];',./ KEYS WITHOUT A CHARACTER BELOW [Up Arrow][Down Arrow][Left Arrow][Right Arrow] [Backspace][Caps Lock][Enter][Tab] Thanks in advance...


Wed, 12 Oct 2011 12:14:47 +0000

Also could the intro screen @ startup be removed?

Jacob Christ

Fri, 19 Sep 2014 00:05:46 +0000

I know this is an old post but we at PONTECH got some quick and dirty USB mouse code working here:

Its tested on a Quick240, but should work without a hitch on a Max32 with a network shield. I suspect it will also work on a Fubarino SD and maybe even a Fubarino Mini.