12V pump will require 12V PSU. 20LPM is a pretty reasonable flow rate for a small pump so your pump PSU will need to have enough power to drive the pump - check the max current draw on startup (which will be higher than the running power draw) and size the PSU accordingly.
Check the contact handling voltage/current for your relays.
"5V" relays (as ...
Move the code that reads the log into your while True: loop. Don't start a new while True: for each LED as it will never terminate.
Now that I'm home and have had a chance to look at this deeper (with a Raspberry Pi to test it on) I've re-written it to use RPi.GPIO (which works).
import RPi.GPIO as g
from time import sleep
You need to use an interposing relay. This is simply a mechanical or solid state relay that has a 12Vdc coil and at least one contact (typically a form C contact, aka single pole double throw). Wire 3.3Vdc from your Pi to one side of the contact and the other to a GPIO input. Ensure you use a pull down resistor with the relay contact and a current ...
Only GPIO the sysfs has been asked to control will be listed in /sys/class/gpio.
The GPIO not mentioned (i.e. other GPIO in the range 0-27) are not being controlled by sysfs.
Without knowing details of the operation of the OnOffShim we can't say if the absence of GPIO 4/17 is significant or not.
On the first RPi :
In a first terminal : (create FIFO)
In a second terminal : (Write datas into FIFO)
readfifo-writeUART.py : pyserial short-intro
with serial.Serial() as ser:
ser.baudrate = 19200
All the advice I have seen says no. Use the Pi's power supply via the microUSB or use your own power supply via the 5V and ground pins. If you use both they will "fight" with each other and cause problems.
Why not power your external kit with the external 5V supply? You can still share the grounds if the external kit has logic which needs controlling ...
Yes, as long as the signal is 3V3 compatible.
You could use the Pi's UART RX pin (pin 10, GPIO 15) and the standard Linux serial software. That will handle standard baud rates (say up to 1 Mbps).
Alternatively you can use a general GPIO (any other GPIO on the extension header) and software serial. That should be good up to 19k2 bps or so.
On all Pis with the 40 pin expansion header pin 29 is connected to GPIO 5.
GPIO 5 defaults to a pull-up at power up.
The pulls are quite weak (about 50k ohms) so they can easily be overridden by an external voltage.
The table you linked shows GPIO 5 as defaulting to pull-up.
GPIO 28/29 are not brought out to the 40-pin expansion header.
Pin 1 is 3.3V power, and can supply up to 800mA (although it is inadvisable to connect a pump to the supply - particularly without any protection).
Pin 3 is a GPIO - if programmed as an output it can supply a maximum of 16mA. By default it will supply ~2mA (because it has a 1.8kΩ pullup) - neither is capable of running any kind of motor. Also connecting any ...
DO NOT connect a "variable power supply" to the Pi! Most (laboratory grade supplies excepted) are poorly regulated.
DEFINITELY DO NOT connect any power supply to the 5V rail of a powered Pi. (It is acceptable to power the Pi through the Header pins - provided the power supply meets the Foundation recommendations.) Your confusion between series/parallel is a ...
pigpio will probably let you do what you want using waves.
The following command line example uses pigs to set GPIO 4 high for 7 seconds.
pigs m 4 w # set GPIO 4 to mode output
pigs wvag 16 0 7000000 0 16 0 # wave to switch GPIO 4 high for 7 seconds, then off
pigs wvcre # create wave (should return wave 0)
pigs wvtx 0 ...
If unconfigured GPIO pins are Inputs, so safe for a logic input 0 - 3.3V
If Output and opposite voltage is applied they can be damaged - which is why you should use a series resistor to limit current to a safe level.
If you only connect to header pins with the power off and/or use insulated dupont connectors there is no problem.
If you aren't using the power pins just put an insulated connector on the power pins. There is little risk using the actual GPIO pins (you have to connect 2 outputs of different levels), but even there connect with the power off.
Most people ...
The Pi's 3V3 (pins 1/17) and 5V (pins 2/4) pins are NOT GPIO, they are part of the power supply rails.
If you connect the 5V power supply rail to the 3V3 power supply rail you will destroy the Pi. There is no protection.
I was having the same issue using python, Executing shell script in PHP etc
so the solution is Enable python scripts on apache 2 using this guide: https://www.server-world.info/en/note?os=Debian_9&p=httpd&f=5
then go to:
Application Menu > Preferences > Raspberry Pi Configuration > Interfaces > Enable Remote GPIO
And then type the address to the ...