Robotcar Controlled Utilizing G-Sensor Cell phone

 Robotcar Controlled Utilizing G-Sensor Cell phone 



Make a robot vehicle, which will be controlled from a cell phone utilizing the G-Sensor. Utilize the RemoteXY administration to make GUI and source code! 

Equipment segments 

  • Arduino UNO 
  • HC-06 Bluetooth Module 

You may like these posts

  • Engine driver chip L298N 
  • Any robot vehicle stage 

Programming applications and online administrations 

  • RemoteXY

Stage 1. 



Construct robotcar utilizing any accessible stage based on two-wheel circuit. Association graph of electronic segments is appeared in the figure underneath. You will require Arduino UNO or agreeable board, Bluetooth HC-05 (06) module, engine driver, and force supply battery. Stuff engines are put on the stage and power to move robot wheels. 


step 2. 







Go to RemoteXY administration site on http://remotexy.com/  en/ supervisor/and make a graphical UI to control the robot. Set a control include utilizing the G-sensor for joystick. An illustration of interface is in the figure beneath. Snap the catch "Get source code". 


step 3. 


Download the source code of GUI and open it in Arduino IDE. For arrangement you need RemoteXY.h library; the library can be downloaded from the connection http://remotexy.com/en/library/. You would already be able to attempt to stack code in Arduino and interface with portable application. Be that as it may, while this is just the code clear, at that point you should add required usefulness connecting a graphical interface and engine driver. 


step 4. 


At that point you need to add robot control usefulness to the source code utilizing a graphical interface. For this reason the field RemoteXY structure. RemoteXY structure shows the entirety of your GUI controls. 


The subsequent source code is demonstrated as follows. You can arrange it and transfer it to Arduino. 


step5. 

Introduce a portable application RemoteXY on http://remotexy.com/en/download/. At the point when the application is running on a cell phone, press Bluetooth button association in the rundown, select the name of your Bluetooth module, for HC-05 (06) modules the name regularly will be INVOR or HC-06. 

Code

/////////////////////////////////////////////  

//        RemoteXY include library         //  

/////////////////////////////////////////////  


/* RemoteXY select connection mode and include library */  

#define REMOTEXY_MODE__SOFTWARESERIAL  

#include <SoftwareSerial.h>  

#include <RemoteXY.h>  


/* RemoteXY connection settings */ 

#define REMOTEXY_SERIAL_RX 2  

#define REMOTEXY_SERIAL_TX 3  

#define REMOTEXY_SERIAL_SPEED 9600  


/* RemoteXY configurate  */   

unsigned char RemoteXY_CONF[] =  

  { 3,0,23,0,1,5,5,15,41,11 

  ,43,43,1,2,0,6,5,27,11,5 

  ,79,78,0,79,70,70,0 };  

    

/* this structure defines all the variables of your control interface */   

struct {  


    /* input variable */ 

  signed char joystick_1_x; /* =-100..100 x-coordinate joystick position */ 

  signed char joystick_1_y; /* =-100..100 y-coordinate joystick position */ 

  unsigned char switch_1; /* =1 if switch ON and =0 if OFF */ 


    /* other variable */ 

  unsigned char connect_flag;  /* =1 if wire connected, else =0 */ 


} RemoteXY;  


/////////////////////////////////////////////  

//           END RemoteXY include          //  

/////////////////////////////////////////////  

/* defined the right motor control pins */ 

#define PIN_MOTOR_RIGHT_UP 7 

#define PIN_MOTOR_RIGHT_DN 6 

#define PIN_MOTOR_RIGHT_SPEED 10 


/* defined the left motor control pins */ 

#define PIN_MOTOR_LEFT_UP 5 

#define PIN_MOTOR_LEFT_DN 4 

#define PIN_MOTOR_LEFT_SPEED 9 


/* defined the LED pin */ 

#define PIN_LED 13 



/* defined two arrays with a list of pins for each motor */ 

