This shows you the differences between two versions of the page.
pm:prj2022:cstan:17 [2022/06/02 08:16] 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. |
Line 56: | Line 56: | ||
---- | ---- | ||
- | Demo: https://youtube.com/shorts/nSU-zeMt16w | + | **Demo:** https://youtube.com/shorts/nSU-zeMt16w |
- | {{:pm:prj2022:cstan:pic1_trash_can.jpeg?200|}} | + | {{:pm:prj2022:cstan:pic1_trash_can.jpeg?200|}} {{:pm:prj2022:cstan:pic2_trash_can.jpeg?200|}} |
- | {{:pm:prj2022:cstan:pic2_trash_can.jpeg?200|}} | + | |
</note> | </note> | ||