System for using a bicycle as a controller in a game.
Any ideas for improving the documentation? Do not hesitate to open an issue!
The remote control is a controller for playing car games, especially Horizon Chase Turbo.
The mapping of the controls is done as follows:
On the bike | Player 1 | Player 2 | Effect |
---|---|---|---|
Pedal | W | Up arrow | Accelerate |
Left handlebar button | A | Left arrow | Turn left |
Right handlebar button | D | Right arrow | Turn right |
(soon) Brakes | S | Down arrow | Brake/Reverse |
(soon) Special button | Space | Right Ctrl | Use nitro |
⚠️ Warning! The mapping works for a QWERT* keyboard, so if you have issues, check that.
Skip to Usage if you want to know how to use.
⚠️ Warning! If you have already uploaded the code once/if the cyclocommandeur was provided to you by an operator, you do not need to perform the Code step!
- Unfold the bike stand, and insert the rear wheel of the bike into it.
- Use serflex to secure the front wheel to the bike frame.
ℹ️ Note! Feel free to take a couple more just in case someone is too happy with the handlebars!
- Test that everything is stable by getting on the bike and pedalling hard. Feel free to ajust the gears so that the bike is not to loose, but not too hard.
ℹ️ Note! Depending on the bike, you may want to use additional weights for the bike stand.
- If everything is stable, put the buttons on the handlebars, and run the wires to the bike stand following the brake cable. Use electrician's tape to stabilise the buttons and the wires.
ℹ️ Note! Make sure the wires will not get into the pedals when using the bike. Feel free to take extra tape if something goes wrong.
- Make the wire connections using the following table:
Wire | Goes on |
---|---|
VCC board | Create a VCC line |
GND board | Create a GND line |
Left button (one of the two wires) | GND line |
Left button (the other wire) | Digital 4 |
Right button (one of the two wires) | GND line |
Right button (the other wire) | Digital 5 |
Wheel sensor, red wire | VCC line |
Wheel sensor, black wire | GND line |
Wheel sensor, one of the two remaining wires | Digital 2 |
Wheel sensor, remaining wire | Digital 3 |
Beware, for Teensy boards, the pinout is quite different!
- Plug the board's USB cable into a computer, start the game, and test that everything works!
Please refer to the Cyclocommandeur main code README.
As stated, we are using Horizon Chase Turbo as our game for that project, but this should work with any other game.
ℹ️ Note! This setup requires an operator to handle the menu.
- Once the game is started, select "Multiplayers".
- Use each bike's right button to select a profile. If it worked, use the keyboard to confirm (Space and Enter), then use Enter to continue.
- Select "Campaigns".
- If you want to take it easy on your players, select "Rookie Series", else, select the traditionnal "World Tour" - or anything you want, really. From there, simply select the circuit you want to play.
- For car selection, this can be done by the bikes' buttons, but you still need to confirm on the keyboard.
- Finally, enjoy the game! The operator can restart the game at any point by pressing Escape then R.
⚠️ Warning! This controller is sportive. Please remind your players that they should take it easy - it's more of a marathon than a race, really, as the car does not go faster the harder you pedal.
Feel free to use the test code for hall sensor to check if you sensor is working correctly. Basically, if you have a 1 when no magnet, but a 0 when magnet, it's working!