VictorHugo
Published © GPL3+

Mobile Robot Controlled by Joystick with INNOVLOX

INNOVLOX is an open source construction system that allows you to build robotics devices with Arduino.

BeginnerWork in progress2,030
Mobile Robot Controlled by Joystick with INNOVLOX

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Analog joystick (Generic)
×1
DC motor (generic)
×2
Motor Driver l9110s
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

Connection diagram

Topological diagram for analog joystick connection

Code

Code for Joystick control

Arduino
int potencia;
void setup() {
}

void loop() {
  if(analogRead(A1) >550){
    potencia = map(analogRead(A1),550,1023,0,100);
    Avanzar(potencia);
  }
  if(analogRead(A1) <500){
    potencia = map(analogRead(A1),500,0,0,100);      
    Retroceder(potencia);
    }
    
  if(analogRead(A0) >550){
    potencia = map(analogRead(A0),550,1023,0,100);
    Izquierda(potencia);
  }
  if(analogRead(A0) <500){
    potencia = map(analogRead(A0),500,0,0,100);      
    Derecha(potencia);
    }
  if((500< analogRead(A1))&(analogRead(A1) <550)&(500< analogRead(A0))&(analogRead(A0) <550)){  
    Stop();
  }  
}

Credits

VictorHugo
1 project • 1 follower

Comments