Introduction: Car of Mario Kart

Introduction.

The creation and development of the cart made for competition Mario Party are presented. Which was to develop a device to be controlled by Bluetooth and be able to burst balloons through an electronic mechanism.

Theoretical framework Bluetooth is a wireless communication standard that allows transmission of data through radio frequency in the 2.4 GHz band. Bluetooth modules are small and with a very low consumption that will allow us to add Bluetooth functionality to our Arduino modules. These modules contain the chip with a development board with pins required for serial communication. Bluetooth is a wireless communication standard that enables data transmission via radio frequency in the 2.4 GHz band. There are many Bluetooth modules for use in our electronic projects, but the most used are the JY-MCU modules because they are very cheap and easy to find on the market. They are small and with a very low consumption that will allow us to add Bluetooth functionality to our Arduino modules. These modules contain the chip with a development board with pins required for serial communication.

AT commands AT commands are a type of commands to configure the Bluetooth module via a micro-controller, computer or any device that has a serial communication (Tx / Rx). They are instructions that allow us to change the baud module, PIN, name, etc. To use AT commands the Bluetooth module must not be linked to any device (red LED flashing module). According to the specifications of the module, the time must be respected between sending an AT command and one has to be 1 second. If an AT command is sent and in less than a second one is sent, the module does not return response.

Step 1: Development of the Project.

Code

The code was one of the most difficult parts of the project as it involved combining two types of communications to control the Arduino and will control the engine and include could communicate. We are guided tutorials and code examples of different manufacturers and thus get an efficient and functional code. The code is appended to the end of the document.

Design

For design use Solid Works software in which was a 2D plane and was then extruded to 3D, then cut it into the laser cutter.

Step 2: Materials

To prepare the prototype various electrical components were used, and then define each of them:

• Arduino UNO R3 The Arduino is an open-source physical computing platform based on a simple card I / O and a development environment that implements the Processing / Wiring language. The Arduino Uno R3 can be used to develop interactive objects or can be connected to computer software.

• Geared Motors The geared motors are normally supplied by coupling to a standard asynchronous reduction unit, totally enclosed fan-cooled three-phase networks to connect to 220/440 volts and 60 Hz electric motor squirrel cage. The gearboxes are designed based gear, circular and jagged mechanisms with special geometries according to their size and function in each engine.

• Adafruit Motor Shield v2.3 It is the driver used to control the motors of the wheels is integrated directly into the Arduino.

• Module Bluetooth Mate Silver Bluetooth matt is specially designed to work with Arduino. These modules are a wireless substitute to replace serial cables. Any flow of serial data bpa 2400-115200 can be sent seamlessly from your computer to your destination.

• Bluetooth Module HC-06 One of the main advantages of HC-06 module, in addition to its small size and good transmission characteristics and reception that provide a wide range (for being a local Bluetooth system), is the low power consumption that has both operation and standby, ie it supplied with energy, but no connection or link to another device, such as a mobile phone with Android OS.

• Rechargeable battery (12v) A battery or rechargeable battery (also called rechargeable battery) is a group of one or more secondary electrochemical cells.

Step 3: Code

This was the code that we use to move the cart through Bluetooth in the Arduino base

#include

#include

#include "utility/Adafruit_MS_PWMServoDriver.h"

#include

int bluetoothTx = 51; // TX-O pin of bluetooth mate, Arduino D2

int bluetoothRx = 50; // RX-I pin of bluetooth mate, Arduino D3

int i, ia, vDI,vDD, vTI, vTD, DI, DD ;

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

Adafruit_MotorShield AFMS = Adafruit_MotorShield();

Adafruit_DCMotor *MotorDI = AFMS.getMotor(1);

Adafruit_DCMotor *MotorDD = AFMS.getMotor(2);

Adafruit_DCMotor *MotorTI = AFMS.getMotor(3);

Adafruit_DCMotor *MotorTD = AFMS.getMotor(4);

void setup() {

Serial.begin(9600); // Begin the serial monitor at 9600bps

bluetooth.begin(115200); // The Bluetooth Mate defaults to 115200bps

bluetooth.print("$"); // Print three times individually

bluetooth.print("$");

bluetooth.print("$"); // Enter command mode

delay(100); // Short delay, wait for the Mate to send back CMD

bluetooth.println("U,9600,N"); // Temporarily Change the baudrate to 9600, no parity

// 115200 can be too fast at times for NewSoftSerial to relay the data reliably

bluetooth.begin(9600); // Start bluetooth serial at 9600

AFMS.begin();

MotorDI->setSpeed(150);

MotorDI->run(FORWARD);

MotorDI->run(RELEASE);

MotorDD->setSpeed(150);

MotorDD->run(FORWARD);

MotorDD->run(RELEASE);

MotorTI->setSpeed(150);

MotorTI->run(FORWARD);

MotorTI->run(RELEASE);

MotorTD->setSpeed(150);

MotorTD->run(FORWARD);

MotorTD->run(RELEASE);

}

void loop() {

if(bluetooth.available()) // If the bluetooth sent any characters

{

i = bluetooth.read();

}

if(Serial.available()) // If stuff was typed in the serial monitor

{

// Send any characters the Serial monitor prints to the bluetooth

bluetooth.print((char)Serial.read());

}

if( ia!= i)

{

switch (i)

{

case 119:

bluetooth.println("w");

vDI = 250;

vDD = 250;

vTI = 250;

vTD = 250;

DI = 1;

DD = 1;

break;

case 101:

bluetooth.println("e");

vDI = 220;

vDD = 50;

vTI = 220;

vTD = 50;

DI = 1;

DD = 1;

break;

case 100:

bluetooth.println("d");

vDI = 250;

vDD = 250;

vTI = 250;

vTD = 250;

DI = 1;

DD = 2;

break;

case 115:

bluetooth.println("s");

vDI = 0;

vDD = 0;

vTI = 0;

vTD = 0;

DI = 1;

DD = 1;

break;

case 97:

bluetooth.println("a");

vDD = 250;

vDI = 250;

vTD = 250;

vTI = 250;

DI = 2;

DD = 1;

break;

case 113:

bluetooth.println("q");

vDD = 250;

vDI = 50;

vTD = 250;

vTI = 50;

DI = 1;

DD = 1;

break;

case 120:

bluetooth.println("x");

vDI = 220;

vDD = 220;

vTI = 220;

vTD = 220;

DI = 2;

DD = 2;

break;

}

MotorDI->setSpeed(vDI);

MotorDI->run(DI);

MotorDD->setSpeed(vDD);

MotorDD->run(DD);

MotorTI->setSpeed(vTI);

MotorTI->run(DI);

MotorTD->setSpeed(vTD);

MotorTD->run(DD);

ia=i;

}

}

Step 4: Weapon

Finally, we installed a weapon that was a heat resistance to burst balloons very easily.

Put 3 balloons on each car and play whit them.

Hope you like it.

Comments

author
Jimmy-Dinner (author)2016-05-08

Looks like and awesome instructable.

Just a side note, I think you left 3 blank include statements in your arduino code

author
DIY Hacks and How Tos (author)2016-05-08

Fun car game.

About This Instructable

527views

4favorites

License:

More by Yessical1:Car of Mario Kart
Add instructable to: