New answers tagged

0

This site provided the answer I needed to my GPIO problem. https://www.caretech.io/2018/01/20/using-the-rpi-gpio-module-with-python-3/ I was getting the error: "ModuleNotFoundError: No module named 'RPi'" To fix the problem, run: 'sudo apt install python3-rpi.gpio' on the Raspberry Pi. My setup is Raspberry Pi running Raspbian Lite as a headless server. I ...


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

Python is case sensitive, use: import RPi.GPIO as GPIO


0

though it is probably Pi 3 specific, since it didn't work for my Pi 4 It works on the 4 as well, you just need to set the right trigger. The instructions that you provided are not applicable to the 4 or just incorrect. This will tell you what triggers you have available: cat /sys/class/leds/led0/trigger To enable manual control on a 4, do: echo gpio |...


2

Here is what comes to mind first, but maybe there are other ways. Using FIFO file, arecord tool and using python here, something like this must be possible. :


0

Pins 3,5 on ALL model Pi (GPIO2,3 on 40 pin Pi) have 1.8kΩ pullups on the board, so the state of internal pullups is irrelevant! They can ONLY be pulled LOW by programming the pin as OUTPUT - this will never happen unless you do something explicit to cause it. If you have enabled I²C it may change state as SCL is setup. In any event, using these pins for ...


1

Both ports 2 and 3 were having this problem. I moved to another two ports (4, 17) and that fixed the issue. I don't know why 2 and 3 are cursed.


Top 50 recent answers are included