AhmedAzouz
Published © LGPL

Circuito Arduino Controller Pad

Circuito is a DIY controlling pad that works as a supplementary project can control any Arduino device.

IntermediateFull instructions provided10 hours2,247
Circuito Arduino Controller Pad

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
LED (generic)
LED (generic)
×1
Modulo Joystick (for Modulo)
Modulo Joystick (for Modulo)
×1
Slide Switch
Slide Switch
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Buzzer
Buzzer
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Amazon Web Services ROTARY TOOL

Story

Read more

Custom parts and enclosures

cad_sfo5mVRNhg.png

Cad sfo5mvrnhg

Schematics

circuito_gAWPOnIYQY.jpg

Circuito gawponiyqy

Code

Circuito code

Arduino
This code is sample how to use the Controller with servo motors.
int xPin = A1;
int yPin = A0;
int buttonPin = 2;
int buzzer = 9;

int xPosition = 0;
int yPosition = 0;
int buttonState = 0;

//define servos
Servo servo1;
Servo servo2;

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600); 
  
  pinMode(xPin, INPUT);
  pinMode(yPin, INPUT);
  pinMode(buzzer, OUTPUT);

  //activate pull-up resistor on the push-button pin
  pinMode(buttonPin, INPUT_PULLUP); 

  // ******* S  13/ B 11/ G 12 / E 10
  servo1.attach(13);  
  servo2.attach(10);  
}

void loop() {
  JoyStickControl();
} 

void JoyStickControl()
{
  xPosition = analogRead(xPin);
  yPosition = analogRead(yPin);
  buttonState = digitalRead(buttonPin);

  // Servos
  xPosition = map(xPosition, 0, 1023, 0, 180);
  servo1.write(xPosition);
  
  yPosition = map(yPosition, 0, 1023, 0, 180);
  servo2.write(yPosition);

  if(buttonState ==0)
  {
    // you may control another servo motor 
    tone(buzzer, 1000); // Send 1KHz sound signal... sound indicator for pressing
    noTone(buzzer);     // Stop sound...
  }

  Serial.print("X: ");
  Serial.print(xPosition);
  Serial.print(" | Y: ");
  Serial.print(yPosition);
  Serial.print(" | Button: ");
  Serial.println(buttonState);

  delay(100); // add some delay between reads
}

Credits

AhmedAzouz

AhmedAzouz

4 projects • 25 followers
High qualified software engineer, Creativity and Technology have always been a big part of my life.
Contact

Comments

Add projectSign up / Login