New answers tagged

0

I was able to get this to work. To format it how I needed I was able to use a .join function with a delimiter specified. This gave me the format I needed without the '' For the values issue I created a loops to build a string based on the length of the headers. I added the index count to avoid on the first iteration adding the comma at the start. def ...


0

I got your code working with my USB GPS using the following: dmesg shows my USB GPS connected on ttyACM0: [557325.587821] usb 1-1.3: New USB device found, idVendor=1546, idProduct=01a8, bcdDevice= 3.01 [557325.587827] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [557325.587833] usb 1-1.3: Product: u-blox GNSS receiver [557325.587838] ...


0

I came here because I had the same issue. @joan's answer and package fixes the issue but @joans answer doesn't give some specifics on how to get it working (without looking at the page and/or documentation). On my installation (Rasbian buster), pigpio comes pre-installed, you just have to enable it: systemctl enable pigpio systemctl start pigpio Here is a ...


1

I've had a similar issue getting an all-sky software running under Bullseye. I think you need to ensure that the legacy camera software is DISABLED using raspi-config then reboot. I suspect the legacy software is grabbing the camera interface and the new camera software in Bullseye cannot connect to it.


0

to escape python i use the following javascript library https://www.npmjs.com/package/motor-hat full supports for MotorHAT from Adafruit https://www.adafruit.com/products/2348


0

It took me way too long to find this the difference is in the way the threading target is passed in the threading.Thread() call. The first, t1 = threading.Thread(target=app.run(**kwargs)), does not pass the function but calls the function in the main thread. When t1 = threading.Thread(target=runApp) is used the function is passed and not called to the main ...


0

assuming you are using RaspberryPi-OS with a graphical user interface and the screen is directly connected to the Pi via HDMI. Just install VLC media player by typing sudo apt update sudo apt install -y vlc in the Pi's terminal. Now, open VLC and go to Media -> Open Capture Device and select your videodevice.


3

The Bluetooth stack on Linux is BlueZ and they make a series of APIs available using D-Bus to interface with the Bluetooth hardware. The documentation for the various API's is available at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc If you have not used D-Bus before it can be a little bit of a learning curve. There are libraries like pydbus ...


1

Q1: In the setup function of the python script, the GPIO pins are initialized as output pins in HIGH mode which defaults to the LEDs being off. I do not understand this behavior. Why does sending constant 3V3 power to a pin in output mode (specifically set to HIGH) result in the LED not turning on? A1: Looking "inside" a GPIO pin reveals a ...


3

I am assuming it is a Serial Port Profile (SPP) connection that you are trying to establish between the two machines. The Linux Bluetooth stack uses BlueZ which has an API for setting up classic Profiles such as SPP. This is documented at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/profile-api.txt This has the option to set ...


2

There are two ways to connect a LED to light it with a GPIO. connect the anode to a GPIO and the cathode to ground. The LED will light when the GPIO is high and go off when the GPIO is low. connect the cathode to a GPIO and the anode to 3V3. The LED will light when the GPIO is low and go off when the GPIO is high. I am ignoring the resistor which will be ...


1

Your question is not Pi specific; indeed it is a general EE question. This circuit 3.3V - resistor - LED - GPIO is the normal (and recommended) method which would be used by most engineers. You appear to have a common misconception that there is something magical about positive voltages. The LED will light whenever there is a potential difference across it; ...


0

If I was going to do this I would use hardware PWM which continues to run after the program exits. Hardware PWM is available in my Pi.GPIO (which is a superset of RPi.GPIO). It is also available in pigpio The following modification to your program should work (I have not tested it) and avoid the strange sleep and need to kill processes, although it is rather ...


0

If I guess properly at the question it may be solved by changing python /home/pi/fan.py $1 to python /home/pi/fan.py $1 &


0

As others have pointed out you are using PUD_UP but state "NO connected to the GPIO 17 Common to 3V3". Connect to Gnd NOTE is is poor practice to connect a switch to 3.3V. Those who do this sooner or later end up with dead devices, particularly if they use loose exposed wiring. If you are going to use Physical Computing you need to learn the art of ...


-2

You can remove it using the menu editor


0

The touchscreen is unlikely to use many GPIO. Most of the GPIO on the expansion header are likely available for your use. See https://pinout.xyz/boards and check if your board is listed. You can always use the free GPIO by soldering wires to the underside of the expansion header pins.


Top 50 recent answers are included