New Project

CONNECT

Arduino control Hexbug Spider

  • Page Views 1701
  • Spread the love
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  

    ‘Make your own robot’ will make this part of our project Arduino control Hexbug Spider Arduino-based control system with turning control various functions.The control system will complete our project by providing both by telephone and computer.

    Materials:

    • Hexbug Spider (XL)
    • Arduino Nano
    • Hc-06 Bluetooth Module
    • L293b Motor Driver
    • 6V battery

    Electronic Section:

     

    First, we are removing the screws on the battery cover hexbug spider.On 3 AAA batteries, it can work with a total of 4.5 volts.Battery has 3 screws on the bed.We reach the circuit by removing the screws.We cut the connection we will use their batteries 6V battery.One that moves the Hexbug Spider 2, DC’s engine.One of them walking motion while the other is doing the routing movement.

     

    You can see the entrance of the circuit engine.Soldering pins that will connect the cables as shown in the figure above our own motor drive.You can easily link to the M1 and M2 writes on the circuit.Left and right movement of the pins above the engine, the following engine allows the pins to the back and forth movement.

     

    We have made motor pin connection and connect the Arduino engines.Now HC-06 Bluetooth module after the aduino to bağlıyoruz.dah, mount the battery to the motor drive.You can make out the Arduino motor drive power supply.

     

    After making all the connections to the circuit let’s control system.Spider’ll check in two ways.We will provide the first android phone in the second robot control console from the computer program last summer.

    Android phone Control:

    Just get on the phone to our control of our first application from the link below.

    Android spider control

    Now we create our application based on the Arduino software.Application software based on the characters that is sent to pressure will provide the control button to wool, adding that character.

    Phone to Control Arduino Software:

    // Software development  by Robimek - 2015
    
    // Software development  by Robimek
    
    char val;
    #define motorileri 9
    #define motorgeri 10
    #define motorsol 11
    #define motorsag 12
    int S;
    
    void setup()
    {
    Serial.begin(9600);
    pinMode(motorileri,OUTPUT);
    pinMode(motorgeri,OUTPUT);
    pinMode(motorsol,OUTPUT);
    pinMode(motorsag,OUTPUT);
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    }
    
    void loop() {
    if (Serial.available()) {
    delay(100);
    while(Serial.available() > 0){
    val = Serial.read();
    }if (val == 'S') {
    dur();
    }
    if (val == 'F') {
    ileri();
    }if (val == 'R') {
    geri();
    }if (val == 'B') {
    sag();
    }if (val == 'L') {
    sol();
    }if (val == 'G') {
    solileri();
    }if (val == 'H') {
    solgeri();
    }if (val == 'I') {
    sagileri();
    }if (val == 'J') {
    saggeri();
    }
    
    }
    }
    void dur()
    {
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    }
    
    void ileri() {
    digitalWrite(motorileri,HIGH);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    }
    
    void geri() {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,HIGH);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    
    }
    void sol() {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,HIGH);
    digitalWrite(motorsag,LOW);
    
    }
    void sag() {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,HIGH);
    
    
    }
    
    void sagileri()
    {
    
    digitalWrite(motorileri,HIGH);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,HIGH);
    }
    void solileri()
    {
    digitalWrite(motorileri,HIGH);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,HIGH);
    digitalWrite(motorsag,LOW);
    }
    void saggeri()
    {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,HIGH);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,HIGH);
    }
    void solgeri()
    {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,HIGH);
    digitalWrite(motorsol,HIGH);
    digitalWrite(motorsag,LOW);
    }

    Install software on Arduino board to control the phone.Connect with bluetooth we open our application we can control the spider.

     

    Will allow control from a computer with spider robot control interface in Visual Basic we do.First, let’s get our program from the link below.

    Hexbug Spider Control

    By adding data sent from a software button in the program, we create our Arduino code.

    Arduino Software for control of the computer:

    //Software development By Robimek - 2015
    
    // Software Licensing By Robimek
    
    char val;
    #define motorileri 9
    #define motorgeri 10
    #define motorsol 11
    #define motorsag 12
    void setup()
    {
    Serial.begin(9600);
    pinMode(motorileri,OUTPUT);
    pinMode(motorgeri,OUTPUT);
    pinMode(motorsol,OUTPUT);
    pinMode(motorsag,OUTPUT);
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    }
    
    void loop() {
    if (Serial.available()) {
    delay(100);
    while(Serial.available() > 0){
    val = Serial.read();
    }if (val == '9') {
    dur();
    }
    if (val == '2') {
    ileri();
    }if (val == '1') {
    geri();
    }if (val == '4') {
    sag();
    }if (val == '3') {
    sol();
    }if (val == '5') {
    solileri();
    }if (val == '8') {
    solgeri();
    }if (val == '6') {
    sagileri();
    }if (val == '7') {
    saggeri();
    }
    
    }
    }
    void dur()
    {
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    }
    
    void ileri() {
    digitalWrite(motorileri,HIGH);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    }
    
    void geri() {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,HIGH);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,LOW);
    
    
    }
    void sol() {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,HIGH);
    digitalWrite(motorsag,LOW);
    
    }
    void sag() {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,HIGH);
    
    
    }
    
    void sagileri()
    {
    
    digitalWrite(motorileri,HIGH);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,HIGH);
    }
    void solileri()
    {
    digitalWrite(motorileri,HIGH);
    digitalWrite(motorgeri,LOW);
    digitalWrite(motorsol,HIGH);
    digitalWrite(motorsag,LOW);
    }
    void saggeri()
    {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,HIGH);
    digitalWrite(motorsol,LOW);
    digitalWrite(motorsag,HIGH);
    }
    void solgeri()
    {
    
    digitalWrite(motorileri,LOW);
    digitalWrite(motorgeri,HIGH);
    digitalWrite(motorsol,HIGH);
    digitalWrite(motorsag,LOW);
    }

    By installing the software, we can control the spider from the computer via bluetooth.

    ‘Make your own robot from Hexbug Spider in this part of our project we provide both the phone and the computer control.
    If you like wearing ultrasonic sensor which hit the autonomous movement can flip the robot obstacle.
    To discuss the next project .. Good work …

     

    Share

    What did they say ?

    2 Comment - "Arduino control Hexbug Spider"

    avatar
    Sort:   The Newests | Ancients | Likes
    wpDiscuz

    BE A FACEBOOK FAN

    Instagram