fferreira04
about 17 hours ago

"hardware/pwm.h" behaving unpredictably

Hello, I'm doing a project on a Raspberry Pi Pico WH, using the Arduino IDE 2.3.3. My goal was to use the hardware/pwm.h library to create a PWM signal of 35 Hz and 50% duty cycle on one of my GPIO pins, to drive the trigger of an ultrasonic sensor. To check whether or not I have the desired trigger signal, I'm detecting its falling edge and printing out some values with Serial.print() once every 35 times (at 35 Hz, this should print something every second). The problem is that my prints come with the wrong frequency and, even worse, they seem to come at completely irregular periods. In the picture of the breadboard, you can see the circuit. From top to bottom: Grey is ground; Yellow is echo (it's between the resistance and the diode that goes to 3.3V just to reduce the echo signal voltage from 5V to about 3.9V (which the board should be able to handle)); Red is the trigger; Blue is Vcc (5V). I posted pictures of what I think are the critical parts of the code, but I've also included it fully in the txt file. It's quite small and simple. There's an interrupt timer that's blinking the builtin led, but I can't imagine that's related to my problem. Can someone please help me? I've failed to gather much information online about how this library works, and I just can't seem to figure this out... Thank you in advance



supercell_psycho
October 18, 2024, 13:52

SDR weather station graph

Hey, so I am making a weather station work on my RPI3 and I am getting confused on this. Could I have like a more in depth tutorial or maybe even better a video tutorial? Here is the link in what I’m doing. https://www.agri-vision.nl/portal/projects/25-rtl-sdr-based-weather-station-on-raspberry-pi thanks for any help I get.
dethress
October 16, 2024, 12:18

RPI Pico with SHT30

Hey, I'm trying to get my SHT30 to work with my Pi Pico using those libraries: https://github.com/rsc1975/micropython-sht30/blob/master/sht30.py https://github.com/n1kdo/temperature-sht30/blob/master/src/temperature/sht30.py But with both I run into errors. The way I have SHT30 connected to my Rpi Pico: SDA -> GP4 SCL -> GP5 GND -> Physical Pin 23 (GND) VIN -> 3v3(OUT) I also tried with 10kOhm pull-up resistors SDA->3v3(OUT) + SCL->3v3(OUT) I tried doing an I2C scan but it seems it doesn't even see the device using the following code:
py
from machine import I2C, Pin
i2c = I2C(0, scl=Pin(5), sda=Pin(4))
devices = i2c.scan()

if devices:
    print("Found I2C devices:", devices)
else:
    print("No I2C devices found")
The code I'm trying to test SHT30 with is:
py
from sht30 import SHT30

sensor = SHT30()

temperature, humidity = sensor.measure()

print('Temperature:', temperature, 'ºC, RH:', humidity, '%')
The errors I get: 1. First lib error
MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "sht30.py", line 40, in __init__
TypeError: 'id' argument required
2. Second lib error
MPY: soft reboot
[Errno 110] ETIMEDOUT
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "sht30.py", line 140, in measure
  File "sht30.py", line 104, in send_cmd
TypeError: 'int' object isn't iterable
3. (after adding i2c_id=0 in first lib)
MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "sht30.py", line 136, in measure
  File "sht30.py", line 101, in send_cmd
SHT30Error: Bus error
4. (after adding i2c_id=1 in first lib)
MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "sht30.py", line 40, in __init__
ValueError: bad SCL pin
blockysumo
October 13, 2024, 13:05

RPI Crashes after connecting with RealVNC locally

https://cdn.discordapp.com/attachments/1174423942669279303/1294946781980921898/20241013_115517.mp4?ex=670cdcab&is=670b8b2b&hm=0c91a1614dbe0b72b57f29c105560541fc3a41c1d4efb7fce8a26ff67c08214b& Hdmi port is not accessible easily so can't try that, I did try to access console with Putty, and that worked ✅ . But since i'm kinda of a beginer with RPI's idk what to do even to fix this Issue. It first occurred today after running the PI continuously for ~4 days. On boot it is running my python script that makes all the compounents work, and there is python script reset every 48h. Before today there were no issues connecting to it with RealVNC
thumperz1
October 12, 2024, 23:21

PiHole will not Install!

I keep getting the following image, any tips?
long4466
October 12, 2024, 20:17

Pi 4 not booting after installing vulkan

I was trying to install vulkan last night to try and test some ps2 emulation but when I tried to reboot my machine it booted to the welcome to raspberry pi desktop but then it went to a blank screen with an flashing underscore it’s been on it for hours. Please help I’m very new to this

oops.se
October 11, 2024, 19:32

use two rfid 522 readers

There are many different RFID readers...
dj_tomato
October 11, 2024, 19:06

Booting from USB-MSD

Pi4
iludw1g
October 10, 2024, 16:12

is there a pivpn reccommended alternative?

now that pivpn is not supported anymore, in fact it doesnt work for me anymore is there a reccommended alternative?
dethress
October 9, 2024, 18:42

What module should I get for measuring temperature and humidity?

I'm doing a project with Raspberry Pi Pico and I need a reliable temperature and humidity monitor module, I've so far only used DHT11 which failed me twice. Any suggestions? I've heard AHT2x is decent but does that mean like AHT20 and AHT21? Appreciate any suggestions!
biomaestro911
October 8, 2024, 19:21

can someone check if i made any mistakes here? i really dont wanna have servos melting on me


biomaestro911
October 8, 2024, 15:20

im a bit of a newbie, need help here pls

how do i get the 5v servos need, for now this is the connections i need to make but i also need to add two servos, if you see any mistakes or stuff to correct please say <:babyblob:1053364680200044564>
heavyfalcon678
October 7, 2024, 19:10

RPi Connect Screen Sharing Unavailable

I'm running RPi OS Bookworm 32-bit on Pi Zero 2W and connecting via ssh. The option to screen share does not show up on the connect.raspberrypi.com site. When I ran rpi-connect vnc on it output x Screen sharing support is unavailable. When I run rpi-connect status on the Zero, it shows this output:
Signed in: yes
Screen sharing: unavailable
Remote shell: allowed (0 sessions active)
I have heard it might be something about Connect not finding wayland, but I haven't found out what to do. Any help would be appreciated!
theserverit
October 6, 2024, 17:30

How to stop brute force!

Someone has been trying to brute force into our Pi for a WHILE now non-stop. Each second they're trying new combination of user and password. We're using port-forwarding so it always shows the router ip.. We wanted to set up a system that will ban the ip if it gets to a specific number of failed log-ins (caused from wrong password). (Either that or just block him generally), But we couldn't manage to set it up correctly. Is there maybe a program or config that can help with this?
gmc_96
October 6, 2024, 00:59

Need help picking a relay to open garden gates with pi pico w

Hi, I apologise in advance for my lack of knowledge when it comes to electrical components. I want to make my electric gates controllable via a raspberry pi and home assistant, but I struggle to understand the limitations. They currently open using a remote, there is no way to open them otherwise in the current configuration. This is the controller for the gates: https://v2uk.co.uk/product/flexy2-230v-analogue-control-unit/ On the page i see the following info about the accessory connections: 230v power supply for 2 single phase motors Max accessories load 24V 3W (continued after photos in thread)
braneworms
October 5, 2024, 22:12

Pico not connecting

Hey all, found you guys after doing some googling and not being able to fix my issue with the help available online. I just bought 2 picos, but they didn't connect with any of the micro-USB cables I had. Seeing that there was often a problem with non-data cables, I bought one online that had all 4 wires and some comments from people saying they used it with their raspberry pis. Got the "connecting" blip for the first time, file explorer pops up, and I see the data for about 10 seconds... then it dc's again and now nothing. I've tried a few ports on my desktop and it's just silent again. Diskpart doesn't show them. Any help appreciated, thanks!
john_jung
October 5, 2024, 11:48

raspberry loses connection to Wireguard

i have installed wireguard to my pi but i can only connect to pi via the wireguard ip if i ping from the pi a device inside my wireguard network
4049787
October 4, 2024, 21:30

new pi5 no hdmi no green light

I got a pi5 yesterday, with the official power supply. When I plug it in the red led comes on and flashes once, pauses and then quickly flashes twice. Green led has not turned on. There is no hdmi output, active cooler fan does not turn on. Added hdmi_force_hotplug=1 to config.txt. Tried it on several monitors and tvs. Is there something else I can try or did I get a defective board?
e_xie
October 3, 2024, 21:55

Raspberry Pi 5 password not working

Hi everyone, I've recently been running into the issue of my pi refusing to ssh. It claims that the password is wrong ":
Permission denied, please try again
", even though I've never changed the default password (raspberry). I've flashed the SSD at least 3 times now. It's a fresh install, nothing has been changed. Pi is not overheating, RAM is not being used much at all.
mcfctadaws
October 3, 2024, 17:16

Raspberry Pi 4 not detecting my Keyboard or Mouse

Hey everyone so i bought a Raspberry Pi 4 a few days ago, and today i decided to hop on and start learning about it even more, however i tried to plug my keyboard and mouse, none of them worked I reinstalled PiOS, again neither worked, my mouse gets a dim light which indicates its getting power but no response on the Raspberry Pi i really need your help, thank you very much!
herogaca
October 3, 2024, 17:08

pi5 watercooling pc aio

Guys i think i didnt think how big the pump is and how small pi is, any ideas how to make it work??:DDDDD
svenherr
October 3, 2024, 15:35

Pi5 does not boot

Hello, we moved to a new apartment and i connected the pi5 it worked fine. i did an update sudo apt-get update and sudo apt-get upgrade and next time i turned it on it wont work. The green led is on, i dont get any hdmi output, its connected to lan cable and i cant connect throu ssh and it doesnt show up on connected devices on router. I can read th sd card fine with pc
matze15
October 2, 2024, 07:17

Color Detectionsystem Sends Input to Raspberrypi pico

Hi, I have programmed a python script on my computer and a cricuitpython script on my raspberry pi pico. The computer sends a signal to my raspberry pi as soon as it detects a certain color. The pico receives the input correctly and lights up the standard LED. But the mouse click does not work. Any ideas what I have done wrong? I will upload the code as an image. Hope someone could help me. Thank you

omar_eldeeb112233
September 30, 2024, 20:53

my camera module 3 won't capture videos using opencv in python

so i'm trying to make a project where i use AI to track a laser movement and put a square around the laser,but for some reason when i start initiating the camera using this line: 'cv.VideoCapture(0)' but it always says the camera is not initialized even though it works with the rpi-hello and rpi-still command just fine and it also works if i try to record a video using libcamera functions, i tried many different ways like putting this line:'cv2.VideoCapture(0, cv2.CAP_V4L2)' instead, using GSTstreamer,and i tried using the picamera library but it always said libcamera isn't installed even though libcamera functions work just fine, and i tried uisng a usb webcam and it workded just fine but i wanna use the pi camera instead. i'm very new to raspberry but i was a previos advanced arduino engineer though, so plz help
otto10
September 26, 2024, 23:48

Potential Wattage leading to damage

[charger] 5.1v 2.5 amp official rspry pi charger If i tried to connect a sim800l v2 directly to the raspberry pi 3 b+ would the sim800l v2 break from overheating or would nothing happen.
patnukem
September 26, 2024, 00:26

Namco pacman rasp pi compute module 4 based arcade game software update failed any idea how to fix

Looking for suggestions on how to fix my file I have the update from namco https://bnaa.wetransfer.com/downloads/2ca4d18225c4ac60618888c9bdbfa41920230915172535/1d6a03 and the old SD card with a lot of files still on it, but seems to boot to black screen now like its in some update mode... any idea what I can do to try and save the SD card?
.daemos
September 25, 2024, 07:51

Installing Tailscale via static binary

Read online that it was possible to install Tailscale via static binary on LibreELEC; however, the tutorial assumed alot of general knowledge about the LibreELEC command system. I for one have zero experience outside the basics of the Raspi 5 OS hence why im here. Ive followed the tutorial set by Tailscale, yet I'm still facing errors. Tailscale Guide: https://tailscale.com/kb/1053/install-static ##################################### Setting up Tailscale with static binaries (unsupported) If you would like to try Tailscale on a Linux distribution we don't yet support, we offer statically-compiled binaries on a best-effort basis. If you use these binaries, contact us so that we can consider adding official support for your distribution. We offer static binaries for x86 and ARM CPUs, in both 32-bit and 64-bit variants. Download the static binaries for your CPU architecture: Stable release track Unstable development track Unpack the archive: tar xvf tailscale_VERSION_ARCH.tgz Start tailscaled: If you want to configure systemd to run tailscaled automatically, a service configuration is available in the systemd/ subdirectory of the unpacked archive.sudo tailscaled --state=tailscaled.state Connect your machine to your Tailscale network and authenticate in your browser: sudo tailscale up You're connected! You can find your Tailscale IPv4 address by running: tailscale ip -4 If the device you added is a server or remotely-accessed device, you may want to consider disabling key expiry to prevent the need to periodically re-authenticate. ##################################### What I've done so far, Enabled Raspi Tools in the LibreELEC add-ons wget https://pkgs.tailscale.com/stable/tailscale_1.74.1_arm64.tgz tar xvf tailscale_1.74.1_arm64.tgz tailscaled --state=tailscaled.state r/raspberry_pi - Installing Tailscale via static binary Error = -sh: tailscaled: not found I tried ./tailscale_1.74.1_arm64/tailscaled r/raspberry_pi - Installing Tailscale via static binary I proceed to get the error that tailscale has stoped. What am I doing wrong/ can anyone help me get to my goal. Have in mind that I am somewhat new to this system and the raspi 5 as a whole

qiangwang9174
September 24, 2024, 07:32

Keyless Entry Repeater

I'm looking for a professional with expertise in radio technology to help me develop a keyless repeater for my car. This device will focus on passive entry systems and should have the following functionalities: Unlocking/locking the car doors Starting the engine I am looking for a person that could teach me how to create this type of device, with proofs of previous experience
masterchief2416
September 22, 2024, 23:34

raspberry pi 4b not connecting to the internet

i remember using a command to shut off the raspberry pi before un pluging it but i dont remember the command specificly
rei.556644
September 22, 2024, 16:46

PINN OS Conflicts

I have PINN OS currently running on my pi 5. It has MX Linux, as well as Batocera. MX seems to be working just fine. However, when I try to update batocera, it sayst that there is not enough space on /boot to do the update. Any help would be appreciated!