If you're using RPi.GPIO and run .cleanup() at the end of your script, it will return the channel(s) back to inputs with no pull up/down. Otherwise, they will remain in the state you left them.
See https://sourceforge.net/p/raspberry-gpio-python/wiki/BasicUsage/ for details.
Hackaday.com: USING CELL PHONE SCREENS WITH ANY HDMI INTERFACE
Has a video specifically using a raspi and iphone 4 screen.
I think I have a way for solving your problem, try to type omxplayer -o local xxx.mp3(for mp3 file) or omxplayer -o local xxx.mp4(for mp4 file) to hear sound from raspi over your headphone. And you can also type omxplayer --help for more usage about omxplayer.
I also ran into the same problem with my Raspberry Pi 2. I connected my Pi to my HD TV via an HDMI cable. My solution:
Set the audio output using the following command:
amixer cset numid=3 2
I tested the sound output using the following command, but no sound was heard:
speaker-test -c2 -t wav
To enable HDMI sound, I followed the directions found here
Yes, that will work.
I suggest you have something like a 1 kΩ resistor in series. That will limit the maximum current to 3.3 mA.
That will save the day when by mistake you set both GPIOs as outputs, one as a 1 and the other as a 0. Without the resistor that would result in a damaging short circuit.
Yes, this is possible. You can achieve this by using a framebuffer driver from the fbtft project. According to the list of supported devices on the projects wiki, Nokia 5110/3310 displays are supported. These display modules are readily available on eBay.
This seems to be a problem with the noob release - previous versions would default to the composite video if nothing was connected to the HDMI port.
To correct this do the following:
Connect your keyboard and TV to the Pi.
Insert your SD card.
Power on the TV.
Power up the Pi and hold down the SHIFT key, until the green LED stops flickering This will ...
It depends on the module you are using and if you have changed the GPIO state using the module (rather than indirectly by calling a shell program to change the state).
My pigpio leaves the GPIO in the last set state.
I'm not sure about wiringPi (Python).
RPi.GPIO and RPIO.GPIO both have a cleanup function. If that is called then any GPIO you have changed ...
I am using the Audio jack prom a PI, with good result.
Be aware that the quality of your power supply have profound effect on the quality of the audio from the PI.
I the beginning I did not the this output as usable, as it was filled with noise, using a standard USB supply, for charging cell phones.
I then got a Goobay charger, as tested on this page and ...
What finally helped was the following:
I dumped the EDID-file with tvservice -d edid_dump.bin
I edited this file with LIGHTWARE-EDID-editor (part of a demo suite).
What I actually needed to change was little: In the CEA part of the file, I needed to specify that the device was HDMI-compliant (HDMI/HDMI options), and under CEA/Audio data, I needed to add ...
I'm running OSMC, which runs Debian, and I got sound to play through my TV speakers, which is connected by HDMI. https://youtu.be/p2ljmTE67gs
If this is what you're trying to do, try adding dtparam=audio=on to /boot/config.txt
Original solution posted here:
Edit the config.txt file
The config.txt file is located in /boot directory.
sudo nano /boot/config.txt
Go to following line, and place # at start, if already not there:
This will make the line like this:
Then save the file (Ctrl+o) and exit (Ctrl+x)
If the gpio is at logic 1 it is already at 3V3 so there will be no difference.
If the gpio is at logic 0 it is at ground and connecting 3V3 will in effect be a short-circuit. That can kill the gpio and or bank of gpios and or the Pi (unless an appropriate current limiting resistor is in place).
It is perfectly ok to do this. After all it does not matter whether two digitial pins (one input, one output) of different devices or the same device are connected to each other.
The one important thing is to consider that the maximum ratings of the GPIO pins are not exceeded - especially the current drawn from the pin. This holds true for any setup but ...
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 channel FET).
This meant that when ICs were built out of 1 type of transistor they were built out of N transistors and as a result they were much better at pulling ...
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 simple bash script to read the RPi CPU temperature, and turn a cooling fan on and off based on the temperature. In other words, the fan only runs when the CPU ...
The Pi's GPIO are 3V3. There is no authoritative source for voltage levels. For the likely voltage levels see http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications
A GPIO can output considerably more than 16mA. Whether it is safe to do so for any length of time I don't know. I think I ...
My current working hypothesis is that, for me at least, the audio depends somehow on the desktop environment. I have a Raspberry Pi 2, running Raspbian, installed from NOOBS. I've wiped it clean and reinstalled Raspbian dozens of times. The sound works when I first install Raspbian. The next thing I habitually do is remove the LXDE desktop environment ...
Yes it is safe to connect without a resistor. As for which is better a piezo disc or buzzer. There is not much difference (one may be louder than the other for the same voltage, and the may differ in tone), but only experimenting will tell you if there is enough difference to care.
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:
(where channel is the channel number based on the numbering system you have specified (BOARD or BCM)).
You can also specify an initial value for ...
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-and-test
After that while you are installing I2S amplifier go to the detailed installation section and skip the first 2 steps and start from "Create asound.conf ...
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.
This is due to the architecture. The Pi Zero has the USB port connected directly to the SoC. While all model B have a USB hub in between that blocks off the SoC ...
I had the exact same problem.
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/uncomment hdmi_force_hotplug=1 in /boot/config.txt.
Turn off OpenGL. sudo raspi-config --> Advanced Options --> GL Driver --> G1 Legacy.
Get a HDMI screen.
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 change the selection from HDMI to Analog. This probably doesn't solve your problem, but it might help someone else who isn't hearing audio and who missed that ...
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 be the next best option. But I would use x2x instead of Synergy to connect them, because it is free software.
For additional displays, I noticed that there are ...
HDMI Input on Raspberry PI
The PZ-HDMI from e-mediavision.com will allow you to capture HDMI video and audio into the Raspberry Pi, you can use OMX Player to display the captured video through the Pi's HDMI output port as well.
The PZ-HDSDI allows SDI video to be captured on the raspberry Pi.
It sounds like you're looking for a 7-segment display. I'm sure some place I've seen a nice module for controlling this with the Pi, but I can't find it now. The traditional approach is to use a breadboard. Each segment of the display is just an LED, so you can connect each one to a GPIO pin to power it. Then to generate the numbers you want it's simply a ...
Your idea of using a 5V 1200mA PSU to power the Pi and the Bell will not be enough power.
The bell looks old school electroncs and from the size of components will draw a lot more than 6 Watts which is the total output from your PSU.
Do you know what the minimum wattage needed is to make the bell work.
Is it 7000 Watts?
Is so then at 5V assuming 100% ...
I followed this guide instead and it worked wonders!
(This was a link at the bottom of the LifeHacker website you provided)
Format not only the flash drive on your Mac, but write the image to the SD card. You need to write the image you downloaded to the SD card. This guide shows you what you need to use if using a ...