diff --git a/Readme.md b/Readme.md index 9a62833..24a870f 100644 --- a/Readme.md +++ b/Readme.md @@ -36,24 +36,27 @@ The idea is to enable enhanced USB functions to almost all 'standard' Arduino bo Installation ============ +##### 1. Grab the newest Arduino release HID-Project only works with the new Arduino IDE 1.5.8 or newer. I recommend you to use the new [IDE 1.6 rc1](https://groups.google.com/a/arduino.cc/d/msg/developers/2_GD40Sl6FA/OLWZMwaLJ3IJ). +##### 2. Install HoodLoader2 (Arduino Uno/Mega only) For Arduino Uno/Mega first install [HoodLoader2 dev](https://github.com/NicoHood/HoodLoader2/tree/dev) on your 16u2 + the needed software files. Make sure your HoodLoader2 software is up to date when you also update the HID-Project files. [HoodLoader1](https://github.com/NicoHood/HoodLoader) is only supported for legacy but will get a new use soon! For Arduino Micro/Leonardo ignore this step. +##### 3. Install the HID core files Installation has changed over the time. You don't have to modify the original core any more. Put all files into *sketchbook/hardware/HID/*. **You have to rename the folder HID-master to HID.** +Ensure that under 'File->Preferences' the correct sketchbook folder is selected. **Restart the IDE.** + **Your sketchbook folder should look like this:** ![Installation Picture](pictures/installation.png) -Ensure that under File->Preferences the correct sketchbook folder is selected. **Restart the IDE.** - - +##### 4. Add the keyword.txt for highlights (optional) If you like to, you can add the keywords.txt to your Arduino IDE so that words like 'Gamepad' are highlighted. Replace the file in *arduino-1.6.0/lib/keywords.txt* with the *keywords.txt* provided in this project. @@ -62,15 +65,15 @@ How to use ### Micro/Leonardo & HoodLoader2 -**1. Select the new board via *Tools->Board->Arduino Leonardo HID-Project* for example.** -For HoodLoader2 select the 16u2 MCU. Ensure HoodLoader2 board definition files are up to date. +##### 1. Select the new board via *Tools->Board->Arduino Leonardo HID-Project* for example. +For HoodLoader2 select the 16u2 MCU, for Leonardo/Micro the specific entry. +Ensure HoodLoader2 board definition files are up to date and installed. The Uno and Mega entry is just for advanced users who want to use the HID-APIs but normally you'd need the new HoodLoader2 (16u2) board definition files. ![Board Selection Picture](pictures/board.png) -**2. Select the USB-Core you want to use. You have 5 options here:** - +##### 2. Select the USB-Core you want to use. You have 5 options here: * Extended (Keyboard+Leds, Mouse+Absolute, Consumer, System) * Gamepad (Keyboard+Leds, Mouse, Gamepad) * Custom (Your custom configuration, see below) @@ -83,15 +86,17 @@ To create a **custom HID report descriptor** you can edit the file in *avr/varia Same for Micro and HoodLoader2. Not all HID reports are playing well together on all OS so I made these pre selections. With the custom report you can try it out yourself. Everything you need should be in the pins_arduino.h file. -**3. Try the Basic HID examples for each HID device. They are pretty much self explaining.** +##### 3. Try the Basic HID examples for each HID device. +They are pretty much self explaining. You can also see the *Projects/HID_Test* for an all in one example. See *Project/USB-Serial* for a fully usable USB-Serial bridge and how to use the new Serial functions. In the CDC.h you can also see the new Control Line functions for advanced users. Keep in mind that the USB_ENDPOINTs for the u2 Series are set to 16 bytes, so the Serial buffer is also smaller (normally 64b). -**If you don't want to use the USB-Core** you can also choose under *Tools/USB Core* "No USB functions" to get rid of the USB stuff -and save the ram for other stuff if you don't need it. You also don't need the HID Project essentially if you don't want to use the USB functions. +##### 4. Deactivate USB-Core to save flash and ram (optional) +If you don't want to use the USB-Core you can also choose under *Tools/USB Core* "No USB functions" to get rid of the USB stuff and save the ram for other stuff if you don't need it. You also don't need the HID Project essentially if you don't want to use the USB functions. + Due to a bad Leonardo/Micro bootloader you need to add an add an ISR into every sketch as workaround. **This is not needed for HoodLoader2 devices**, since the bootloader does a true watchdog reset on reprogramming and not a simple application jump (the usb clock is then still on and breaks any delay functions). @@ -453,4 +458,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` \ No newline at end of file +```