This shows you the differences between two versions of the page.
pm:prj2022:cstan:17 [2022/05/28 00:22] 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 49: | Line 49: | ||
- components' pins are declared | - components' pins are declared | ||
- setup() function: data pin of the servo motor, INPUT pins(ECHO) and OUTPUT pins(TRIGGER) are configured | - 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. | + | - 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: DHT sensor library, Servo | * Libraries: DHT sensor library, Servo | ||
- | * Source Code: {{:pm:prj2022:cstan:code.txt|}} | + | * Source Code: {{:pm:prj2022:cstan:code_trash_can.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> | ||