Lipstick Decider
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
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 }
------------------------------------------------------------------------------------------------------------------------------------------------------
Downloads
Cut the Cardboard Out!
Step4: Put Them Together!
Done!!!