TINKER PIEDESIGN IN INDIA

Reed switch (magnet) with TinkerPie

Put the magnet on a door and the switch on the frame: door alarms.

TypeDigital sensors
Connect toany accessory pin (switch to GND)
Givestrue when a magnet is near
SimulatorYes: a control appears under the simulated board

How to wire it

Signal (DO / OUT / S) to any accessory pin: S1-S4, P10-P13, P43 or P44. Power from 3.3 V where the module allows it.

Code

In blocks: Accessories category in TinkerPie Studio. As code:

// JavaScript
sensors.reedSwitch(Pin.S1)

// Arduino C++
sensors::reedSwitch(Pin::S1)

Projects with the Reed switch (magnet)

Door alarmA reed switch and a magnet on the door: a tick while it is closed, an alarm when it opens.Sensor projects

Similar modules