Blog10-MAKEUP MAN

We make a makeup robot using legs to help the customer do personalize making up. Since the aim is to create a fun robot, we decide to let the robot use legs instead of hands to do the makeup. Imagine that customers will surprisingly see a robot assistant helping people select their best-fit makeup style and do makeup when people go to the makeup store. In our project, the user can choose from rush mode and normal mode to control the time duration of doing makeup in the user interface. They can also select the style of makeup: Heavy or Light. The robot will do more makeup on the model’s face in heavy makeup than in the light makeup.

During the process, the biggest challenge for me is that the Arduino-P5.js communication is not very stable. In the beginning, we tried to make two legs of the robot doing the work. However, I find out that the power supply somehow related to communication stability. If I try to add more motors to the circuit, the communication portal will break during the process. For now, the interface is relatively simple. The user pushes the button to answer the questions like a questionnaire. To further develop this project, we will add more fun talks and relaxed interaction in the digital platform. I believe that there are still many spaces we can do within the digital interface.

PROCESS:

Fabrications (Laser Cut):

Physical Computing:

Serial Communications:

P5.js Voice Interface:

https://editor.p5js.org/mc7706/present/yEN_J7BU7

Arduino Code:

#include <Servo.h>

Servo myservo1;
// create servo object to control a servo Left and Right               // create servo object to control a servo Up and Down
String data;
char pos;

void setup() {
  Serial.begin(9600);         // opens serial port, sets data rate to 9600 bps
  myservo1.attach(9);        // attaches the servo1 on pin 10        // attaches the servo2 on pin 9
}

void loop() {
  // send data only when you receive data:
  if (Serial.available() > 0) {
    // read the incoming data:
    data = Serial.read();
    pos = data.toInt();
    
    if (pos == 1){
      delay(2000);
       myservo1.write(180);
      delay(500);
      myservo1.write(0);
      delay(500);
       myservo1.write(180);
       delay(500);
        myservo1.write(0);
      delay(500);
       myservo1.write(180);
       delay(500);
   
   
    }  else if (pos == 2) {
      delay(2000);
         myservo1.write(180);
      delay(2000);
      myservo1.write(0);
      delay(2000);
       myservo1.write(180);
       delay(2000);
         myservo1.write(0);
      delay(2000);
       myservo1.write(180);
       delay(2000);
   
    } else if (pos == 3) {
      delay(2000);
       myservo1.write(180);
      delay(1000);
      myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(180);
      delay(1000);
      myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(180);
      delay(1000);
      myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(180);
      delay(1000);
      myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
        
     
    } else if (pos == 4) {
      delay(2000);
       myservo1.write(180);
      delay(1000);
      myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);
       myservo1.write(180);
      delay(1000);
      myservo1.write(0);
      delay(1000);
       myservo1.write(180);
       delay(1000);

    
    
    }
    // print servo position
    Serial.print("Position: ");
    Serial.println(pos);
    delay(100); 
  }else{  myservo1.write(17);}
}

Leave a Reply

%d bloggers like this: