Make the Decision! (Mask Machine)

by vanessa20051214 in Circuits > Arduino

275 Views, 0 Favorites, 0 Comments

Make the Decision! (Mask Machine)

IMG_8679.JPG

In 2020, the COVID-19 spread all over the world, everyone now needs to wear a mask when they go out. Wearing a mask used to be an easy thing to do, but if a mask becomes essentials (just like the clothes you need to wear every day), then the style of mask you choose would be important. However, some of the people who can't choose things wisely would need some help. This mask machine would spend you only 1 second to choose the mask you're going to wear today! The only thing you need to do is to press the button and found the LED that has lighted. This machine would be used for people who had a hard time when they are making decisions about masks every day. (It can also change the mask to different items)!

Swipe down to know more about this project, and you can try to make it by yourself!

It's easy and fun.

Prepare the Materials

開關元件.jpeg
下載.jpeg
80f2b44e1b86ab7dbab2f18ed96900c2.jpeg
1705071222220.jpeg
resis0.5w.jpg
截圖 2021-05-07 上午11.52.31.png
led_AOuhtzYEQe.png
e84db317c16aff220340cc87cf1224b4.jpeg
截圖 2021-05-07 上午11.56.16.png
surgical_mask_still_life-1296x728-header2.jpeg

Arduino button X 1

Arduino wire with female to male X 10

Arduino wire with male and male X 9

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

Mask X 5

A place to charge your USB or a device that has a place to charge USB on it X 1

Set Up for the Uno

截圖 2021-05-07 下午2.36.31.png
IMG_8677.JPG
IMG_8678.JPG

1. Prepare all the materials

2. Put 1 of the wire from + to 5V and put one wire from - to GND

3. Put wire to both of the holes on the button, place the Potentiometer (4.0V) beside the button wire, put one wire to + and another wire on the same role with the Potentiometer.

4. Place another wire at the same role with the button(with the potentiometer) and put another head to D2.

5. Place the LED on the breadboard(I did it with wire because I can put out the LED to another place) and place one side of the potentiometer in the same line with the right head of the LED.

6. Place a wire from another head of the potentiometer and place the wire to -.

7. Place another wire to form the left head of the LED to D7-D11.

8. Repeat steps 5-6 until there are 5 LEDs.

9. Check if you put all the wires in the same place.

10. Place the USB line to the Arduino Uno and change it to a USB hole with energy

Arduino Code

截圖 2021-05-06 下午9.02.19.png

This is the code of this project

https://create.arduino.cc/editor/vanessafang/7eb23...

Code:

int _light ;

void setup(){ // put your setup code here, to run once: pinMode( 2 , INPUT); // sets the digital pin as input 按按鈕 }

void loop(){ // put your main code here, to run repeatedly: _light = random( 7 , 11 ) ;/隨機燈泡發亮 if (digitalRead( 2 )) { pinMode( _light , OUTPUT); // sets the digital pin as output digitalWrite( _light , HIGH ); // sets the digital pin on/off delay( 1000 ); // waits a few milliseconds } digitalWrite( _light , LOW ); // sets the digital pin on/off }

Step 4: Test and Decoration

IMG 8681
IMG 8680
IMG 9198

After you finish making your Arduino project, you can decorate your box.

These are the video of my project.