realman22
January 5, 2024, 00:50

Raspberry pi official touchscreen issue

I’m using a raspberry pi model 3 and the official 7” touchscreen. After a crapton of messing with the config file I managed to run raspbian on the pi and get to the home screen. Unfortunately, only a small top left portion of the screen works. Of course I have tried calibrating but no luck because I can’t even reach other corners. Mouse and keyboard work fine. I have seen people have this problem before, but there seems to be no solution. Did anyone have a similar experience? They are powered using the official power adapter and I’m running Debian 10 because 11 wouldn’t work at all.
k9t33n
January 4, 2024, 17:38

static public IP address

I need a static public IP address but have no clue where to begin. I need this for a wireguard vpn, it will be set up on a pi 4 along with wireguard and will be used not only to encrypt my data when I'm not at home but also allow me to access my pi and let my pi hole block ads for me even on the go. any help is appreciated so thank you for even reading this. once I have this set up I feel like life's sorted for me lol 😂
tritonal2418
January 4, 2024, 16:55

Unable to boot after cloning SD to SSD

I'm trying to move from an SD to an ssd using rpi-clone. I've gone through the install and am able to get it to do the clone using rpi-clone sda. It does it's transfers and looks like it's successful but it doesn't boot. After powering off and removing the SD card and powering back up It gives an error Gave up waiting for root file system device. Common problems: Boot args (cat /proc/cmdline) Check rootdelay= (did the system wait long enough?) Missing modules (cat /proc/modules; ls /dev) ALERT! PARTUUID= d2a8e92e-02 does not exist. Dropping to shell! I've tried two different usb drives. A Centon and a kingston a400. Both give the same error. I also now can't boot off the original SD card as it gives the same error as well.
.zatara
January 4, 2024, 11:20

pihole, bitwarden,nginx unbound in portainer

Hello, I'm trying to setup bitwarden and nginx in portainer, i was running PiHole without portainer but decide to remove it and use portainer, i tried changing the port to 8080 but it didn't seem to let me open the web interface, when i did that on normal install it worked. Having problems installing nginx because it's mixing ports. I'm also having troubles setting up unbound with my pihole through portainer, anyone have a guide for this?
coshi75
January 4, 2024, 11:06

what can I use Ubuntu or RPI OS?

what is better for a cyberdeck
shortcirkuitz
January 4, 2024, 01:04

Trouble setting up multiple SSIDs on raspberry pi 4b

Ok, so I am having trouble setting up a second SSID for my raspberry pi 4. The first ssid was setup using the raspberry pi imager so I am not sure if that is where the problem lies. I can add things to wpa conf however when I try to save any config changes I recieve a "FAIL" message. I am not sure what's going on but having acces to that second SSID is crucial to the project that I am working on. Any help would be appreciated. Thank you in advance.
lucio0428
January 3, 2024, 21:46

Use GPIOs in multiple Threads

Hey, I wrote a python program that opens multiple threads (less threads than the cor can max handle, so no overload) and I defined some gpios as inputs_pullups and as outputs. The threads should use the gpios and act with them, but I get no reaction. The code works, except for the GPIO interaction. does anyone know what the problem is, had similar problems or knows how to fix it? here is an excerpt of how the gpios are used with the trads:
import RPi.GPIO as GPIO
import threading
 
def led_test():
    while true:
        PIO.output(led_one, GPIO.HIGH)
 
        button_state = GPIO.input(bt_pin)
        if button_state == GPIO.LOW:
            PIO.output(led_one, GPIO.LOW)
 
led_thread = threading.Thread(target=led_test)
 
led_one = 24 
led_two = 18 
bt_pin = 27 
 
GPIO.setmode(GPIO.BCM)
GPIO.setup(bt_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(led_one, GPIO.OUT)
GPIO.setup(led_two, GPIO.OUT)
 
PIO.output(led_two, GPIO.HIGH)
led_thread.start()
mapijs
January 3, 2024, 20:27

CORS Origin issues.

I'm trying to host one of my web applications on my raspberry but I keep running into CORS issues. I can reach the web application just fine from my computer, and I can input the url in the adress bar just fine (http:// ipadress :3000/getCards?cardName=dark%20magician ) and I get back the JSON that I'm expecting. But when using the web application itself which should send the request I keep running into CORS Origin issues. I tried: npm installing cors, requering it in my javascript and using app.use('cors') tried to explicitly declare the cors headers in my app.get route tried app.use(cors({ origin: '' })); tried
const corsOptions = {
  origin: 'http://ipadress:3000',
  methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
  credentials: true,
  optionsSuccessStatus: 204,
};

app.use(cors(corsOptions));
But nothing seems to work. these are the response headers in my browser:
GET /getCards?cardName=d undefined
Host: localhost:3000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Accept: /
Accept-Language: nl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: http://ipadress:3000/
Origin: http://ipadress*:3000
Connection: keep-alive
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
I was hoping someone here might be able to help me who perhaps has run into these issues before.
omrs
January 3, 2024, 18:09

pi hotspot

So I’m thinking of making a hotspot that connects to a list of proxies I want to specify more than one proxy if possible Does anyone have an idea on how to do it
beanssi
January 3, 2024, 16:44

RPI5 Power Adapter

Hi all. Prob. a billion topics about this but i wanna know if this power adapter is suitable for the RPI 5? https://www.amazon.de/-/en/Charger-Charging-Mobile-Adapter-Samsung-black/dp/B0BTPLNNP3
itsrocketman.
January 3, 2024, 16:27

Firebase Storage upload from a Raspberry pi 4 with Code::Blocks and C++

I am encountering challenges while attempting to upload a video to Firebase Storage. Specifically, I am using a Raspberry Pi 4, Code::Blocks, and implementing the code in C++. To clarify, I have tried to use the Firebase library but no chance. So i would like NOT to use it when possible. Facing a lot of issues with that and cant find a good doc how to use it on a desktop program instead of an android/ios app... The project involves the creation of a program for motion and object detection. When motion is detected, a video is recorded and saved to local storage. However, I am facing issues when attempting to send this video to Firebase Storage. New Error message:
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>404 Page not found</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Page not found</h1>
<h2>The requested URL was not found on this server.</h2>
<h2></h2>
</body></html>
Thank you in advance! Sorry, there is not enough space for all my code. 😦 You can find it on Stackoverflow under the same title or ask and i can send more as comment ^^
void uploadToFirebaseStorage(const std::string&localFilePath,const 
std::string&firebaseStorageUrl,const std::string&firebaseApiKey){
    CURLcurl;
    CURLcode res;

    curl_global_init(CURL_GLOBAL_DEFAULT);
    curl=curl_easy_init();

    if(curl){
    std::ifstream file(localFilePath,std::ios::binary);
//...

int main(int argc,char*argv){
    //..
    std::string localFilePath="/media/raspi/videos/output_2024010315.avi ";
    std::string firebaseStorageUrl=" nameIcopyfromtheStorage.appspot.com/Video ";
    std::string firebaseApiKey="......";
    uploadToFirebaseStorage(localFilePath,firebaseStorageUrl,firebaseApiKey);
    //..
    if(video_writer.isOpened()){
    video_writer.release();
    }

    }
(And sorry for posting this again. Deleted the text and didnt know how can i add it again. Just wanted to fix it xD )
.hqnnah
January 3, 2024, 11:54

Emulate nintendo switch pro controller with pi 4

I am looking to be able to send inputs through my pi through a program or set of code that would be configurable like a macro, but am having trouble understanding projects and instructions. Just got a pi and dont have very much programming knowledge.
sanderzw
January 3, 2024, 10:44

Need Help with Bluetooth Connection Issues on Raspberry Pi

Hi everyone, I'm working on a project with a Raspberry Pi where I'm using Python to connect to cycling speed and cadence sensors via Bluetooth. The program uses asyncio and bleak for handling the Bluetooth connections. My script successfully connects to the sensors and reads data on the first attempt, but I encounter connection problems on subsequent tries. Here's a brief overview of what my code does: Connects to two cycling sensors using their Bluetooth addresses. Reads cycling speed and cadence data for 30 seconds. Disconnects from the sensors. On the first run, everything works as expected. However, when I try to run the program again, it fails to connect to the sensors. The error I receive is not very detailed, making it hard to diagnose the problem. I suspect the issue might be related to how the Bluetooth connection is being handled, or perhaps the sensors are not properly resetting after the first connection. I'm not sure if it's a problem with the Raspberry Pi's Bluetooth interface, an issue with the bleak library, or something else. Has anyone experienced similar issues or have any insights into what might be going wrong? Any help or suggestions would be greatly appreciated!
oops.se
January 2, 2024, 23:11

Firebase Storage on a Raspberry Pi 4 with Code::Blocks and C++

To format code in discord use 3 x backticks before and after the code block, see https://discord.com/channels/818384379197784084/1189386838788542464 for help
brickeater
January 2, 2024, 21:49

Pi2b wifi help

Is there anyway to either get a WNA3100 or a Netgear A6100 to work on Pi2B
k9t33n
January 2, 2024, 21:43

wireguard information

https://wireguard.how/server/raspbian/ just wanted to get a little info on this before i blindly follow the tutorial, this will be ran on a pi 4 with 2gb ram with pi hole. what will the performance be like? anything i should be aware of?
kelwin4598
January 2, 2024, 17:41

Flashing uf2 file into RP2040 PCB

Hey there, I have designed a keyboard PCB with RP2040, and created a uf2 file for the pcb to work with QMK firmware. However when I am uploading the file to the RPI-RP2 file, it repeatedly reopens itself instead of closing. Is there a solution to the problem? Thanks in advance
mega_destroyer
January 2, 2024, 09:57

Having difficulty flipping the screen horizontally, read on to see why I need to lol

Hi guys, I'm working on my own set of augmented reality glasses, and am using a raspberry pi 4 as the computer for it l. The thing works fine, but the display is horizontally flipped. Is there a way to change the orientation of the display with commands in the terminal or editing config.txt? Any help would be appreciated, couldn't find much info on this topic anywhere really 😅
Pantner
January 2, 2024, 07:38

Issues with Kiosk setup. Chrome Crashed and doubled menu bar on Desktop?

I've just set up a RPi4B (4GB) as a Kiosk to display a couple of webpages at home. I want it to flick between my CCTV dash and, at the moment, a Grafana Dashboard but that will likely change in the future. Fresh install of Bookworm on a new SD Card. New Pi powered by the v2 POE-Hat (connected to a unifi switch. Runs another Pi without issue) Used this tutorial, though installed 64-bit OS instead of 32bit as i got ahead of myself. https://www.raspberrypi.com/tutorials/how-to-use-a-raspberry-pi-in-kiosk-mode/ Set it up yesterday afternoon (~24 hours ago) and got it working reasonably quickly/easily. Went to check on it mid-morning today and Chrome (Chromium?) appears to have crashed as i was left sitting on the desktop. I also noticed the menubar at the top of the screen is doubled, I did notice this when i set it up but if it worked fine then i wasn't going to touch it. See Screenshot attached. Not sure if this is related to my main issue? Being Chrome, maybe ran out of memory? Worth trying Firefox or another browser instead? Nothing else has been installed/setup on it, except for SSH and VNC so i can remotely access it. I'm 'ok' with linux/pi's but am not really sure where to go from here? Any suggestions would be appreciated 🙂
baljeetoff
January 1, 2024, 19:54

Raspberry pi acting weird after power outage

Recently, my power went out for quite a bit, and when I came back, and turned my pi on, all my files became read only, and I am unable to download or update anything on the pi. Has anyone heard of this, and does anyone know what to do?
jaydeninja
January 1, 2024, 19:32

RPi Camera Face dedection issues.

Im doing a school project and im using a camera to detect faces but for some reason its giving me this long error. Also im deeply sorry but i can only take pictures of the code since its on my pi.
.zatara
January 1, 2024, 16:39

Glitched effect on browsers

Hello, yesterday the browsers were working but today when i opend it, they seem to have a glitched effect.
moajouz
January 1, 2024, 10:22

copy sd card

I wanted to know if there's any way I can just copy whatever i did with the system from the sd card so that if a problem occured, i would just flash the last backup on the sd card
wadegamer
January 1, 2024, 06:50

Raspberry Pi autonomous Drone

I am currently trying to implement a couple of Python packages called Dronekit: https://dronekit-python.readthedocs.io/en/latest/develop/installation.html It allows me to interact with the flight firmware for autonomous flight MAVproxy:https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html Communication protocol that allows me to send commands from the flight computer(Raspberry Pi) to a flight controller The only issue is these libraries still only exist in Python 2.7. I tried using Legacy OS but it does not support Python 2.7 packages either. Any ideas?
brokeskill
January 1, 2024, 00:45

Python "Resource temporarily not available"

py
pi@ROS:~/Desktop $ python pl.py
Traceback (most recent call last):
  File "/home/pi/Desktop/pl.py", line 5, in <module>
    kit = ServoKit(channels=16)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/.local/lib/python3.11/site-packages/adafruit_servokit.py", line 92, in __init__
    self._pca.frequency = frequency
    ^^^^^^^^^^^^^^^^^^^
  File "/home/pi/.local/lib/python3.11/site-packages/adafruit_pca9685.py", line 176, in frequency
    old_mode = self.mode1_reg  # Mode 1
               ^^^^^^^^^^^^^^
  File "/home/pi/.local/lib/python3.11/site-packages/adafruit_register/i2c_struct.py", line 81, in __get__
    i2c.write_then_readinto(buf, buf, out_end=1, in_start=1)
  File "/home/pi/.local/lib/python3.11/site-packages/adafruit_bus_device/i2c_device.py", line 140, in write_then_readinto
    self.i2c.writeto_then_readfrom(
  File "/home/pi/.local/lib/python3.11/site-packages/busio.py", line 224, in writeto_then_readfrom
    return self._i2c.writeto_then_readfrom(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/.local/lib/python3.11/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 98, in writeto_then_readfrom
    readin = self._i2c_bus.read_i2c_block_data(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/.local/lib/python3.11/site-packages/Adafruit_PureIO/smbus.py", line 264, in read_i2c_block_data
    ioctl(self._device.fileno(), I2C_RDWR, request)
BlockingIOError: [Errno 11] Resource temporarily unavailable
I get this error when trying to run my script which should move the servos connected with my pca9685
dylfer0
January 1, 2024, 00:33

raspberry pi 4 connect to the internet

It connects to the router via ethernet and can be accessed by ssh locally but can't access the internet. I set it up a few days ago with the dietpi OS , installed some stuff wich it must have had internet for then I moved it next to the router and connected to it via ssh to connect to it from my computer which is when I realised that it can't access the internet . I don't understand what the problem is, or if the problem is with the router or the raspberry pi.
sikewerld
December 31, 2023, 21:52

Can't interrupt Pi Pico

I'm trying to write a new program for my pi pico that I have not used in months, but Thonny is probably the worst software to ever exist and will not interrupt the program and I can't find any other button to stop the program. I can't open the files because it's "in use" or whatever. Any ideas?
willeishere
December 31, 2023, 21:29

External usb c port with pico as "Bad USB"

Hi i am new to using the pico but have used arduinos before, i want to make my own version of a flipper zero and im trying to make the Bad USB feature but i dont want to plug my pico into my computer while the battery is plugged in, so i was wondering if it would pe possible to control an external usb type c port that i can use my pico to send the Bad USB commands. Also to use the usb-c port as charging for the battery. I hope this made any sense, Any ideas are appreciated!
Xyler
December 31, 2023, 19:43

Feasibility of Pi 5 and Pico on quadcopter

Hi I'm relatively new to SBCs and microcontrollers. I'm currently working on programming a flight controller using a Pico W (running MicroPython) and Pi 5. The Pico will be running the flight control logic in an infinite loop taking accelerometer, gyroscope and RC data (from FS-iA6B) and sending out PWM signals to the ESCs. What the Pi 5 will be doing is partial autonomous control where my group plans to use a GCS (like QGroundControl) and wirelessly transmit messages (MAVLink?) to the Pi 5 via ~~WiFi~~ another RF transmitter and it controls the Pico based on what we do in the GCS. There will be an external GPS module connected to the Pi 5 so it can do the location processing and just send directions to the Pico, which then controls the ESCs/motors to move to the target. I don't really understand MAVLink (and a lot of these in general) and would like to appreciate some guidance/explanations. Also, is it possible to store multiple python files and have the Pi 5 re-flash the Pico on the go? I was thinking of something like having the Pi 5 store a whole bunch of programs like a calibration program, self-test program, flight program, etc. and whatever data from the prior programs (like gyro bias data from the calibration) to be stored in flash memory on the Pico or Pi 5, then load the flight program which grabs these values.
war_car
December 31, 2023, 19:39

How to fix motors jerking when changing directions with an Arduino and l298n?

I have an L298N motor that when used with delay() to switch the direction of the motors, it will jerk when changing the direction. The video attached shows the motors trying to change from left to right every 1 second, but also shows the jerking My code: https://pastebin.com/fYnawSvE