Control Mario Kart 64 with your car over CAN bus (2016)

Catch Me If You CAN

The most realistic Mario Kart 64 simulator ever

Requirements

  • Python 2.7+
  • PyKeyboard
  • m64py – A frontend for Mupen64Plus
  • A copy of Mario Kart 64 as a ROM image
  • Raspberry Pi + PiCAN
  • ODB-II to DB9 cable (you can also wire this yourself)
  • A car (currently only tested on a 2012 Honda CR-V)
  • A low-latency network connection between your Pi and the laptop running m64py

Setup

Install SocketCAN on the Pi according to this guide. Connect
the Pi to your car and verify that ./candump can0 prints a stream of data to your screen. If you’re
using the ODB-II cable, keep in mind there are 3 jumpers — SJ1, SJ2, and SJ3 — that need to be
soldered on the board (this PDF
provides details).

Connect the Pi to your laptop. Your network configuration is up to you, but a hard-wired connection is
highly recommended due to latency concerns. We found that an Ethernet cable running directly from the
Pi to the laptop worked best, configured as such:

  • On the Pi: sudo ip ad add 10.0.0.10/24 dev eth0
  • On the laptop: sudo ip ad add 10.0.0.20/24 dev eth0

Assuming this setup, verify that the Pi can ping 10.0.0.20.

Launch m64py and load a Mario Kart 64 ROM. Using the default controls, try playing a game to make sure
everything works. Shift/Ctrl are gas/brakes respectively, and arrow keys steer.

Usage

Level out your steering wheel as best as you can. Put the car in park/neutral and make sure your
parking brake is on.
Take your feet off the pedals.

On the laptop, start the Python script as a normal user:

Start m64py and launch Mario Kart.

On the Pi, start candump and have it send relevant data to the laptop:

./candump can0,17c:7FF,1a6:7FF,156:7FF,294:7FF | nc -u 10.0.0.20 1738

By default, port 1738 is used. You can change this in the script if you experience a conflict.

Give focus to the m64py window.

NOTE: Once you start the script on the Pi, the Python script will begin emulating a keyboard. If
your steering wheel was not level or you had any pedals held down, this will cause key presses to be
passed to the active window. Move your focus to m64py as quickly as possible to avoid confusion.

You should be able to navigate the menu using the car. The steering wheel will move you left/right, and
gas/brakes will move you up/down menu trees.

Start racing!

Controls

  • Steering: Turn the steering wheel left/right.
  • Acceleration: Hit the gas pedal. Gas is binary in Mario Kart, so more pressure will not increase speed.
  • Brakes: Hit your brakes. Again, this is a binary input.
  • Use item: Activate your winshield wipers.
  • Jump: Toggle your high beams.

Read More
Zonia Buresh

Latest

8 UNESCO-listed rock-cut religious sites you should visit at least once

8 UNESCO-listed rock-cut religious sites you should visit at least once For centuries, communities have carved places of worship, monasteries, shrines and monumental sculptures into cliffs and hillsides. Today, these rock-... 1/8 Ajanta Caves, Maharashtra, India | A UNESCO World Heritage Site since 1983, the Ajanta Caves comprise 30 rock-cut Buddhist monuments dating from the

Top Cryptos Other Than Bitcoin and Ethereum Poised to Benefit From the CLARITY Act

The upcoming CLARITY Act is widely expected to reshape the U.S. crypto market by providing regulatory clarity for digital assets. While Bitcoin (BTC) and Ethereum (ETH) are likely to remain the primary institutional beneficiaries, several altcoins could also gain from increased institutional participation. From cryptos with active ETF ambitions to blockchain ecosystems powering tokenization and

ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal

You are here: Home / Cryptocurrency News / ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal Ondo Finance (ONDO) is gaining bullish momentum after confirming a breakout from its downtrend, with analysts watching for continued strength for the ONDO price. Meanwhile, its partnership with Japan’s SBI Group advances real-world asset tokenization and

Payroll Tax Obligations for Small Businesses

As a small business owner, you face various payroll tax obligations that can impact your bottom line. Comprehending what constitutes payroll taxes, the responsibilities you have as an employer, and the deadlines for payments is fundamental. From FICA contributions to unemployment taxes, managing these requirements accurately is vital. Failure to comply could lead to penalties

Newsletter

Don't miss

8 UNESCO-listed rock-cut religious sites you should visit at least once

8 UNESCO-listed rock-cut religious sites you should visit at least once For centuries, communities have carved places of worship, monasteries, shrines and monumental sculptures into cliffs and hillsides. Today, these rock-... 1/8 Ajanta Caves, Maharashtra, India | A UNESCO World Heritage Site since 1983, the Ajanta Caves comprise 30 rock-cut Buddhist monuments dating from the

Top Cryptos Other Than Bitcoin and Ethereum Poised to Benefit From the CLARITY Act

The upcoming CLARITY Act is widely expected to reshape the U.S. crypto market by providing regulatory clarity for digital assets. While Bitcoin (BTC) and Ethereum (ETH) are likely to remain the primary institutional beneficiaries, several altcoins could also gain from increased institutional participation. From cryptos with active ETF ambitions to blockchain ecosystems powering tokenization and

ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal

You are here: Home / Cryptocurrency News / ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal Ondo Finance (ONDO) is gaining bullish momentum after confirming a breakout from its downtrend, with analysts watching for continued strength for the ONDO price. Meanwhile, its partnership with Japan’s SBI Group advances real-world asset tokenization and

Payroll Tax Obligations for Small Businesses

As a small business owner, you face various payroll tax obligations that can impact your bottom line. Comprehending what constitutes payroll taxes, the responsibilities you have as an employer, and the deadlines for payments is fundamental. From FICA contributions to unemployment taxes, managing these requirements accurately is vital. Failure to comply could lead to penalties

5 Proven Strategies for Ecommerce Customer Acquisition

If you’re looking to boost customer acquisition for your eCommerce business, you need a clear plan. Start by leveraging targeted paid ads to connect with users ready to buy. Don’t overlook SEO, as it enhances your organic visibility. Consider email marketing with segmented lists for more personalized outreach. Collaborate with influencers to reach niche audiences

Want Your Business to Be Seen Everywhere? Meet Tonia Ryan, Creator of Fix Your Search

Some people are good at their jobs. Then there is Tonia Ryan, who has turned “getting found online” into something close to magic. She is the creator of Fix Your Search, and if you have ever wondered why some businesses pop up everywhere while others seem invisible...

Grey Business processes $61 million as stablecoins dominate payments

Grey Business enables startups and SMEs to open US Dollar (USD) corporate accounts, send and receive international payments, convert currencies, and transact using stablecoins such as USDC and USDT...

Utah Marketers to Host Free Business Networking Event in Layton on June 24

The custom web design company is hosting free monthly networking events for Northern Utah business leaders, with the next event scheduled for June 24 from 4 to 6 p.m. Utah Marketers is hosting a free local business networking event on June 24 from 4 to 6 p.m. at the company’s Layton office. The event is