dethress
October 30, 2024, 14:47

Raspberry Pi Pico with SIM800L module

Hey, I'm going to use GSM SIM800L module in my project. I only have 3.3V and 5V power on my breadboard, the problem is that the SIM800L module Power Supply Voltage is between 3.8V and 4.2V. Should I get a step-down DC Converter module to convert from 5V to 4V for the GSM module? Or should I be fine using like a 3x AA battery basket? I'm pretty new to all this so all help is appreciated. Here's the specifications for the SIM800L: > Power Supply Voltage: 3.8V - 4.2V > Recommended Power Supply Voltage: 4V > Current Consumption: > -Sleep mode: < 2.0mA > -Idle mode: < 7.0mA > -GSM communication (average): 350mA > -GSM communication (peak): 2000mA > Module Size: 25 x 23 mm > Communication: UART (max. 2.8V) and AT commands > SIM Card Slot: microSIM (bottom side) > Supported Frequencies: Quad Band (850 / 900 / 1800 / 1900 MHz) > Antenna Connector: IPX > Status Indicator: LED > Operating Temperature: -40 to +85°C And here's the specifications for a step-down DC converter I found (Step-Down DC Converter Module LM2596S 1.5-35V 3A): > Input Voltage (DC): 3.2V-35V > Output Voltage (DC): 1.5V-35V > Adjustment: Potentiometer control > Output Current: 2A, maximum 3A with a heatsink > Efficiency: 92% > Operating Frequency: 150kHz > Operating Temperature: -40°C to 85°C > Dimensions: 43mm x 20mm x 14mm (LWH)
sociopathchick
October 29, 2024, 20:59

Raspberry Pi Zero 2 W to Raspberry Pico W SPI Problem

Hello everyone! I want to communicate SPI between Raspberry Zero 2 W and Raspberry Pi Pico W, but I have not been able to send even a simple test data. "I may make grammatical or word errors when explaining the problem, sorry I am not very good at technical explanations or English" Before I wrote a help article here, I checked a lot to make sure that it was a very simple error and I didn't overlook it. I looked at many videos and sources. I also asked AIs ChatGPT Claude etc. but I couldn't find a clear solution. If anyone has made SPI connection between RPi and Pico before, or if you want to share any different ideas or code, I am always ready to try. In short, I will refer to the model names as Pico(Raspberry Pico W) and Pi(Raspberry Pi 5). Since RPIZERO2W is soldered, I do my tests on RPI5. For the test I wrote a simple SPI code between Raspberry Pi 5 and Pico. For the Pi (Master)
import spidev
import time

# Initialize SPI
spi = spidev.SpiDev()
spi.open(0, 0)
spi.max_speed_hz = 100000

# Function to send data and read response
def send_and_receive():
    send_data = [0x01, 0x02, 0x03]
    print("Sending:", send_data)
    received_data = spi.xfer2(send_data)
    print("Received:", received_data)

try:
    while True:
        send_and_receive()
        time.sleep(1)

except KeyboardInterrupt:
    print("Exiting...")

finally:
    spi.close()
and for the Pico(Slave)
from machine import Pin, SPI
import time

# Configure SPI as Slave on the Pico W
spi = SPI(0, baudrate=100000, polarity=0, phase=0, bits=8,
          sck=Pin(18), mosi=Pin(16), miso=Pin(17))
cs = Pin(19, Pin.IN, Pin.PULL_UP)

response_data = [0xAA, 0xBB, 0xCC]

while True:
    if cs.value() == 0:
        received_data = spi.read(3)  # Read 3 bytes from master
        print("Received from Master:", received_data)
        spi.write(bytearray(response_data))
        print("Sent response data:", response_data)
        time.sleep(0.1)
I used the codes but it did not work.
PIN     RPI5        PICO
__________________________
MOSI    GPIO 10     GPIO 16<--
MISO    GPIO 9      GPIO 17<--
SCK     GPIO 11     GPIO 18
CS0     GPIO 8      GPIO 19
GND     GND         GND
__
__
PIN     RPI5        PICO
___________________________
MOSI    GPIO 10     GPIO 17<--
MISO    GPIO 9      GPIO 16<--
SCK     GPIO 11     GPIO 18
CS0     GPIO 8      GPIO 19
GND     GND         GND
I also changed the location of the MOSI and MISO pins, but again it did not work. I also tried with CS1(CE1) on Pi, but it still did not work. I also tested an SPI connection between Pico W and Pico W. However, I could not get it to work this way either. Pico(Master)
from machine import Pin, SPI
import time

