New answers tagged

0

http://www.embeddedpi.com/documentation/gpio/mypi-industrial-raspberry-pi-psu-shutdown-gpio-line This gives a bit more info shame you can not toggle it the other way


1

make sure you enable Remote gpio from Application Menu > Preferences > Raspberry Pi Configuration > Interfaces > Enable Remote GPIO


1

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 ...


0

I was having the same issue using python, Executing shell script in PHP, etc. So the solution is: Application Menu > Preferences > Raspberry Pi Configuration > Interfaces > Enable Remote GPIO.


0

I think the question is essentially unanswerable without experiment. The quickest way to find the answer is by soldering the leads and testing the display.


1

I simply used 7 0 * * * gpio write 0 0 as my crontab "command"


2

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 ...


2

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.


1

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 ...


2

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 ...


3

Most relays are Active LOW - the relay is ON when the input is LOW and OFF when the input is HIGH. The specification for your relay board should state this.


2

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.


2

On the first RPi : In a first terminal : (create FIFO) mkfifo /tmp/audio.fifo.pi1 In a second terminal : (Write datas into FIFO) arecord /tmp/audio.fifo.pi1 readfifo-writeUART.py : pyserial short-intro #!/usr/bin/python # readfifo-writeUART.py import serial def do_work(data): with serial.Serial() as ser: ser.baudrate = 19200 ser....


1

Should control this with wiringPi instead of ? sudo apt-get install wiringPi gpio readall


2

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.


0

See my answer to another question here regarding the use of an interposing relay. In the answer I posted I made mention to use a pull down resistor, and a current limiting resistor in series with the GPIO. This would look something like this. simulate this circuit – Schematic created using CircuitLab R2 serves to limit the current going to the ...


1

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 ...


0

Your question can not be answered in a useful way because you have not given enough basic information. Specifically, you've not stated what the "signal" is between the thermostat and the heater. For example, is the "signal" a contact closure via mercury switch inside the thermostat? Or, is it, as some have guessed, an "active signal" of 24v, or even mains/ac ...


2

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 ...


1

In the second section of code: gpioConfig=[19] so i=19 j=1 and never increments newState=statuses['gpio1'] which gives 1 As newState == 1, GPIO 19 is only every set to HIGH


0

Update 2020jan12hkt2102 I read the program a second time and found the following things: (1) This statement: _thread.start_new_thread(updateGPIOstatuses, pins,)) seems to call function "updateGPIOstatuses()" with two arguments "gpioCheckerInterval" and "pins". I guess "pins" means a list of GPIO pin numbers, eg 19, 8, 3, etc. But ...


0

I bought a SMAKN Dc/dc converter to step down the 12v to 3.3v DO NOT do this! These devices are for converting power NOT logic levels! You could use a voltage divider provided the circuits share a common ground. I would NOT directly connect a foreign voltage source to a Pi (or any other logic circuit) without protection. NOTE you do NOT need 3.3V - ...


0

If you know the voltage (is it always 12V or is it sometimes 14V) you could have used a pair of suitable resistors as a voltage divider. As long a your DC converter or whatever circuit you end up using constrains the voltage at the Pi to 3V3 or less you will be fine. In any case I don't see how you could damage your alarm by tapping its 12V output (unless ...


3

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). #!/usr/bin/python3 import RPi.GPIO as g from time import sleep g.setmode(g....


1

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.


3

No. All the Pi GPIO are 3V3 (and can only supply about 20 milliamps).


4

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 ...


1

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 ...


1

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.


1

Although WiringPi is discontinued there is an unofficial patch: https://github.com/neuralassembly/raspi/blob/master/wp-pi4.patch It worked great on my RaspberryPi4 after that.


0

Yes it is perfectly safe - this is recommended practice. Virtually all external devices (including HATs) will have similar capacitors. It will have no detectable impact on the Pi.


0

Here is some working code which waits for a sysfs interrupt. Please note the preconditions assumed by the code which are noted in the comments. As an aside please note that the sysfs interface is deprecated and has been removed from some Linux kernels. If you are writing a new library I suggest you use the /dev/gpiochip interface instead. /* 2014-07-06 ...


Top 50 recent answers are included