In the picture that follows I have crimped two Dupont connectors onto the end of the leads for ease of connecting to the Pico. Our reed switch comes as the switch proper which is encased in a plastic mount with flying leads coming off it. Basically it’s a way of connecting an electrical circuit. While this is a pretty cool type of switch, it’s function is the same as a wide range of other switch types from a standard push-button to a lever type to simply pressing two wires together. When it is placed in close enough proximity to a magnet that has enough strength to trigger the required level of actuation, the metal reed bends and the switch is made. The blades are positioned slightly apart in a sealed glass tube. They are typically constructed of two thin, flexible, ferromagnetic metal wires or blades (these are the reason that the switch is called a ‘reed’ switch). Reed switches are type of switch that are actuated via the presence of a magnetic field. You can download it for free (or donate if you wish) from here. I've written this short explanation as part of the much larger book ' Raspberry Pi Pico Tips and Tricks '. Reading the state of a switch is a pretty basic function for a microcontroller, but it’s an action that is worth understanding and we can add a little bit of spice to it by using a switch that is commonly used in security systems and to detect the state of items that need to determine whether they are open or closed (fridges, laptops, washing machines).
0 Comments
Leave a Reply. |