Can anyo one Help me for Doorlock Solenoid using Raspberry pi B+

can anyone help me on this code thnx ...

piborg's picture

No problem, we can give you a hand.

If you could answer a couple of questions it will help with figuring out what code is required:

  1. Do you have any details about the solenoid itself?
  2. How are you connecting the solenoid to the Raspberry Pi?

Doorlock solenoid control

1. my SOLENOID here where using is 12v. and having a 2 wire of red and black which i dont know if this is possitive and negative

2. the solenoid connects to relay module and the other wire for solenoid is for the power supply which is adaptor and the relay connects to RPI B+

1. my SOLENOID here where using is 12v. and having a 2 wire of red and black which i dont know if this is possitive and negative

2. the solenoid connects to relay module and the other wire for solenoid is for the power supply which is adaptor and the relay connects to RPI B+

piborg's picture

So is the solenoid is already connected to the relay module?

If the relay module is already connected to the GPIO header on the Raspberry Pi you should be able to turn the pin on and off to move the solenoid.

You can figure out which GPIO pin you are using with this diagram: http://pinout.xyz/

You can then use this simple example as a guide to change the pin between on and off: https://www.raspberrypi.org/blog/gpio-zero-a-friendly-python-api-for-phy...

If you already have something connected to the Raspberry Pi, can you say where, exactly? To one of the pins on the GPIO connector? If so, which one?

Best wishes
Kevin

Subscribe to Comments for "Can anyo one Help me for  Doorlock Solenoid using Raspberry pi B+"