unsigned char RightMotor[3] =  

  {PIN_MOTOR_RIGHT_UP, PIN_MOTOR_RIGHT_DN, PIN_MOTOR_RIGHT_SPEED}; 

unsigned char LeftMotor[3] =  

  {PIN_MOTOR_LEFT_UP, PIN_MOTOR_LEFT_DN, PIN_MOTOR_LEFT_SPEED}; 


/* 

   speed control of the motor 

   motor - pointer to an array of pins 

   v - motor speed can be set from -100 to 100 

*/ 

void Wheel (unsigned char * motor, int v) 

  if (v>100) v=100; 

  if (v<-100) v=-100; 

  if (v>0) { 

    digitalWrite(motor[0], HIGH); 

    digitalWrite(motor[1], LOW); 

    analogWrite(motor[2], v*2.55); 

  } 

  else if (v<0) { 

    digitalWrite(motor[0], LOW); 

    digitalWrite(motor[1], HIGH); 

    analogWrite(motor[2], (-v)*2.55); 

  } 

  else { 

    digitalWrite(motor[0], LOW); 

    digitalWrite(motor[1], LOW); 

    analogWrite(motor[2], 0); 

  } 


void setup() 

  /* initialization pins */ 

  pinMode (PIN_MOTOR_RIGHT_UP, OUTPUT); 

  pinMode (PIN_MOTOR_RIGHT_DN, OUTPUT); 

  pinMode (PIN_MOTOR_LEFT_UP, OUTPUT); 

  pinMode (PIN_MOTOR_LEFT_DN, OUTPUT); 

  pinMode (PIN_LED, OUTPUT); 

  /* initialization module RemoteXY */ 

  RemoteXY_Init (); 

void loop() 

  /* event handler module RemoteXY */ 

  RemoteXY_Handler (); 

  /* manage LED pin */ 

  digitalWrite (PIN_LED, (RemoteXY.switch_1==0)?LOW:HIGH); 

  /* manage the right motor */ 

  Wheel (RightMotor, RemoteXY.joystick_1_y - RemoteXY.joystick_1_x); 

  /* manage the left motor */ 

  Wheel (LeftMotor, RemoteXY.joystick_1_y + RemoteXY.joystick_1_x); 



Commentaires

  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>
Tinggalkan komentar sesuai topik tulisan, komentar dengan link aktif tidak akan ditampilkan.
Admin dan penulis blog mempunyai hak untuk menampilkan, menghapus, menandai spam, pada komentar yang dikirim
Affordability

Affordability

Design must reflect the practical and aesthetic in business but above all... good design must primarily serve people. Build beautiful websites in mere minutes.

Basic

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$5 Per User Per Month

Enterprise

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$10 Per User Per Month
advertise

Business

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$19.99 Per User Per Month

Retina Ready

Build trust with prospective clients, delight existing customers, and increase the efficiency

Welcome to

Best website for Blog App. Business. Digital. Marketing. Service.

Even in the most uncertain times, Help Scout keeps you connected with customers.

Frequently asked questions

01. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
02. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
03. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
04. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
05. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
06. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
07. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
08. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?

We tried to make

Integrations

Create stunning, effective sales documents with custom-designed theme & template.

Marketing

Create stunning, effective sales documents with custom-designed theme & template.

Dedicated Support

Create stunning, effective sales documents with custom-designed theme & template.

Best Features

Our features will help
to improve busines

Sales teams use PandaDoc to improve deal workflow, insights, and speed while delivering an amazing buying experience. Get your documents out the door fast to keep deals.

Rechercher dans ce blog

advertise
advertise
advertise

Built in Browsers

Build trust with prospective clients, delight existing customers, and increase the efficiency

Extreme Security

Build trust with prospective clients, delight existing customers, and increase the efficiency

Clean Design

Build trust with prospective clients, delight existing customers, and increase the efficiency

Easy Customize

Build trust with prospective clients, delight existing customers, and increase the efficiency

Awesome Design

Build trust with prospective clients, delight existing customers, and increase the efficiency