Lipstick Decider

by dorisecake in Circuits > Arduino

105 Views, 0 Favorites, 0 Comments

Lipstick Decider

20210511_082145.jpg

GIrls/ Women often have problems picking lipsticks for different situations, while all of the colors look fabulous. So, this device is going to help you choose the lipstick you're going to use today!

P.S the video is presenting the use of this device several times, if normal use, it will only rotate once every time.

Supplies

  • Step motor x1
  • D pin wires x6
  • Arduino board x1
  • Breadboard x1
  • Cardboard x1
  • Double-sided tape

Wiring

螢幕擷取畫面 2021-05-11 010918.jpg

Follow the picture's wiring.

Coding

Copy and Paste the code here or just download the file and dump it to arduino.

------------------------------------------------------------------------------------------------------------------------------------------------------

//step motor function

void StepMotor(int MotorStep,int MotorSpeed,int pinNumberA, int pinNumberB,int pinNumberC,int pinNumberD) { pinMode(pinNumberA, OUTPUT); pinMode(pinNumberB, OUTPUT); pinMode(pinNumberC, OUTPUT); pinMode(pinNumberD, OUTPUT); for(int i=0;i

void setup(){ // put your setup code here, to run once: }

void loop(){ // put your main code here, to run repeatedly: StepMotor(256, 3, 2, 3, 4, 5); //step motor function delay( 2000 ); // waits a few milliseconds StepMotor(130, 3, 5, 4, 3, 2); //step motor function delay( 2000 ); // waits a few milliseconds StepMotor(300, 3, 5, 4, 3, 2); //step motor function delay( 2000 ); // waits a few milliseconds StepMotor(100, 3, 5, 4, 3, 2); //step motor function delay( 2000 ); // waits a few milliseconds }

------------------------------------------------------------------------------------------------------------------------------------------------------

Cut the Cardboard Out!

v4-460px-Cut-a-Circle-Out-of-Cardboard-Step-11.jpg.jpg

Step4: Put Them Together!

Done!!!