How to connect Magnetic contact to Raspberry Pi

1.Step – Configuration GPIO Pins.
  • Log-in to your R PIHome+
  • Go to the Settings tab =>GPIO Input/Output settings
  • Select a free GPIO pin, set:
    • function = Digital Input
    • home = select if you wish to display the input  on home page
    • name

and Save settings.

connect magnetic contact to raspberry pi, Input Settings R PiHome+
Input Settings R PiHome+

 

2.Step – Connect Magnetic contact to Raspberry PI.
  • Connect 1.terminal of the magnetic contac with GND pin of the Raspberry PI
  • Connect 2.terminal of the magnetic contact with GPIO pins, which you set in GPIO configuration page of the R PIHome.

connect magnetic contact to raspberry pi
Magnetic contact & Raspberry Pi – Connecting diagrem

 

Leave a Reply