Real-Life Mario Kart Software
Back to Video
For this project we had to create a program that could not only control the kart's mechatronic components, but also communicate with a base station to establish the game framework. We created two separate sets of code one that ran on the base station PC and another set that ran on each of the four go-karts. NI CompactRIO is a multi-layered platform with a Real-Time computer and an FPGA target. The Real-Time computer allowed us to connect over WiFi and process tag information, while the FPGA allowed us to connect everything to the inputs and outputs of our system. All of our code for this project is written in LabVIEW.
Each go-kart has identical code running on a CompactRIO controller. Most of the time the code just sits and waits while the user operates the car, but when it receives a signal it can actuate one of many functions. Then the CompactRIO device would receive a signal from an RFID tag directly through the reader, or get a signal via WiFi from the central command center.
Central Command Center
Our system used a central PC connected to a WiFi router to keep track of all of the items. When one of the karts detects an item, the CompactRIO device on that kart will send a signal to the command center PC. When an item is picked up it is added to an array of items with properties like a timestamp when it was picked up, who picked it up, and if it has been deployed. Items like mushrooms activate right away for the player who first picked it up, but players must hold bananas in their kart for at least two seconds to activate them. The second player to detect the banana RFID tag will get "hit".
The Base Station Front Panel
The Base Station Block Diagram Code