AndroidBot

101

1

Robot that can be controlled using

Step 1:

char c;

void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(3, OUTPUT); pinMode(5, OUTPUT);

}

void loop() { // put your main code here, to run repeatedly:

//if (Serial.available()){ c=Serial.read(); //Serial.println(c);

if (c=='1'){

analogWrite(3,60); analogWrite(5,60); }

if (c=='4') { analogWrite(3,200); analogWrite(5,200); }

if (c=='3'){

analogWrite(3,180); analogWrite(5,100); }

if (c=='2'){ analogWrite(3,100); analogWrite(5,180); }

if (c=='5') { analogWrite(3,125); analogWrite(5,125); } // }

}

//void Forward(void){ // // digitalWrite(3,HIGH); // digitalWrite(4,HIGH); // delayMicroseconds(60); // digitalWrite(3,LOW); // digitalWrite(4,LOW); // delayMicroseconds(40); // // // //} // //void Reverse(void){ // // digitalWrite(3,LOW); // digitalWrite(4,LOW); // delayMicroseconds(40); // digitalWrite(3,HIGH); // digitalWrite(4,HIGH); // delayMicroseconds(60); // // //} // //void Left(void){ // // digitalWrite(3,HIGH); // digitalWrite(4,LOW); // delayMicroseconds(40); // digitalWrite(3,LOW); // digitalWrite(4,HIGH); // delayMicroseconds(60); // // //} // //void Right(void){ // // digitalWrite(4,HIGH); // digitalWrite(3,LOW); // delayMicroseconds(40); // digitalWrite(3,HIGH); // digitalWrite(4,LOW); // delayMicroseconds(60); //} // // //void Stop(void){ // digitalWrite(3,LOW); // digitalWrite(4,LOW); // delayMicroseconds(40); // digitalWrite(3,HIGH); // digitalWrite(4,HIGH); // delayMicroseconds(40); // //}

Share

    Recommendations

    • 1 Hour Challenge

      1 Hour Challenge
    • Fandom Contest

      Fandom Contest
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    Discussions

    0
    None
    Swansong

    2 years ago

    This looks neat :) Did you take any progress photos while you were making it? Just for reference if you would like to break down the steps into written instructions and add some progress/step photos so that others can replicate your projects then it will receive more attention from the community and be possible to be featured on the site. Here are some helpful guides on how to write out an instructable. https://www.instructables.com/id/How-to-Create-a-Fe... I look forward to seeing more great content from you!

    Thank you,

    Christa (Swansong) Community Manager