Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
usage of gpio by another program
#1
Question 
Hi all,

Does anyone know if it is possible to use raspi3 gpio pins which are not in use by SIP (if there are any) by another program?

Background; SIP is running on my raspi3 which is located in a shed in the back of the garden. The shed has a few doors of which one of them is on the public road. I would like to create small alarm system through some basic python code to read a few magnetic sensors on the doors. These sensors are preferably connected to a few gpio pins on the raspi.

Any help on this is welcome.

Thanks in advance,
Gerard
Reply
#2
As long as SIP is running in the background you should be able to run another program at the same time. Any GPIO pins that are not connected to the sprinkler system can be used by the other program.
Reply
#3
Thanks Dan,
I'm already did some testing but when I init/set a gpio port before starting SIP the relay board will not be initialized. Maybe I did use a port which was in use by SIP but I don't use the port to connect something to it. Looking at gpio_pins.py the rain sensor en relay ports should also not be used for other purposes. I wander id there are more ports kind a reserved for SIP.

I will give it another try.
--Gerard
Reply
#4
The GPIO pins listed in gpio_pins.py are the only ones used by SIP. You should probably have SIP set up to start automatically before you other program. This will have SIP running in the background and the other program should not interfere with it.

If you start SIP from the command line you can add "&" (without the "") to the command to have SIP run in the background. for example:
python sip.py &
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)