Foot-Operated Door Opener
Having second thoughts about opening the door after you wash your hands? This foot-operated door opener will let you open the door without using your hands. So you can avoid germs and prevent cross contamination. Stay safe!
This project is originally published in micro:bit Magazine Issue 08, a quarterly publication by CLASSROOM
YOU WILL NEED
- 1 x BBC Micro:bit
- 1 x Sensor:bit
- 1 x Battery holder
- 1 x Crash sensor
- 1 x 180 servo
STEP 1
Connecting the components
• Connect Crash sensor to PIN 1
• Connect micro servo motor to PIN 2
• Plug in micro:bit battery case to the micro:bit
STEP 2
Making
• Use wooden sticks to make door frame
STEP 3
Making
Add 180 servo on top of the door frame
STEP 4
Making
Install door
STEP 5
Making
Connect crash sensor and servo to sensor:bit
STEP 6
Add smarthome extension
• Select extensions to add ‘smarthome’ package
• Type ‘smarthome’ to search the extensions
• Select ‘smarthome’ to add
STEP 7
Coding
• Drag ‘on start’ block from Basic
• Then drag ‘Setup crash sensor at pin 1’ from Smarthome
• And drag ‘Servo write pin 2 to 0’ from Pins
STEP 8
Coding
• The aim is to open the door when the crash sensor was pressed. So ‘crash sensor pressed’ is the judgement condition. In that way, we need to drag a ‘if’ black from Logic into ‘forever’ block from Basic
• Then set ‘Crash sensor pressed’ as the condition. If the crash sensor pressed, then run the action
STEP 9
Coding
• ‘Servo write pin 2 to 90’ means opening the door, after 3 seconds.
• ‘Servo write pin 2 to 0’ means closing the door
STEP 10
Download the hex file into the micro:bit and try your foot operated door opener
Downloads: microbit-MM8_P13_FootOperatedDoorOpener.hex
Code and References
Made this activity? Good Job! Now spread the word. Share a photo of your creation on social media with #letsgethacking #Foot-OperatedDoorOpener