After seeing the interest people put into the GT5 A-Spec grinding with the Teensey boards, I thought I'd share my B-Spec grinding method done with the Arduino Uno (as a matter of fact, this works for A-Spec as well).
NOTE: This will only work for the Arduino Uno (tested) and possibly the Arduino Mega 2560. The Uno and (if I recall correctly, the Mega 2560) differ(s) from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega8U2 programmed as a USB-to-serial converter. This allows the board to be seen as a HID by flashing the Atmega8U2 with a custom hex file.
What you'll need:
Arduino Uno (or Mega 2560) x1
Usb cable x1
Wire about an inch long and stripped on both ends x2
http://www.atmel.com/dyn/resources/prod_documents/JRE_Flip_Installer_3.4.2.exe (windows only)
http://www.macports.org/install.php#pkg & dfu-programmer ("sudo port install dfu-programmer") (mac only)
dfu-programmer (grab it from your distro's repos) (linux only)
Copy of GT5
Red Bull x2010 (any version)
Start off by uploading this sketch to your Arduino:
Now, you'll need to throw your UNO into DFU mode. To do this, (while your Arduino is plugged into USB) use one of the short wires to bridge two points on the back of the board near the map of Italy (just below). With that in place (hold it down with tape if you'd like) use the other wire to bridge the the two points seen here:
by Andrew McDaniel
Tweaked by deba94
Copyright (c) 2010 Andrew McDaniel
Copyright (c) 2011 deba94
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
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
When we send data to the keyboard driver, it has to be
scancodes, not ascii characters. Refer to the AVR keyboard
source code to obtain the scancodes.
// meaningful constants for GT5
byte SC_SPACE = 0x2c;
byte SC_ENTER = 0x28;
byte SC_ESCAPE = 0x29;
byte SC_ESC = 0x29;
byte SC_RIGHT_ARROW = 0xef;
byte SC_LEFT_ARROW = 0x50;
byte SC_DOWN_ARROW = 0x51;
byte SC_UP_ARROW = 0x52;
delay(6000); // Give the keyboard driver time to boot
sendSCByte(SC_ENTER); //accepts on screens that need accepting
sendSCByte(SC_DOWN_ARROW); //moves down once to get past the driver progression screen
void sendSCByte(byte byteToSend)
// This function sends single scancode bytes.
If done correctly, your UNO should now be in DFU mode. (Confirm this by checking the list of serial ports. The serial port for your board should no longer show up.)
Now, flash the 8u2!
Windows: Open flip, load the hex, select at90usb82 and flash away.
Now unplug the board and plug it back in. Careful though! It'll start typing exactly 6 seconds after the board receives power. Open notepad/gedit/emacs or something.
sudo dfu-programmer at90usb82 erase
sudo dfu-programmer at90usb82 flash keyboard.hex
sudo dfu-programmer at90usb82 reset
Go hook it up to the ps3! Fire up B-Spec and go to either Extreme Series > Dream car championship > second from the left (indy) (best for farming XP) or Extreme Series > Like the Wind (indy) (best for farming monies).
The UNO will alternate between sending the "return" key and the "down" key, so you can simply walk away and come back whenever you want to collect your winnings.
to A.McD and ant.b from the arduino forums for the base code.
to Dean Camera for LUFA-lib.