Off-task Machine

by BryanHsu7201 in Circuits > Arduino

235 Views, 1 Favorites, 0 Comments

Off-task Machine

IMG-0537.jpg

People often get caught of being off-task at home by parents or school by the teachers because you do not react fast enough to close the window or app you are using and be punished for being off-task, but with this machine, there will be no more this kind of issue. This off-task machine uses an Ultrasonic sensor to detect there is a person close to you within 30 centimeters, and if it detects that there is a person there, it will automatically press Alt+Space+C to close the window or the app you are using.

Supplies

Arduino Leonardo

Ultrasonic Sensor

5 Wire (1 Dupont wire with male to male and 4 Dupont wire with male to female)

Build Up Your Off-task Machine

IMG-0535.jpg
IMG-0536.jpg
IMG-0537.jpg
Arduino project semster 2 do bad thing circuit.png

First, you connect the D4 to GND with the male to male Dupont wire so that your Arduino can control your computer's keyboard and mouse.

Second, you connect the Ultrasonic sensor with the 4 male to female Dupont wire to your Arduino board. You connect Vcc to 5V, Trig to D8, Echo to D7, and GND to GND.

Then, you get your model of Off-task Machine, what you should do next is to import the code.

Import the Code

Semester 2 project ardublock.png

Video