This shows you the differences between two versions of the page.
pm:prj2022:cstan:17 [2022/05/28 00:20] Mihaela.Manciu [Software Design] |
pm:prj2022:cstan:17 [2022/06/02 08:40] (current) Mihaela.Manciu [Software Design] |
||
---|---|---|---|
Line 40: | Line 40: | ||
</note> | </note> | ||
- | } | + | |
===== Software Design ===== | ===== Software Design ===== | ||
Line 46: | Line 46: | ||
<note tip> | <note tip> | ||
Code Description: | Code Description: | ||
+ | - libraries for servo motor and sensors are included | ||
+ | - components' pins are declared | ||
+ | - setup() function: data pin of the servo motor, INPUT pins(ECHO) and OUTPUT pins(TRIGGER) are configured | ||
+ | - loop() function: firstly it verifies if there is any fire inside the trash can(if yes, sends a message), then checks if the trash can is full(if yes, sends a message) and then the servo motor opens the lid if the distance between hand and lid is less than 10 cm. | ||
- | -libraries for servo motor and sensors are included | ||
- | -components' pins are declared | ||
- | - setup() function: data pin of the servo motor, INPUT pins(ECHO) and OUTPUT pins(TRIGGER) are configured | ||
- | - loop() function: firstly verifies if there is any fire inside the trash can(if yes, sends a message), then checks if the trash can is full(if yes, sends a message) and then the servo motor opens the lid if the distance between hand and lid is less than 30 cm. | ||
- | + | * Libraries: DHT sensor library, Servo | |
- | * Libraries: DHT sensor library, Servo | + | * Source Code: {{:pm:prj2022:cstan:code_trash_can.txt|}} |
- | * Source Code: {{:pm:prj2022:cstan:code.txt|}} | + | |
---- | ---- | ||
- | {{:pm:prj2022:cstan:whatsapp_image_2022-05-27_at_11.53.18_pm.jpeg?200|}} | + | **Demo:** https://youtube.com/shorts/nSU-zeMt16w |
- | {{:pm:prj2022:cstan:whatsapp_image_2022-05-27_at_11.53.52_pm.jpeg?200|}} | + | |
+ | {{:pm:prj2022:cstan:pic1_trash_can.jpeg?200|}} {{:pm:prj2022:cstan:pic2_trash_can.jpeg?200|}} | ||
</note> | </note> | ||