isangmu
Published © CC BY

Origami Remote Control Robot

How to make a remote-controlled origami robot with Arduino.

IntermediateShowcase (no instructions)10,542
Origami Remote Control Robot

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
DC Motor, 12 V
DC Motor, 12 V
×2
HC-06 Bluetooth Module
×1

Story

Read more

Code

bluetooth to control 2 DC motors

Arduino
#include <SoftwareSerial.h>
SoftwareSerial BT(7,6);
void setup()
{
  BT.begin(9600);
  pinMode(2, OUTPUT); 
  pinMode(3, OUTPUT); 
  pinMode(4, OUTPUT); 
  pinMode(5, OUTPUT); 
}
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); 
    }
  }
}

Credits

isangmu

isangmu

0 projects • 22 followers

Comments