Introduction: Total Home Made Arduono Robot With Arm

we will need

1- arduino uno

2- HB LM298

1-4WD car

1- bluetoth module

1 servo motor

1 gribber with dc motor

1 home made arm

Step 1: Mechanical Work

the mechanical wprk is to easy

only a simple 4 WD car and make som adjustment on it like adding the suspention system on it

Step 2: The Code

#include
#include const int Bm1R=7; const int Bm1L=8; const int Be1=9; const int Bm2R=2; const int Bm2L=4; const int Be2=10; const int Gm1R=1; const int Gm1L=6; const int Ge1=5; const int Gm2R=12; const int Gm2L=13; const int Ge2=3; const int speedA=200; char BluetoothData; SoftwareSerial blototh(14, 15); Servo arm; void setup() { arm.attach(11); blototh.begin(9600); pinMode(Bm1R, OUTPUT); pinMode(Bm1L, OUTPUT); pinMode(Be1, OUTPUT); pinMode(Bm2R, OUTPUT); pinMode(Bm2L, OUTPUT); pinMode(Be2, OUTPUT); pinMode(Gm1R, OUTPUT); pinMode(Gm1L, OUTPUT); pinMode(Ge1, OUTPUT); pinMode(Gm2R, OUTPUT); pinMode(Gm2L, OUTPUT); pinMode(Ge2, OUTPUT); }

void loop() { if(blototh.available()) { BluetoothData=blototh.read(); delay(10); switch(BluetoothData) { case 'BF': analogWrite(Be1,speedA); analogWrite(Be2,speedA); digitalWrite(Bm1R,HIGH); digitalWrite(Bm1L,LOW); digitalWrite(Bm2R,LOW); digitalWrite(Bm2L,HIGH); delay(10); break; case 'BR': analogWrite(Be1,speedA); analogWrite(Be2,speedA); digitalWrite(Bm1R,HIGH); digitalWrite(Bm1L,LOW); digitalWrite(Bm2R,HIGH); digitalWrite(Bm2L,LOW); delay(10); break; case 'BL': analogWrite(Be1,speedA); analogWrite(Be2,speedA); digitalWrite(Bm1R,LOW); digitalWrite(Bm1L,HIGH); digitalWrite(Bm2R,LOW); digitalWrite(Bm2L,HIGH); delay(10); break; case 'BB': analogWrite(Be1,speedA); analogWrite(Be2,speedA); digitalWrite(Bm1R,LOW); digitalWrite(Bm1L,HIGH); digitalWrite(Bm2R,HIGH); digitalWrite(Bm2L,LOW); delay(10); break; case 'SS': analogWrite(Be1,0); analogWrite(Be2,0); analogWrite(Ge1,0); analogWrite(Ge2,0); digitalWrite(Bm1R,LOW); digitalWrite(Bm1L,LOW); digitalWrite(Bm2R,LOW); digitalWrite(Bm2L,LOW); digitalWrite(Gm1R,LOW); digitalWrite(Gm1L,LOW); digitalWrite(Gm2R,LOW); digitalWrite(Gm2L,LOW); delay(10); break; ////////////////////////////////// WHIPLASH /////////////GRIPPER/////////////////////// /////////////AMGAD MOHAMED///////////////// ///////////////////////////////// WHIPLASH case 'GU': analogWrite(Ge1,115); digitalWrite(Gm1R,HIGH); digitalWrite(Gm1L,LOW); delay(10); break; case'GD': analogWrite(Ge1,115); digitalWrite(Gm1R,LOW); digitalWrite(Gm1L,HIGH); delay(10); break; case'GO': analogWrite(Ge2,65); digitalWrite(Gm2R,HIGH); digitalWrite(Gm2L,LOW); delay(10); break; case 'GC': analogWrite(Ge2,65); digitalWrite(Gm2R,LOW); digitalWrite(Gm2L,HIGH); delay(10); break; ///////////////////////////////// ///////////WHIPLASH///////////// ///////////Servo/////////////// ////////////////////////////// case 'sa': arm.write(0); delay(10); break; case 'sb': arm.write(14); delay(10); break; case 'sc': arm.write(28); delay(10); break; case 'sd': arm.write(42); delay(10); break; case 'se': arm.write(56); delay(10); break; case 'sf': arm.write(70); delay(10); break; case 'sg': arm.write(84); delay(10); break; case 'sh': arm.write(98); delay(10); break; case 'si': arm.write(112); delay(10); break; case 'sj': arm.write(126); delay(10); break; case 'sk': arm.write(140); delay(10); break; case 'sl': arm.write(168); delay(10); break; case 'sm': arm.write(180); delay(10); break; } } }

Step 3: Android App

using MIT APP

Step 4: The Video

Comments

author
DIY Hacks and How Tos made it! (author)2017-04-08

Cool robot. Was this for a school project?

author
ama.gms made it! (author)ama.gms2017-04-12

yes