Decision Machine
Some people can't decide their outfits when they're hanging out with friends because they may have serious choosing barriers, so I make a decision machine to let the people who have to choose barriers can easily decide what to wear the next day. To use the decision machine you just need to press the bottom and look at which Led has lighted. ( Except for the outfit, the decision machine can also use it on another item.)
Source of inspiration: https://www.instructables.com/Make-the-Decision-Mask-Machine/
Supplies
Arduino button X 1
Arduino wire with male to male X 10
Arduino LED X 5
Arduino Uno X 1
Arduino Breadboard X 1
Arduino USB line X 1
Arduino Potentiometer 2.6V X 5
Arduino Potentiometer 4.0V X 1
Clothes X 5
A place to charge your USB or a device that has a place to charge USB on it X 1
Step 1: Prepare the Materials That You Will Need.
Arduino button X 1
Arduino wire with male and male X 10
Arduino LED X 5
Arduino Uno X 1
Arduino Breadboard X 1
Arduino USB line X 1
Arduino Potentiometer 2.6V X 5
Arduino Potentiometer 4.0V X 1
Clothes X 5
A place to charge your USB or a device that has a place to charge USB on it X 1
Step 2: Set Up for the Uno
Step 3: Set Up the Arduino Code
Code:
int _light ;
void setup(){ // put your setup code here, to run once: pinMode( 2 , INPUT); // sets the digital pin as input pinMode( _light , OUTPUT); // sets the digital pin as output pinMode( 7 , OUTPUT); // sets the digital pin as output pinMode( 8 , OUTPUT); // sets the digital pin as output pinMode( 9 , OUTPUT); // sets the digital pin as output pinMode( 10 , OUTPUT); // sets the digital pin as output pinMode( 11 , OUTPUT); // sets the digital pin as output pinMode( 12 , OUTPUT); // sets the digital pin as output _light = 1 ;
}
void loop(){ // put your main code here, to run repeatedly: _light = random( 7 , 12 ) ; if (digitalRead( 2 )) { digitalWrite( _light , HIGH ); // sets the digital pin on/off delay(500); digitalWrite(_light, LOW); } }