Main Content

My first meeting with microcontrollers was a few decades ago (you might remember the first Parallax Basic Stamps) but with the Arduino platform it happened more recently, only 6 years ago and although at that time the development boards were quite difficult to find, even then I found it was a very interesting thing. Later I bought a so-called ‘electronic kit’ with an original Arduino Uno, with LEDs, buttons, some sensors, relay, motor, infrared receiver and many other useful things :) My first installation was a button connected to the Arduino which lit one LED.
Now everything has changed, Arduino has become very cheap, you can find a lot of copies on the Chinese market, the platform allows the connection of hundreds of kinds of sensors, hundreds of kinds of peripherals and with the help of libraries writing programs has become fast and easy. I have advanced quite a lot since the first installation (button plus led) and I would like to present to you in this article one of my last attempts. In this application the main role will belong to the reed switch. The simplest application of this magnetic sensor is like my first Arduino installment, the status of the reed switch is read by a digital input of an Arduino nano and a led (in this case the onboard led) lights up when we bring a magnet closer to the reed switch (see GIF below).

It is beautiful but not very useful, in general we want to do much more than we can do with this simple assembly. So in the following lines of my article I will present a couple of projects based on this application.
However a little theory first about the reed switches…”

Link to article