Skip to main content
5 votes
Accepted

How to set a GPIO pin to default HIGH before setting it to output?

As suggested by anonymoose's comment and RPi.GPIO's documentation RPi.GPIO module basics setting a pin to output allows to specify an initial value: To set up a channel as an output: GPIO.setup(...
4 votes
Accepted

How to turn off pin 23 correctly? SSH connection crashed

Assuming your SSH session is restored, otherwise reboot ... On the standard terminal command line: gpio -g mode 23 out gpio -g write 23 0 From Python: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) ...
John Hawthorne's user avatar
4 votes
Accepted

Why is pull up resistor preferred over pull down for the matrix keypad?

In general the reason electronic engineers prefer pull-ups to pull-downs is that in silicon N type (NPN bipolar or N-channel FET) transistors are better than P type transistors (PNP bipolar or P ...
Peter Green's user avatar
  • 6,585
4 votes
Accepted

Control fan to lower temperatur via script

The following answer addresses a Hardware and Software approach, and an Easier alternative requiring only hardware & a configuration change. This project may be of interest. The author uses a ...
Seamus's user avatar
  • 22.8k
3 votes
Accepted

Use Pi 3 B as external memory

No, you can't. Only Raspberry Pi Zero (W) and the Compute Module support the USB gadget mode that enables the emulation of a USB mass storage device while the USB ethernet gadget seems to work best. ...
kwasmich's user avatar
  • 2,702
3 votes
Accepted

I2S Recording combined with I2S Playback

I was also getting the same error. But now it is working for me. First you install I2S microphone as shown here: https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/raspberry-pi-wiring-...
Keshava Shreenidhi Badanaje's user avatar
3 votes

No display output if I start raspberry pi and then start the monitor

I had the exact same problem. Solutions are: Turn on the screen first. I give it 4 seconds. Slower SD cards won't have this problem, since the Pi waits longer before checking for a monitor. Add/...
Botspot's user avatar
  • 1,809
2 votes
Accepted

How do I attach two monitors in a dual head configuration?

Well, now the Raspberry Pi 4 model B has come out with two Micro HDMI ports, so I think that gives the best solution to the problem? If you don't want a Pi 4, it seems that buying two Pis may still ...
Metamorphic's user avatar
2 votes

No video on HDMI?

In config.txt comment out #dtoverlay=vc4-fkms-v3d this started my system to work. I think only one hdmi output works but I do not care. It has a problem finding which video to use and some people ...
john's user avatar
  • 21
2 votes

Why is my audio (sound) output not working?

I was having problems with the analog audio output myself. Came to this thread among others to try to solve. In the end, it turns out I only needed to right-click on the audio icon in my toolbar and ...
Alex Skarulis's user avatar
2 votes
Accepted

Can I make a GPIO into a 3v output?

Yes, change the GPIO to mode OUTPUT and write 1 (high). The GPIO will then output 3V3 relative to ground. Note that the GPIO will only safely supply about 16mA. I should say that a better solution ...
joan's user avatar
  • 71.6k
2 votes
Accepted

Speeding up updating of GPIO pins

Have you looked at the source for pigpio? Or programmed a microcontroller that required you to access pins at the hardware level? I'll explain why I ask this in a few lines. If you're running this ...
NomadMaker's user avatar
  • 1,560
2 votes

GPIO ports not working

There appear to be two possibilities. something is connected to GPIO 24 and GPIO 25 which is pulling those GPIO low. The Pi is broken. I suggest you remove everything from the expansion header and ...
joan's user avatar
  • 71.6k
2 votes

Can I connect two Raspberry Pis to one 5" Display via an HDMI switch?

Yes, perfectly possible. Obviously just make sure you have easy access to the button in your enclosure. You can do that with more or less any sort of hdmi device. For example I have a ps4 connected to ...
rohtua's user avatar
  • 459
2 votes

128x64 OLED Display Issue

It turns out I was using the wrong Library. The device I have is a SH1106, not a SSD1306. When using the proper library (Like this one) It works fine.
epicdig07's user avatar
2 votes

see output from c++ program which was started by rc.local

is there a possibility to see output (f.e. std cout << ...) from my program which was started from rc.local script when i am logged into my Rpi via SSH? A process started by init (which ...
goldilocks's user avatar
  • 60.1k
2 votes

Usb sound device to 3.5mm output real time

Yes I think it is possible, for example you can use FIFO file: ~$ mkfifo /tmp/input.audio.fifo Write a python programm like this (warning, this script record only 60sec of audio, you can adjust this)...
Ephemeral's user avatar
  • 2,157
2 votes

PedalPi, lag when piping in data

In your code Output code you have not define bcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_64); // 4MHz clock with _64 , you not divide the clock. Per default the clock freq. is 250MHz, so ...
Ephemeral's user avatar
  • 2,157
2 votes
Accepted

GPIO Output Pin Reverse Current/Higher Voltage

Question The OP has the following device. He would like to know how can Rpi interface this device. Question Analysis The OP is asking 4 little questions. All 4 questions are OK, except the third ...
tlfong01's user avatar
  • 4,787
2 votes

Outputting RPi video into a laptop

As you well said, you can't output HDMI video into a laptop. I don't know of any devices as of now, however, I recommend using VNCServer and Viewer. It's almost as simple as using an HDMI. Just ...
NicolleMayol's user avatar
2 votes

Is there an elegant way to play Audio on the Zero W?

Just use the data port you can connect it to a USB audio device. You could also buy a similar device to the one you put above that you could connect to the Data port. If you're tight on space search ...
aditya's user avatar
  • 994
2 votes

Control fan to lower temperatur via script

You would need a way of switching the 5V supply on and off. The Pi GPIO are all 3V3 and can not supply enough power for a fan. The 5V pins are NOT GPIO and are not switchable (they are powered while ...
joan's user avatar
  • 71.6k
2 votes

try to set GPIO.output(x, LOW) but connected LED still lights

It is unclear exactly what you have done (list full code & connections). What is R_US The fundamental problem is your circuit. Using an emitter follower is POOR practice; it will attempt to put 2....
Milliways's user avatar
  • 61.4k
1 vote

Use Pi 3 B as external memory

If you are using OctoPi to monitor your printer then, depending on the printer and it's firmware, you can use the web interface to upload GCode files to the Pi's storage. Once uploaded to the Pi you ...
Roger Jones's user avatar
  • 1,474
1 vote
Accepted

Output sound over USB and into a computer (no 3.5mm jack)

If I understand you correctly, you wanna configure your Rpi as a USB audio gadget. I have never done this, yet. However, you can have a look here (pay close attention to the Raspberry Pi Zero OTG Mode ...
user91822's user avatar
  • 422
1 vote

Switch audio output not working

If you are on Raspbian, Run sudo raspi-config Navigate to 7 Advanced Options => A4 Audio => Force 3.5mm ('headphone') jack, save and reboot.
hcheung's user avatar
  • 855
1 vote

Which type of GPIO has the raspberry pi?

You could program the GPIOs to be sourcing or sinking. This depends on how you want your SSR relay to act. If your question was about the default state of GPIOs, certain GPIO pins on Raspberry Pi are ...
Ameer's user avatar
  • 405
1 vote

Turn on Raspberry Pi 3b monochrome display output

According to this: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md If in your cofig.txt you set: sdtv_disable_colourburst=1 then the composite output of RPi is ...
OriginalSebie's user avatar
1 vote

How can I drive output voltage between 0v, +12v and -12v on a single line?

There are probably many ways of doing this, the most obvious one that comes up is using one 12V battery/power supply, and wiring its output to your appliance using some sort of relay switch modules. ...
LecauseAndThePi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible