edge lab LIVE! starts Tuesday in Munich. Grab a workshop seat and take home the board you build on. Code FRIEND-HACKSTER saves 20%. () Learn more!
pranavmadhavaram
Published © GPL3+

Obstacle avoiding pit avoiding car

Avoids obstacle and pits at the same time

AdvancedFull instructions provided272
Obstacle avoiding pit avoiding car

Things used in this project

Story

Read more

Schematics

website_15_aQFlyM2mlT.png

Code

Untitled file

Arduino
void setup()

{

Serial.begin(9600);

pinMode(13, OUTPUT);//dc motor

pinMode(11, OUTPUT);



pinMode(2,INPUT);

pinMode(4,INPUT);
}

void loop()

{ if (digitalRead(2)==HIGH||digitalRead(3)==LOW)
{digitalWrite(13, HIGH);
digitalWrite(11, HIGH);}
else
{digitalWrite(13, HIGH);}}

Credits

pranavmadhavaram
16 projects • 1 follower

Comments