loading

Had you ever played games by gyro Sensor on your mobile device ? Of course yes.

You can also use mobile gyro sensor to control any thing(i.e. cars,robots)in real life.you only need few things...

1)A Bluetooth module(HC-05).

2)A Micro controller development board(i am using AVR ATmega16).

3)A 12 volts battery.

4)Four DC geared motors & 4 wheels.

5)A chassis.

6)Some 1-2-1 Connector Wires.

7)A Android/Windows/ios Mobile/Tablet.

Step 1: Chassis Construction

If you have a car then you can skip this part.

you just need to assemble motors on chassis by bolts.Now mount wheels on motors shaft.your car is ready.

Step 2: Electronics

Now connect bluetooth module to your microcontrollers Rx & Tx pin.Connect motors terminal to motor driver IC.

Now you just need to program your controller and connect to battery.

Step 3: Programming

This is a simple program for AVR ATmega16.......

#define F_CPU 1000000UL

#include

#include

#define USART_BAUDRATE 1200 // Baud Rate value

#define BAUD_PRESCALE ((F_CPU / (USART_BAUDRATE * 16UL)) - 1)

voidusart_init()

{

UCSRB |= (1 << RXEN)|(1<

UCSRC |= (1 << URSEL) | (1<

UBRRL = BAUD_PRESCALE;

UBRRH = (BAUD_PRESCALE >> 8);

}

unsignedintusart_getch()

{

while ((UCSRA & (1 << RXC)) == 0);

{

}

return UDR;

}

voidusart_putch(unsigned char send)

{ while(!(UCSRA & (1<

{

}

UDR=send;

}

voidputstr(unsigned char *str)

{

int i=0;

while(str[i]!='\0')

{

usart_putch(str[i]);

_delay_ms(100);

i++;

}

}

void main()

{

usart_init();

DDRC=0xff;

PORTC=0xff;

while(1)

{

int a= usart_getch();

if(a=='F')

{

PORTC=0b00000101;

}

if(a=='B')

{

PORTC=0b00001010;

}

if(a=='R')

{

PORTC=0b00000110;

}

if(a=='L')

{

PORTC=0b00001001;

}

}

}

Step 4: Final Step

Now you just need to download a app called Arduino Bluetooth RC Car from play store.

when you tilt your mobile it send data to bluetooth and bluetooth send data to microcontroller.

Turn on power of Car and have fun :)

If you have any query please comment below.

<p>can you give me the code for arduino uno or mega?</p>
<p>the android app is customized for this code only or can be used for different purposes<br>im planning to use at89s52 <br>is it possible for me to code using it???</p>
You can use with different type of controller

About This Instructable

2,597views

22favorites

License:

Bio: Hello My name is Prayag Nao.I am a tech enthusiastic person who does not follow reality,instead I create reality.I am sharing some ... More »
More by prayag nao:How to Change or Customize Windows 7/8 Boot Screen  Smart Light Lamp How to Change Blue Color of Facebook to Your Favorite Color..?  
Add instructable to: