Project tutorial
Star Wars R2-D2 Made Out of Paper

Star Wars R2-D2 Made Out of Paper

I tried to make a paper R2-D2 from Star Wars which has been my all-time favorite robot.

  • 301 views
  • 0 comments
  • 5 respects

Components and supplies

About this project

I like playing with paper. After knowing Arduino I have been trying to combine the two. This time I made paper R2-D2 from Star Wars which has been my all-time favorite robot.

Code

r2d2Arduino
#include <SoftwareSerial.h>
SoftwareSerial BT(7,6);
#include <VarSpeedServo.h> 
VarSpeedServo myservo;

void setup()
{
  BT.begin(9600);
  pinMode(2, OUTPUT); 
  pinMode(3, OUTPUT); 
  pinMode(4, OUTPUT); 
  pinMode(5, OUTPUT); 
  myservo.attach(9);
}
char a;
void loop()
{
  if (BT.available()) {
    a = (BT.read());
    if (a == '0') {
    BT.println("Beast is stopping!");
    digitalWrite(2, LOW); 
    digitalWrite(3, LOW); 
    digitalWrite(4, LOW); 
    digitalWrite(5, LOW); 
    }
    if (a == '1') {
    BT.println("Beast is forwarding!");
    digitalWrite(2, HIGH); 
    digitalWrite(3, LOW); 
    digitalWrite(4, HIGH); 
    digitalWrite(5, LOW); 
    }
    if (a == '2') {
    BT.println("Beast is backwarding!");
    digitalWrite(2, LOW); 
    digitalWrite(3, HIGH); 
    digitalWrite(4, LOW); 
    digitalWrite(5, HIGH); 
    }
    if (a == '3') {
    BT.println("Beast is turning left!");
    digitalWrite(2, HIGH); 
    digitalWrite(3, LOW);  
    digitalWrite(4, LOW); 
    digitalWrite(5, HIGH); 
    }    
    if (a == '4') {
    BT.println("Beast is turning right!");
    digitalWrite(2, LOW); 
    digitalWrite(3, HIGH);  
    digitalWrite(4, HIGH); 
    digitalWrite(5, LOW); 
    }
        if (a == '4') {
    BT.println("Beast is turning right!");
    digitalWrite(2, LOW); 
    digitalWrite(3, HIGH);  
    digitalWrite(4, HIGH); 
    digitalWrite(5, LOW); 
    }    
        if (a == '5') {
  myservo.write(180, 30, true); 
  myservo.write(0, 30, true);  
    }
  }
}

Comments

Similar projects you might like

Star Wars Lunch Box Data Aquisition

Project showcase by Josh Makatura

  • 7,113 views
  • 1 comment
  • 25 respects

Make an Enhanced R2-D2 to Be Controlled by an Android App

Project tutorial by Kutluhan Aktar

  • 1,833 views
  • 0 comments
  • 2 respects

Star Tracker by Emvilza: A Stepper Barn Door Mount

Project tutorial by Emvilza

  • 2,570 views
  • 2 comments
  • 20 respects

Laser, Robe, Star Wars?! - Versalume + Adafruit Gemma

Project tutorial by Kitty Yeung

  • 2,139 views
  • 2 comments
  • 6 respects

3D Printed R2-D2 with an Arduino Core

Project showcase by Raul Antonio

  • 4,198 views
  • 1 comment
  • 9 respects
Add projectSign up / Login