Page 149 - KEC Khaitan C6 Flipbook
P. 149

6.  Connect the Components:

                         Ultrasonic Sensor:
                         ◦    Trig pin Æ Micro:bit P0.

                         ◦      Echo pin Æ Micro:bit P1.
                         ◦      VCC Æ Micro:bit 3V.

                         ◦      GND Æ Micro:bit GND.

                         Servo Motor:
                         ◦      Signal Æ Micro:bit P2.

                         ◦      VCC Æ Micro:bit 3V.
                         ◦      GND Æ	Micro:bit GND.

                         WiFi Module (Optional):

                         ◦     Connect to Micro:bit via UART (P13 for TX, P14 for RX)

                 7.  Test the Dustbin:
                         Power the Micro:bit using a battery pack.

                         Place your hand or an object near the ultrasonic sensor:
                         ◦     The lid should open when the object is detected.

                         ◦     The lid should close after a short delay.

                 8.  Final Touches:

                         Decorate the dustbin to make it visually appealing.
                         Secure all components with tape or glue.

                         Test multiple scenarios to ensure reliability.


                 Sample Image:






























                                                                              Building Smart Solutions: An Introduction  147
   144   145   146   147   148   149   150   151   152   153   154