parmar7725274
parmar7725274

Reputation: 243

Interfacing Reed switch with beaglebone Black

I have a BeagleBone Black and Reed switch. Linux 14.04 is running on BeagleBone Black.

I want to interface this reed-switch with BeagleBone Black means How I can interface Reed-switch with Beaglebone black so that I can read it's status Using C program. I'm a new bee to hardware and don't know how to interface it. Any one have idea/suggestion ?

Basically, Using this I want to detect door is closed or open. :)

Upvotes: 1

Views: 260

Answers (1)

Mahendra Gunawardena
Mahendra Gunawardena

Reputation: 1976

  1. Configure a GPIO pin as input.
  2. You will need a hardware interface circuit between the GPIO pin and the reed switch
  3. Poll the GPIO pin for High or Low
  4. Perform the intended action based on reed switch output.

HTH

Upvotes: 0

Related Questions