Skip to content

Commit

Permalink
Merge pull request #2 from dmadison/xinput
Browse files Browse the repository at this point in the history
XInput
  • Loading branch information
dmadison authored Mar 11, 2019
2 parents 6978ae2 + 9fbf4a7 commit 3c89abe
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 29 deletions.
50 changes: 44 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# SparkFun Arduino Boards
# SparkFun Arduino Boards w/ XInput

This repository contains support for the following SparkFun Arduino-compatible development boards.
This repository contains support for the following SparkFun Arduino-compatible development boards, modified to work as XInput devices. Originally forked from [the SparkFun repo](https://github.com/sparkfun/Arduino_Boards).

#### AVR Boards
These boards are meant to be used in conjunction with the [ArduinoXInput library](https://github.com/dmadison/ArduinoXInput).

## Included Boards

* [MaKey MaKey](https://www.sparkfun.com/products/11511)
* [Pro Micro 3.3V](https://www.sparkfun.com/products/10999)
Expand All @@ -11,7 +13,43 @@ This repository contains support for the following SparkFun Arduino-compatible d
* [Qduino Mini](https://www.sparkfun.com/products/13614)
* [LilyPad USB Plus](https://www.sparkfun.com/products/14346)

### Notes
## Installation
<pre>
└───Arduino Installation
├───drivers
├───examples
├───hardware
│ ├───arduino
│ ├───tools
│ ├───<b>xinput</b>
│ └───<b>xinput_sparkfun
│ └───avr
│ ├───bootloaders
│ ├───cores
│ ├───libraries
│ └───variants</b>
├───java
├───lib
├───libraries
├───reference
├───tools
└───tools-builder
</pre>

To install, you first need to install the latest version of the Arduino XInput AVR Core, [which can be found here](https://github.com/dmadison/ArduinoXInput_AVR). Follow [the installation instructions](https://github.com/dmadison/ArduinoXInput_AVR/#installation) provided in that repository and verify that those boards are installed correctly before proceeding.

This boards package uses the same process for installation. Download [the latest version](../../releases/latest) of this repository to your PC. Navigate to the directory containing your Arduino installation, and then open up the 'hardware' folder. Extract the contents of the .zip file into this directory. You should have a new 'xinput_sparkfun' folder with an 'avr' folder inside of it, containing the files from this repository (see the tree view above).

Restart the Arduino IDE. If the SparkFun boards are installed correctly, you should see a new collection of "SparkFun AVR Boards w/ XInput" in the `Tools -> Boards` menu.

To uninstall, delete the 'xinput_sparkfun' folder in the 'hardware' directory, and then restart the Arduino IDE.

## Upload Warning and Instructions

**!!!!!!! IMPORTANT !!!!!!!**

Due to the nature of how the XInput USB mode works, Arduinos that have XInput sketches on them will ***not*** automatically reset when programmed by the IDE! You will need to reset the board by hand every time you upload new code.

[Full instructions for uploading are provided in the AVR Core repository](https://github.com/dmadison/ArduinoXInput_AVR/#upload-warning-and-instructions).

* Some boards such as the Arduino Pro and Pro Mini come in more than one flavor. For these **you must select the correct processor** in the 'Tools' menu.
* Information on compiling and programming the bootloaders can be found in the bootloaders directory.
**Do *not* upload XInput sketches to your Arduino unless you know how to reset it!** Otherwise you will not be able to program it anymore and you'll have to [reflash the bootloader](https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/all) with an external programmer.
42 changes: 21 additions & 21 deletions xinput_sparkfun/avr/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ menu.cpu=Processor
################################################################################
#################################### MaKey MaKey ###############################
################################################################################
makeymakey.name=SparkFun MaKey MaKey
makeymakey.name=SparkFun MaKey MaKey w/ XInput
makeymakey.build.board=AVR_MAKEYMAKEY
makeymakey.build.vid.0=0x1B4F
makeymakey.build.pid.0=0x2B74
Expand All @@ -35,10 +35,10 @@ makeymakey.bootloader.tool=arduino:avrdude

makeymakey.build.mcu=atmega32u4
makeymakey.build.f_cpu=16000000L
makeymakey.build.vid=0x1B4F
makeymakey.build.pid=0x2B75
makeymakey.build.vid=0x045E
makeymakey.build.pid=0x028E
makeymakey.build.usb_product="SparkFun MaKey MaKey"
makeymakey.build.core=arduino:arduino
makeymakey.build.core=xinput:arduino
makeymakey.build.variant=promicro
makeymakey.build.extra_flags={build.usb_flags}
makeymakey.build.usb_manufacturer="SparkFun Electronics"
Expand All @@ -47,7 +47,7 @@ makeymakey.build.usb_manufacturer="SparkFun Electronics"
################################################################################
################################## Pro Micro ###################################
################################################################################
promicro.name=SparkFun Pro Micro
promicro.name=SparkFun Pro Micro w/ XInput

promicro.upload.tool=avrdude
promicro.upload.protocol=avr109
Expand All @@ -65,19 +65,19 @@ promicro.bootloader.low_fuses=0xFF
promicro.bootloader.high_fuses=0xD8

promicro.build.board=AVR_PROMICRO
promicro.build.core=arduino:arduino
promicro.build.core=xinput:arduino
promicro.build.variant=promicro
promicro.build.mcu=atmega32u4
promicro.build.usb_product="SparkFun Pro Micro"
promicro.build.vid=0x1b4f
promicro.build.vid=0x045E
promicro.build.extra_flags={build.usb_flags}

######################### Pro Micro 3.3V / 8MHz ################################
promicro.menu.cpu.8MHzatmega32U4=ATmega32U4 (3.3V, 8 MHz)

promicro.menu.cpu.8MHzatmega32U4.build.pid.0=0x9203
promicro.menu.cpu.8MHzatmega32U4.build.pid.1=0x9204
promicro.menu.cpu.8MHzatmega32U4.build.pid=0x9204
promicro.menu.cpu.8MHzatmega32U4.build.pid=0x028E
promicro.menu.cpu.8MHzatmega32U4.build.f_cpu=8000000L

promicro.menu.cpu.8MHzatmega32U4.bootloader.extended_fuses=0xFE
Expand All @@ -89,7 +89,7 @@ promicro.menu.cpu.16MHzatmega32U4=ATmega32U4 (5V, 16 MHz)

promicro.menu.cpu.16MHzatmega32U4.build.pid.0=0x9205
promicro.menu.cpu.16MHzatmega32U4.build.pid.1=0x9206
promicro.menu.cpu.16MHzatmega32U4.build.pid=0x9206
promicro.menu.cpu.16MHzatmega32U4.build.pid=0x028E
promicro.menu.cpu.16MHzatmega32U4.build.f_cpu=16000000L

promicro.menu.cpu.16MHzatmega32U4.bootloader.extended_fuses=0xCB
Expand All @@ -99,7 +99,7 @@ promicro.menu.cpu.16MHzatmega32U4.bootloader.file=caterina/Caterina-promicro16.h
################################################################################
############################## Fio v3 3.3V / 8MHz ##############################
################################################################################
fiov3.name=SparkFun Fio v3
fiov3.name=SparkFun Fio v3 w/ XInput
fiov3.build.board=AVR_FIOV3
fiov3.build.vid.0=0x1B4F
fiov3.build.pid.0=0xF100
Expand All @@ -124,10 +124,10 @@ fiov3.bootloader.tool=arduino:avrdude

fiov3.build.mcu=atmega32u4
fiov3.build.f_cpu=8000000L
fiov3.build.vid=0x1B4F
fiov3.build.pid=0xF101
fiov3.build.vid=0x045E
fiov3.build.pid=0x028E
fiov3.build.usb_product="SparkFun Fio v3"
fiov3.build.core=arduino:arduino
fiov3.build.core=xinput:arduino
fiov3.build.variant=promicro
fiov3.build.extra_flags={build.usb_flags}
fiov3.build.usb_manufacturer="SparkFun Electronics"
Expand All @@ -136,7 +136,7 @@ fiov3.build.usb_manufacturer="SparkFun Electronics"
################################################################################
################################ Qduino Mini ###################################
################################################################################
qduinomini.name=Qduino Mini
qduinomini.name=Qduino Mini w/ XInput
qduinomini.build.vid.0=0x1B4F
qduinomini.build.pid.0=0x514D
qduinomini.build.vid.1=0x1B4F
Expand All @@ -161,11 +161,11 @@ qduinomini.bootloader.lock_bits=0x2F

qduinomini.build.mcu=atmega32u4
qduinomini.build.f_cpu=8000000L
qduinomini.build.vid=0x1B4F
qduinomini.build.pid=0x516D
qduinomini.build.vid=0x045E
qduinomini.build.pid=0x028E
qduinomini.build.usb_product="Qtechknow Qduino Mini"
qduinomini.build.board=AVR_QDUINOMINI
qduinomini.build.core=arduino:arduino
qduinomini.build.core=xinput:arduino
qduinomini.build.variant=promicro
qduinomini.build.extra_flags={build.usb_flags}
qduinomini.build.usb_manufacturer="SparkFun Electronics"
Expand All @@ -174,7 +174,7 @@ qduinomini.build.usb_manufacturer="SparkFun Electronics"
############################# LilyPad USB Plus #################################
################################################################################

LilyPadProtoUSB.name=LilyPad USB Plus
LilyPadProtoUSB.name=LilyPad USB Plus w/ XInput
LilyPadProtoUSB.vid.0=0x1B4F
LilyPadProtoUSB.pid.0=0x0110

Expand All @@ -197,10 +197,10 @@ LilyPadProtoUSB.bootloader.lock_bits=0x2F

LilyPadProtoUSB.build.mcu=atmega32u4
LilyPadProtoUSB.build.f_cpu=8000000L
LilyPadProtoUSB.build.vid=0x1B4F
LilyPadProtoUSB.build.pid=0x0110
LilyPadProtoUSB.build.vid=0x045E
LilyPadProtoUSB.build.pid=0x028E
LilyPadProtoUSB.build.usb_product="LilyPad USB Plus"
LilyPadProtoUSB.build.board=AVR_LILYPAD_ARDUINO_USB_PLUS_BOARD
LilyPadProtoUSB.build.core=arduino:arduino
LilyPadProtoUSB.build.core=xinput:arduino
LilyPadProtoUSB.build.variant=lilypadusbplus
LilyPadProtoUSB.build.extra_flags={build.usb_flags}
4 changes: 2 additions & 2 deletions xinput_sparkfun/avr/platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification

name=SparkFun AVR Boards
version=1.6.19
name=SparkFun AVR Boards w/ XInput
version=1.0.0

# AVR compile variables
# ---------------------
Expand Down

0 comments on commit 3c89abe

Please sign in to comment.