.. note:: Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts. **Why Join?** - **Expert Support**: Solve post-sale issues and technical challenges with help from our community and team. - **Learn & Share**: Exchange tips and tutorials to enhance your skills. - **Exclusive Previews**: Get early access to new product announcements and sneak peeks. - **Special Discounts**: Enjoy exclusive discounts on our newest products. - **Festive Promotions and Giveaways**: Take part in giveaways and holiday promotions. 👉 Ready to explore and create with us? Click [|link_sf_facebook|] and join today! .. _ar_touch: 2.18 Touch Switch Module ======================== Overview ------------ In this lesson, you will learn about touch switch module. It can replace the traditional kinds of switch with these advantages: convenient operation, fine touch sense, precise control and least mechanical wear. Components Required ------------------------ .. image:: img/Part_two_18.png * :ref:`cpn_mega2560` * :ref:`cpn_wires` * :ref:`cpn_touch` Fritzing Circuit -------------------- In this example, pin 2 is used to read the signal of Touch Switch Module. .. image:: img/image170.png :align: center Schematic Diagram ----------------------- .. image:: img/image171.png :align: center Code --------- .. note:: * You can open the file ``2.18_touchSwitch.ino`` under the path of ``sunfounder_vincent_kit_for_arduino\code\2.18_touchSwitch`` directly. * Or copy this code into Arduino IDE. .. raw:: html Uploaded the codes to the Mega2560 board, you can see the readings of pins displaying on the serial monitor. When your finger tip touches the Touch switch module, 「1」will be displayed on the serial monitor; and when you remove your finger, 「0」 will be be displayed. As for the detailed code explanation, you need to turn to :ref:`ar_digital_read`. Phenomenon Picture ------------------------ .. image:: img/image172.jpeg :height: 4.74167in