spi = SPI(0, baudrate=10000, polarity=0, phase=0, bits=8,
          sck=Pin(18), mosi=Pin(19), miso=Pin(16))
cs = Pin(17, Pin.OUT)  # Chip Select (CS) pin

def send_and_receive():
    cs.value(0)
    time.sleep(0.01)
    received_data = spi.xfer([0x55])
    print("Received data:", received_data)

    cs.value(1)
    time.sleep(1)

try:
    while True:
        send_and_receive()

except KeyboardInterrupt:
    print("Exiting...")

Pico(Slave)
from machine import Pin, SPI
import time

spi = SPI(0, baudrate=10000, polarity=0, phase=0, bits=8,
          sck=Pin(18), mosi=Pin(19), miso=Pin(16))
cs = Pin(17, Pin.IN, Pin.PULL_UP)  # CS as input with pull-up
response_data = [0xAA, 0xBB, 0xCC]

def receive_and_respond():
    if cs.value() == 0:
        received_data = spi.read(3)
        print("Received data from Master:", received_data)
        spi.write(bytearray(response_data))
        print("Sent response data:", response_data)
        time.sleep(0.1)

while True:
    receive_and_respond()
    time.sleep(0.1)
I have tried several different baudrate speeds, but I could not get it to work at any of them. For Ex: 1000000 / 500000 / 50000 / 100000
theserverit
October 28, 2024, 18:39

Sync time

How do I sync the Pi (4)'s clock? ("internet time" I think?) I suspect it's a bit off right now...
tu4m01l
October 26, 2024, 13:00

Red LED, no booting after inserting unformatted ssd on a hat, Raspberry pi 5

i bought a nvme HAT adaptor for my raspberry pi 5 8gb. after putting it on, without an ssd, i turned it on and it indeed turned on, and ran the os stored on my SD. however after mounting an ssd on the hat, and securing it in place with a piece of plastic and rubber bands (as the ssd was bigger than the HAT) it stopped booting, of course i could say something short circuited and it broke the RP5 but thats the last diagnosis i want. so what couleve happened? "stopped booting" means in my context "it always shows a red led, no matter what i do. here is what i tried after i mounted the ssd the first time: -booting it with the HAT (without ssd) and SD card - output: red led, no sign of heat emmanating from the board, no hdmi output -booting it with the SD card - output: red led, no sign of heat emmanating from the board, no hdmi output -booting it with nothing - output: red led, no sign of heat emmanating from the board, no hdmi output -booting it with a os flashed usb drive - output: red led, no sign of heat emmanating from the board, no hdmi output -booting it with EEPROM rewrite image from the raspberry pi imager (family 5, boot from sd first then nvme/usb then network) - output: red led, no sign of heat emmanating from the board, no hdmi output things i rulled out: -sd card works fine, it works with my other rp5 -hdmi cable works fine, it works with my other rp5 -usb c source is orginal, it works with my other rp5 things i want to try: -buy the original raspberry pi UART debugger tool -boot from a compatible nvme? (but i have to buy a nvme adaptor to flash it from my laptop AND the nvme itself)
m1quii_
October 24, 2024, 01:42

Does anyone know arduino?

Hii, I need help with a school project that involves coding an Arduino to act as a water condition reader, for example, to detect temperature and pH. My group and I don't know anything about programming. Is anyone willing to help? We appreciate everyone who signs up.
m0rlok
October 23, 2024, 12:22

Possible to manage Pi with terraform?

I'm working on a small cluster and wanted to use terraform to do all the setup beyond burning the image. I'm new to Terraform and I'm struggling to find a lot of examples of this approach. Is this not a good approach?
chis_
October 22, 2024, 05:13

Audio is really messed up

I did a lot of things to pulse audio and now nothing works, is there a way to just restart audio wise but keep the rest of the data on the pi? is there like specific folders i could just get rid of to try and fully restart? thank you (pi 4 bookworm)
fferreira04
October 20, 2024, 10:38

"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