If you like playing Grand Theft Auto, you’re pretty familiar with squeezing the triggers for accelerating and braking while driving around. [David Programa] decided this was too easy, and instead developed a system to allow him to pedal his way around the virtual world.
The device relies on a flywheel-based exercise bike, with six magnets placed on the flywheel that triggers a reed switch six times per rotation. The extra magnets give the system better resolution at slow speeds. A Hall Effect sensor would be a more reliable way to build this to survive in the long term, but the reed switch does work. It’s paired with a debounce circuit to keep the output clean. A Raspberry Pi is pressed into service, running a Python program to read a GPIO pin activated by the reed switch, counting pulses to determine the speed of pedalling.
The trigger control used in the Xbox 360 controller is a potentiometer that creates varying voltages depending on its position, allowing it to act as an analog accelerator input. 0 volts corresponds to no input, while the trigger reads 3.3 volts when fully depressed. The Raspberry Pi emulates this with its PWM output, paired with a low-pass filter to create the relevant voltage to inject into the trigger input on a generic Xbox 360 controller.
While it’s a lot less practical than simply using a regular controller, the pedal controls do allow you to get a great workout while playing Grand Theft Auto. Some of the more intense chase missions should be a great way to get your heart rate up, and that’s got to be a good thing.
Ironically, though, the system only works for cars and motorbikes in game. The bicycles in Grand Theft Auto are controlled by mashing the A button instead. Alternatively, you might consider a similar system for playing Mario Kart on the Nintendo Switch. Video after the break.
Continue reading “Exercise Bike Hacked As Input For Xbox 360”
While the recent announcement of Grand Theft Auto V for the upcoming next-generation game consoles was a disappointment for those fervently waiting for a successor in the infamous video game series, it shows that after almost seven years of its initial release, the epic title is still going strong — and rightfully so. But a game as varied and complex as GTA V isn’t without some quirks, especially if you’re going for 100% completeness.
The stunt jumps seem a particular pesky nut to crack here, so [Anthony Som] made it his mission to shed some light on what qualifies as a successful jump by reverse engineering the system and writing both a mod for displaying the landing zone and a cheat to instant success.
If you’re not familiar with the game, its vast open world map features a variety of side quests, one of them being stunt jumps, where certain locations allow you to launch the vehicle you’re driving into the air in hopes to land on an adjacent road or area — whether to evade the people chasing you, or just for fun. There’s no telling how to actually succeed though, the game just tells you if you did or not afterwards, causing some degree of frustration. As an avid speedrunner (as in finishing a game in the shortest possible time), [Anthony] was looking for a way to increase the success rate for those stunt jumps, and decided to dig into the code to find out how to get there. Of course, being a proprietary game, he had to resort to reverse engineering and utilizing GTA’s vivid modding scene to do so.
His initial outcome was a mod that displays the launch and landing area as rectangles inside the game itself, which was a great help. But well, after already getting that far, [Anthony] figured he might as well continue and add a cheat mode to teleport the car right inside that expected landing area and be done with second-guessing his attempts once and for all.
If you’re curious about modding GTA yourself, his write-up has a few good pointers for that, and of course features some real examples of it. Whether this is a good idea for the self-driving AI that uses GTA as learning environment is probably a different story though.
[Raphaël Yancey] wanted to be able to jam to Bounce FM and Radio:X all the time, without having to steal a car or a street sweeper in San Andreas. As people who like to put on the sad piano building music from The Sims and write Hackaday posts, we can totally relate.
But this isn’t just another one of those jam-a-Pi-into-a-vintage-radio-and-call-it-a-sandwich projects (not that there’s anything wrong with those). This thing acts like a real radio. All the stations play continuously whether you’re tuned in or not, and they bleed into each other as you go up and down the dial.
After much trial and error, [Raphaël] found a Python mixer that would work, but it was no longer maintained. He forked it, squashed a bug or two, and wrote a module for KY040 rotary encoders to make them play nice with the Pi. The snake charming doesn’t stop there: the rock star of this project is [Raphaël]’s virtual radio software, which handles the audio blending as he tunes between stations. A step-by-step tutorial is coming soon, so watch [Raphaël]’s site for updates. Tune past the break to give it a listen.
Adventures in Raspi radio-ing don’t have to be one-way. Here’s how you can turn one into an AM/FM+ transmitter using a DVB-T dongle and SDR.
Continue reading “GTA: San Andreas Radio Earns Six-Star Wanted Level”
For all the complexity involved in driving, it becomes second nature to respond to pedestrians, environmental conditions, even the basic rules of the road. When it comes to AI, teaching machine learning algorithms how to drive in a virtual world makes sense when the real one is packed full of squishy humans and other potential catastrophes. So, why not use the wildly successful virtual world of Grand Theft Auto V to teach machine learning programs to operate a vehicle?
The hard problem with this approach is getting a large enough sample for the machine learning to be viable. The idea is this: the virtual world provides a far more efficient solution to supplying enough data to these programs compared to the time-consuming task of annotating object data from real-world images. In addition to scaling up the amount of data, researchers can manipulate weather, traffic, pedestrians and more to create complex conditions with which to train AI.
It’s pretty easy to teach the “rules of the road” — we do with 16-year-olds all the time. But those earliest drivers have already spent a lifetime observing the real world and watching parents drive. The virtual world inside GTA V is fantastically realistic. Humans are great pattern recognizers and fickle gamers would cry foul at anything that doesn’t analog real life. What we’re left with is a near-perfect source of test cases for machine learning to be applied to the hard part of self-drive: understanding the vastly variable world every vehicle encounters.
A team of researchers from Intel Labs and Darmstadt University in Germany created a program that automatically indexes the virtual world (as seen above), creating useful data for a machine learning program to consume. This isn’t a complete substitute for real-world experience mind you, but the freedom to make a few mistakes before putting an AI behind the wheel of a vehicle has the potential to speed up development of autonomous vehicles. Read the paper the team published Playing for Data: Ground Truth from Video Games.
Continue reading “Grand Theft Auto V Used To Teach Self-Driving AI”
Playing Snake on a MIDI controller
While you’re waiting for your bandmates to finish arguing/making out/their beer, you can play Snake on your MIDI controller. Luis wrote a Snake game for an Akai APC40 controller. Everything is built with Processing and should provide a great distraction from (for?) your 14-year-old groupies.
Cheap & simple PCB holder
[Robert] sent in a tip for a very simple PCB holder. Take a neo magnet, embed it in oven-hardening modeling clay, and use it on a steel worktop. Check out the pics he sent in (1, 2). It’s too simple not to work.
Lose weight by running people over
[binaryhead] is using a stationary bicycle to play Grand Theft Auto: San Andreas. (Spanish, Google translate here). A pot and magnet/reed switch is connected to an Arduino that outputs keys to San Andreas. There’s no word on an ambulance simulator yet.
Giant Android tablet
[Martin Draskov] made a 23 inch Android tablet. He used off the shelf parts (multitouch monitor and a small PC) with the x86 Android port. There’s a video that doesn’t include Angry Birds. Sad, that.
T-shirt bleaching for the modern fabricator
With t-shirt bleaching, you can put a custom design on clothes without a screen printing setup. Reddit user [Admiral_Noosenbaum] used a CNC machine to make templates. Now if only we can find an .SGV file of Che Guevara. Video here.