A button placed on the breadboard and when pressed by either the Fortune Teller or the person having their fortune read, the preprogrammed Arduino code allows the fan on the DC Motor to spin for about 10 to 15 seconds. Attached to the fan are three coins. The Crying Eye, which represents failure. The Rose which represents money. And lastly, the wine cup which represents happiness. There is also a circular based at the bottom with three leaf-designed. Each leaf has a Roman numeral from 1 to 3. The person having their fortune read has to assign a wish or a prediction to each leaf. Depending on what coin lands where determines their future. Or, if the coins don’t align with the three leaves, then the fortune is inconclusive or if the person likes, they can wait for the coins to spin again and land on a proper leaf.
The art has been drawn by me in Adobe Illustrator. Then, laser cut into their specific shapes and glued together. A fan has had each coin, (that has been glued to a stick) taped to its individual wing. Then, the DC Motor is placed through a hole in the bottom base—the base being propped up by a Cuban coffee cup—and the fan attached. Allowing it to spin above the base.
Sketch
Schematic
Pictures

Video Demonstration

Code
//www.elegoo.com
//2016.12.12
/************************
Exercise the motor using
the L293D chip
************************/
#define ENABLE 5
#define DIRA 3
#define DIRB 4
int i;
void setup() {
//---set pin direction
pinMode(ENABLE,OUTPUT);
pinMode(DIRA,OUTPUT);
pinMode(DIRB,OUTPUT);
Serial.begin(9600);
}
void loop() {
// RUN MOTOR for 10 SECONDS TOTAL
digitalWrite(ENABLE, HIGH);
digitalWrite(DIRA, HIGH);
digitalWrite(DIRB, LOW);
delay(5000); // run 5 seconds
digitalWrite(DIRA, LOW);
digitalWrite(DIRB, HIGH);
delay(5000); // run 5 seconds
// TOP MOTOR FOR 15 SECONDS
digitalWrite(ENABLE, LOW); // stop motor
Serial.println("Motor stopped");
delay(15000); // stay stopped 15 seconds
}





No comments:
Post a Comment
Note: Only a member of this blog may post a comment.