Mentally note if there are any ports present, then close out of the menu. While you’re there, look at the list of serial ports ( Tools > Ports). Back up in the menu, we need to set the board to the Leonardo: Tools > Boards > Arduino Leonardo In the menu, go to: File > Examples > Sim Racing Library > Shifter > ShiftJoystickĪ new window should open with the example program. Once the libraries are installed, we’re going to load the Sim Racing Library example called ShifterJoystick. If you get stuck, take a look at the official libraries installation tutorial. ZIP LibraryĪdd both libraries to the IDE. In the IDE, we can install them by going to: Sketch > Include Library > Add. You’ll also need two libraries:ĭownload both of these by clicking on the “Source Code. Step #3: Programmingĭownload and install the latest version of the Arduino IDE. Once you have the adapter fully wired, double-check your connections before proceeding to the next step. Unlike with the DB9 connector, the order in which you add the wires does not matter. One at a time, insert the wires into Arduino following the table above. Strip the other ends of the wires, again about a 1/4″. These will hold the wires securely so there will be less risk of the screw terminal connections coming loose. Insert the connector back into its case, and then install the included screws and strain relief bracket. DB9 Pinĭouble-check your connections, then slide the case’s rubber grommet onto the connected wires (with the flange facing towards the connector). Wire this connection around the back of the connector. The sixth wire (the short one!) connects between two pins on the DB9 connector. This way, no wires will overlap the pins you’re trying to connect to.įive of the wires connect to a single pin and go towards the Arduino. Be sure to connect the wires one at a time in the same order as the table (top to bottom). The wires should be oriented away from the DB9 connector. Using the included screwdriver, you’re going to loosen each terminal by turning counter-clockwise, insert a wire, then tighten the terminal by turning clockwise. Remove the connector from its plastic casing. If you’re following my color scheme, it should be red. You’ll also need 1 short wire, about 2.5″ long. Do not strip the other end of the wires just yet. Then grasp and bend the stripped portion until it’s at a right angle to the rest of the wire. Using your pliers, strip off about 1/4″ from one end of each of the wires. Your wires don’t have to be color-coded, but it does make it much easier to assemble. The colors I’m using are yellow, green, black, red, and white. If you can, make each of these wires a different color. We’re going to need 5 wires, each cut to about 7″ long. The first thing you’re going to do is cut the wires to length. If you have access to a wire stripper and/or a pair of flush cut pliers I would recommend using those in place of the needle-nose pliers, although they’re not necessary. This will ensure that you can get a good connection between the wire and the terminals on both the connector and the Arduino. It is important that you use solid-core wire and not stranded wire. You can use an Arduino Micro or SparkFun Pro Micro, although those will require you to solder to the headers. They are not capable of running the included USB joystick firmware. Please note that you cannot use an Arduino Uno, Nano, or Mega. As an Amazon Affiliate I earn from qualifying purchases.)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |