New answers tagged

1

I don't know the complete answer to all of your questions, so this is a partial answer. Q1: Is the shutdown initiated with connecting the GPIO3 pin and the GND pin considered a safe shutdown? I recall hearing of issues associated with using GPIO for shutdown, but some recent information suggests that this feature works as it should if the system is ...


0

The operation is explained in /boot/overlays/README It is quite safe, I have it on all my Pi in case I need to shutdown a headless Pi (or one without keyboard attached), although my Pi are rarely shutdown, unless I am adding hardware. I use dtoverlay=gpio-shutdown,gpio_pin=21 so I can shutdown by bridging pins 39/40 Name: gpio-shutdown Info: Initiates a ...


1

Don't run as a limited user. Need to run the script as root or the default Pi account and all is right with the world again.


1

You could use a ATA box that convert the fax (Analog telephony) to SIP (aka VoIP, Voice Over IP). From there on, is another topic.


2

If you are signalling a voltage level between two devices they need to have a common voltage reference. Connect the grounds of the two Pis.


1

Tri-state output circuitry as used for most computer busses can be set Low, High or HiZ. In fact many circuits actually have 4 states as they can be set as Inputs. The state of a bus (consisting of a set of grouped pins) is typically controlled by one or more enable pins. The GPIO has no similar setting; Outputs can be Low or High; they can alternatively be ...


0

I am using motors with similar properties (14v aldi drill motors with a stall current over 10A) and am using the thunderborg motor driver for 5A motors. Unless you do silly things (I have done that .. twice :-/) The piborg motor drivers are amazingly robust, with over not just a thermal cut-out, but they reset themselves afterward. The result is that if ...


2

The actual answer is it depends. If you specify in more detail exactly what you intend to connect we can give you a better estimate of the probability that you will destroy the Pi or GPIO, but no one can give a definite answer because this puts the SOC into an indeterminate state. This can cause catastrophic chip failure, a simple GPIO failure, a latch up ...


3

Applying 5V to a Pi GPIO will destroy the GPIO and the Pi (the Pi may not die immediately, it might take days to cascade the failure through the silicon). There is a caveat, the Pi/GPIO may survive if the current is very limited, perhaps a few microamps.


1

Following code worked for me. Prettey the same version as by "joshuar500", but with callback using: def setup(): GPIO.add_event_detect(button, GPIO.RISING, callback=button_callback, bouncetime=500) # Setup event pin "button" rising edge def button_callback(channel): sleep(0.1) GPIO....


1

If you search you will find several tutorials on creating a magic mirror using a Pi. The MagPi magazine has published a couple and there are projects on the Foundation website. e.g. https://www.raspberrypi.org/blog/build-a-magic-mirror-in-issue-54-of-the-magpi/ These have full instructions.


1

The buttons need connecting to a GPIO and either a 3V3 pin or ground. Ground is probably a more usual choice. The LEDs need a resistor. Without a resistor they will consume as much current as they can and will burn out with a bright flash. A few LEDs have built-in resistors. This should be made quite clear when you buy them. Otherwise assume you need a ...


2

The documentation states i2c_vc Set to "on" to enable the i2c interface usually reserved for the VideoCore processor (default "off") The 2nd I²C interface is reserved for HATs (and also probably used for GPIO extension - although this is undocumented)...


2

Any GPIO library will let you test the levels of the GPIO. One method using my pigpio library and the pigs utility. # start the pigpio daemon sudo pigpiod # read GPIO 2 to 27 for ((i=2; i<28; i++)); do echo "GPIO $i is"; pigs r $i; done


5

Short answer YES. The GPS module uses Serial = Yes you can do that with a Raspberry Pi https://www.raspberrypi.org/documentation/configuration/uart.md The RFID module uses SPI = Yes you can do that with a Raspberry Pi https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md And for the question about "How", there are a ton of ...


1

Try http://abyz.me.uk/rpi/pigpio/examples.html#Python_rotary_encoder_py If it doesn't work your connections or hardware is faulty.


1

The solution was a combination of a few things: Use pigpiod* Use the wave_add_generic method (thank you @joan) Check your signal via oscilloscope if possible. In my case I additionally had to scale my edge times by 0.5, because the signal I sent was too long for the AC Unit to understand. So the edge times used in Python had to be half as high as the ones ...


2

pigpio is a poor choice for the method you are using (i.e. using the write() method). The pigpio Python module is implemented with a client server model. The client being the pigpio Python script and the server being the pigpio daemon. Each GPIO write requires a message travelling to and from the pigpio daemon. That in itself can take half a millisecond. ...


1

Security is a complex subject, and I believe RPI.SE is not the right place to receive lecture on security. If this is the first time you touch security, you're overwhelmingly likely to hurt yourself by mistake. You may meet people with better knowledge on Security.SE and Crypto.SE, but they can't build a full solution on their own. I recommend OWASP ...


2

You can use ssh to connect to the RasPi and do your things. You can also use it as an ssh tunnel so you can use graphical user interfaces on the remote management computer to execute programs. Instead of an ssh tunnel you can also use a virtual private network using wireguard or OpenVPN. With the latter you are also able to have a bridged connection (with ...


1

Rather that starting and stopping the Python script for every picture, you really want a long running Python program, probably set up as a Linux service that autostarts at boot time, that monitors the gpio pins your buttons are attached to with interrupts that trigger functions in your program to do exactly what you want.


1

It would be possible to write a bash script but inefficient and poor practice. Especially as you are using python just install gpiozero and use one (or several ) of the Button callbacks in your python script.


2

There is more than one type of motor driver board using the L298N. The typical board has two voltage inputs and a common ground. One voltage input is to drive the motors. The other voltage input is to provide logic power to the module. Typically the board has a jumper which can be fitted to supply logic power from the motor supply. If that is fitted DO NOT ...


3

6V motors usually work fine with 5V (other than the fact that they run at 80%..85% of it max speed). However, powering a motor from the Pi is only possible for very small motors, which have stall current that the Pi can provide without a significant voltage drop. Even toy motors are often rated for 2A stall current or more, which can easily reboot the Pi ...


Top 50 recent answers are included