Table of Contents

DIY Dabble Controlled PC Games

Dabble-Controlled-PC-Games
Project Description

Introduction

Smartphones sure have transformed our gaming experience; a number of games that we used to play on our PC are now available on Smartphones. But, nothing can ever beat the fun of playing games on the PC using a gaming console. Period. So, we’re bringing you a new, revolutionary game controller: the Dabble app, our indigenously developed project-making mobile application. Among its various amazing features, Dabble has the Gamepad module; it transforms your Smartphone into a game controller of three types:

  1. The gaming console or the digital mode
  2. The Joystick or the analog mode
  3. The accelerometer mode

The best part? It’s free! All you need is your dear pal evive, the HC-05 Bluetooth module, your PC with all your favorite games in it, and Dabble, which you can download for free from here; you’re all set to relive the best days of your life!

So, what are you waiting for? Install. Connect. Play!

Connection

Connect the HC-05 Bluetooth module to evive as shown in the figure and connect evive to your Laptop or PC using the USB A-B cable.bluetooth_module

You must be thinking that the next step will be making a controller to play games with.

Surprise! We won’t be ‘making’ another controller as you have a Smartphone. Just download Dabble, connect, and your controller is ready!

Now, all you’re left with to do is upload the code to evive so that you can use your Smartphone as a controller, not just a normal one but a wireless controller.Digital Mode Joystick/Accelerometer Mode

Code

We won’t be using just Arduino IDE; we will even use Processing.

The reason why we are using it is that we need to establish communication between Arduino and your laptop.

Here, the communication takes place in two steps.

When you click the buttons on the Gamepad, the corresponding value is sent to Arduino via evive.

Arduino then sends the data to Processing, which in turn performs the action assigned to the corresponding value.

Eg., when you press ‘UP’ key. Arduino sends ‘1.’ to Processing. Processing then performs the action that 1 corresponds too.

Before uploading the code, make sure that the value of COM Port in both Arduino and Processing is the same.arduino COM port processing _COM_port

The following Arduino Code should be uploaded to evive.

You can download the Processing from the code section below.

Logic

The Gamepad has three modes:

  1. Digital Mode
  2. Joystick Mode
  3. Accelerometer ModeDabble Game Pad Switch Mode Accelerometer

You can use all the three modes.

Connect your phone to the Bluetooth Module of evive.
Once connected you are ready to play the game with.

  • The first mode is the normal digital mode where you can control the game by pressing or in your case touching the corresponding button.Game Pad_Connected
  • The Second mode is the Joystick mode. This is similar to controlling the game using a real-life joystick. Not just games, you can scroll also UP or DOWN on any page using this mode.Game Pad_Joystick_Connected
  • Last but not least, the accelerometer mode. In this case, you do not have to press a button or move the joystick. All you need to do is tilt your phone. When you tilt the phone in any particular direction, your object in the game will follow the instruction and move in that particular direction.

Conclusion

With this, you’re all set to bring back the gaming experience of the past and that too without spending even a single penny. Enjoy!

Project Downloads - Code and Files

Code LabelCode File
Arduino Code for Dabble Controlled PC Gameshttps://ai.thestempedia.com/wp-content/uploads/2023/05/Dabble-Controlled-PC-Games-2.zip
Processing Code for Dabble Controlled PC Gameshttps://ai.thestempedia.com/wp-content/uploads/2023/05/Processing-Code-for-Dabble-Controlled-PC-Games-2.zip
evive Library
Dabble Library

Circuit Diagram

Circuit Diagram DescriptionCircuit Diagram Fritzing Diagram

Connect the HC-05 Bluetooth Module as shown in the given figure.

Explore Related Projects by STEMpedia

Level up your robot control skills by learning how to control a 2-Wheel Drive Robot with hand gestures using PictoBlox AI's Machine Learning extension. Get ready to channel your inner Jean Grey!
Learn how to make a two-wheel-drive robot and code on the go with PictoBlox's mobile app. Control your robot in real-time with your smartphone!
Learn how to make an automatic chocolate dispenser to delight Santa this Christmas. All components can be found in the evive Starter Kit. Let's begin!

Explore Community Projects