Hi-fi robot

Thanx for coming here

You might get disappointed with the robot

Introducing the hi-fi robot

Requirements :

  1. cardboard sheet
  2. Arduino
  3. Jumper wires
  4. Ultrasonic sensor
  5. Paper tape
  6. Scissor
  7. Servo motor

Inscape file for laser cutting :

Process:

  1. First load the file in inscape convert the file from SVG to DXF file in inscape
  2. Then load the DXF file into the RDWorks software
  3. Cut the given file in laser cutter
  4. Then add the ultrasonic sensor it the holes provided
  5. Then do the Arduino connections as shown in the diagram
  6. /////// photo of the ultrasonic =sensor
  7. The vcc and gnd pins provide power to the ultrasonic sensor
  8. The trigger and the echo pins provide the input and output data respectively
  9. The yellow wire of the servo is the signal pin getting the signal data
  10. //// photo of the servo
  11. Do the connections as shown in the picture
  1. Connect the Arduino with the Arduino  cable to the computer
  2. Code:
  3. Upload he  code 
  4. Now when you take your hand in  the proximity to the ultrasonic sensor the had would come up to give you the hi-fi
  5.  

Servo myservo;

intpos = 0;

inttrigPin = 11;

intechoPin = 12;

long duration, cm ;

void setup() {

//Serial Port begin

myservo.attach(9);

Serial.begin (9600);

//Define inputs and outputs

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

}

void loop()

{

for (pos = 0; pos<= 180; pos += 4) {

myservo.write(pos);

digitalWrite(trigPin, LOW);

delayMicroseconds(5);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

pinMode(echoPin, INPUT);

duration = pulseIn(echoPin, HIGH);

cm = (duration/2) / 29.1;

Serial.println(pos);

Serial.println(cm);

delay(400);

}

}