Instructables

Arduino leonardo usb steering wheel

I had an old usb steering wheel laying around that died, i had a freetronics leostick laying around so i made this.
i updated the bootloader to the official leonardo one.
 
Remove these adsRemove these ads by Signing Up

Step 1: Bootloader mods

updated the bootloader to the official leonardo one.
for the steering wheel you will need an arduino leonardo compatible board with the leonardo bootloader.
update these files in root folder >hardware > arduino > cores > arduino
i used i.0.5 of the ide

files to download : HID

Step 2: Code and wiring

Picture of Code and wiring
here is the code i used, edit it to suit your needs :)
void setup()
{
  Serial.begin(57600);
  pinMode(13, OUTPUT);
  joySt.xAxis = 0;
  joySt.yAxis = 0;
  joySt.zAxis = 0;
  joySt.xRotAxis = 0;
  joySt.yRotAxis = 0;
  joySt.zRotAxis = 0;
  joySt.throttle = 0;
  joySt.rudder = 0;
  joySt.hatSw1 = 0;
  joySt.hatSw2 = 0;
  joySt.buttons = 0;
}
void loop()
{
  Serial.write("DIY USB joystick V1 by the nerdling");
  joySt.xAxis = analogRead(A4)/4;
  joySt.yAxis = analogRead(A5)/4;
  joySt.rudder = analogRead(A3)/4;
  Joystick.setState(&joySt);

}


the wiring is what i used on my wheel, the throttle and brake wiring is what i used because i needed 2 pedals for 1 channel, try it out and see what you need to do to make it suit you

that's all i will tell you because that's all you need figure the rest out e.g to put it all in your wheel each one is your different
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!