Students are able to understand the function of touch sensors by building their own touch sensors.
Students are able to program touch sensors to control micro: bit and external components, such as LEDs, servo motors and so on.
Students are able to produce a project of a cow wagging its tail when its horns are touched.
Materials needed to follow this video:
micro: bit + USB wire + power supply + 5 alligator clips
Computer
Visit makecode.microbit.org
Aluminum foil + cardboard + blu-tack
Transcript
Move the cow’s tail when the cow’s horn is held
Add an LED to the cow’s eye and turn on the LED when the cow’s tail moves after the horn is held
Move the cow’s tail when the cow’s horn is held
Add an LED to the cow’s eye and turn on the LED when the cow’s tail moves after the horn is held
👉CLICK HERE👈 to try it on makecode.
Ways to build code.
End product.
The touch sensor detects if it is touched.
Hands can act as conductors. They can allow the electric current to flow from pin P0 to GND (complete circuit). The change in resistance when our fingers touch pin P0 and GND make micro:bit a resistive touch sensor.
Resistive touch sensors require you to complete the circuit by touching both pin and GND while capacitive touch sensors work like your phone screen - just by touching one surface point.
What are the appropriate materials to connect to pin P0, P1 or P2 so that they could be used as a touch sensor?
Although the methods are different, the function of the two methods above is the same. In the world of programming, we will find different programming methods that are providing the same outcome to the same problem. The world of programming does not rely on one definitive solution. The efficacy of your code depends on its length and effectiveness.