Introduction: Tractoduino

this is a proyect that is easly having good programming bases.

this small tractor or "tractoduino" as we call it is made of recycled materials, is a tractor cell controlled by bluetooth and it's fun.

Step 1: MATERIALS

>arduino uno.

>bluetooth card BTBee Pro.

>motomama v2.0 XBee PRO

>a battery of 9v.

>two plastic wheels.

>a wheel for to gide.

>a box to be the base of the car.

>two motors of relation 1:83.

>arduino program.

>a cellphone with android.

Step 2: DIAGRAM

This is the diagram of the monomama v 2.0, with this you can make the necessary connections to the arduino engines.

Step 3: Description of Materials

ARDUINO UNO

The Arduino UNO has everything it takes to operate the controller simply connects to a PC through the USB cable or can be powered using a battery or an AC-DC adapter. If connected by USB, external power is not necessary.

The Arduino Uno has:

14 digital input / output, of which 6 can be used as PWM outputs

It has 6 analog inputs

The pin 0 and 1 can function as serial RX and TX.

A crystal oscillator 16 MHz

USB Connector

A power jack

An ICSP connector

Reset Button

MOTOMAMA V 2.0

You can use this shield to drive two DC motors or stepper two-phase four-wire motor. For power, the power terminal board is available which also power the Arduino. Or, from the power jack on the Arduino board, the shield will take the form of the power plug Arduino Vin and get the engine to use this power.

BTBee Pro

Overview

BTBee Pro is a serial port Bluetooth module compatible with shields that has XBee sockets. It is designed for Bluetooth wireless transfer. It support Slave and Master mode and can be plugged into XBee socket as UART for transparent transmission. This module supports Bluetooth Wireless Programming for Arduino as well.

Feature

XBee socket compatibleSupports Slave and Master ModeSupports Wireless Programming for Arduino

Specification

Module TypeWirelessWeight15.00gModelIM121115002Board Size35mm x 24mmVersionBTBee ProOperation LevelDigital 3.3VPower SupplyExternal 3.3V

Step 4: Arduino Program

#include // import the serial library

SoftwareSerial SerialPort(0, 1); // RX, TX

// Pin 13 has an LED connected on most Arduino boards.

// give it a name:

int BluetoothData; // the data given from Computer

int EnableA = 10;

int InA1 = 8;

int InA2 = 9;

int EnableB = 11;

int InB1 = 12;

int InB2 = 13;

void setup() {


// put your setup code here, to run once:

// Inicializa los pines del motor como salidas

pinMode(EnableA, OUTPUT); // sets the pin as output

pinMode(InA1, OUTPUT); // sets the pin as output

pinMode(InA2, OUTPUT); // sets the pin as output

pinMode(EnableB, OUTPUT); // sets the pin as output

pinMode(InB1, OUTPUT); // sets the pin as output

pinMode(InB2, OUTPUT); // sets the pin as output

digitalWrite(EnableA, LOW);

digitalWrite(InA1, LOW);

digitalWrite(InA2, LOW);

digitalWrite(EnableB, LOW);

digitalWrite(InB1, LOW);

digitalWrite(InB2, LOW);

SerialPort.begin(9600);
SerialPort.println("Bluetooth On: 0 = Parar, 1 >> Adelante, 2 << Atras");

void loop() {

// put your main code here, to run repeatedly:

if (SerialPort.available()){

BluetoothData = SerialPort.read();

if(BluetoothData=='0'){ //if number 0 pressed ....

digitalWrite(EnableA, LOW);

digitalWrite(InA1, LOW);

digitalWrite(InA2, LOW);

SerialPort.println("Motor A Detenido");
}

if(BluetoothData=='1'){ // if number 1 pressed ....

digitalWrite(EnableA, HIGH);

digitalWrite(InA1, HIGH);

digitalWrite(InA2, LOW);

SerialPort.println("Motor A Adelante");

}

if (BluetoothData=='2'){// if number 2 pressed ....

digitalWrite(EnableA, HIGH);

digitalWrite(InA1, LOW);

digitalWrite(InA2, HIGH);

SerialPort.println("Motor A Atras");

}

if(BluetoothData=='3'){ // if number 0 pressed ....

digitalWrite(EnableB, LOW);

digitalWrite(InB1, LOW);

digitalWrite(InB2, LOW);

SerialPort.println("Motor B Detenido");

}

if(BluetoothData=='4'){ // if number 1 pressed ....

digitalWrite(EnableB, HIGH);

digitalWrite(InB1, HIGH);

digitalWrite(InB2, LOW);

SerialPort.println("Motor B Adelante");

}

if (BluetoothData=='5'){// if number 2 pressed ....

digitalWrite(EnableB, HIGH);

digitalWrite(InB1, LOW);

digitalWrite(InB2, HIGH);

SerialPort.println("Motor B Atras");

}

//SerialPort.println(BluetoothData);
}

delay(100);// prepare for next data ...

}

Step 5: Video

this is the finished product and its operation.