math1518
May 17, 2024, 08:18

Raspberry Pi 5 to control 2 motors with H-bridge

Hello everyone, I'm using a Raspberry Pi 5 for a school project to build a robot. One part of the project involves making the robot spin in place for a few seconds randomly. For this, I have 2 small 6V motors, a 6V battery, an L298n H-bridge, and a Raspberry Pi 5. The 2 motors are connected to the H-bridge at OUTPUT 1 and 2, and OUTPUT 3 and 4, respectively. The battery is connected to 12V for the positive and GND for the negative. For the other pins, EVA and EVB are connected to PIN 2 and 4 of the board (5V no PWM), IN1 with GPIO26, IN2 with GPIO27, IN3 with GPIO6, and IN4 with GPIO7. Here is the code used to test the motors: 'from gpiozero import Motor from time import sleep import random Motor configuration motor_left = Motor(forward=26, backward=27) motor_right = Motor(forward=5, backward=7) try: while True: # Random duration between 5 and 15 seconds spin_time = random.uniform(5, 15) print(f"The robot spins for {spin_time:.2f} seconds") # Spin the robot in place motor_left.forward() motor_right.backward() Wait for the random duration sleep(spin_time) Stop the robot motor_left.stop() motor_right.stop() Optional: Wait for a random duration between spins rest_time = random.uniform(1, 5) print(f"Resting for {rest_time:.2f} seconds") sleep(rest_time) except KeyboardInterrupt: print("User interrupted")' When this code is executed, it displays the prints correctly but the motors do not spin, and I can't figure out where the problem is coming from. If you have any ideas to fix the issue, I'd appreciate it! Thanks in advance!
badaboom3756
May 17, 2024, 03:30

How to stream audio and video from raspi

Hello, I was wondering how can I stream both audio and video at the same time at a low latency? I've seen projects where they use mjepg and a web server but none with audio.
.daemos
May 17, 2024, 00:33

Mount Error (13)

i have no password set on this pc when i leave blank and press enter i get mount error (13) permission denied if i try and create a share with a client who has a password i get error 115 progess: after adjusting the firewall i no longer get the 115 error still however get the 13 error

kuroshite
May 16, 2024, 19:01

RetroPie: Need help with controller + keyboard 2-player setup

I have a controller which I've set as gamepad 1 (first boot). Now I wish to use my keyboard as gamepad 2. I have tried everything suggested in the following: - https://www.reddit.com/r/RetroPie/comments/62g3k6/comment/dfma2ud - https://retropie.org.uk/forum/topic/21002/2-player-support-with-usb-gamepad-and-keyboard In EmulationStation, I can control everything fine with both gamepad 1 (joystick) and gamepad 2 (keyboard) In Super Mario Bros, gamepad 1 works fine for player 1, however, when its player 2's turn, the character doesn't move at all with my keyboard which is gamepad 2.
dankwiener100
May 16, 2024, 18:34

trying to run a code for a camera stream and this pops up

Can anyone help?
.daemos
May 16, 2024, 13:41

Fileshare Windows to Raspi5

I want to share windows file to raspi need a step by step instructions im a beginner
pgthevrguy
May 16, 2024, 12:01

Trying to get wpa_supplicant.conf to work correctly.

So the wifi successfully connects to my home network "Krusty Krab", but for some reason refuses to connect to the "Guest_OS_Wi-Fi" the ssid is correct to the name and there is no password. Did I do anything wrong here?
orb0959
May 16, 2024, 09:50

Trying to make a prank hacking raspberry pi

hi this is gonna sound wierd but im trying to make my raspberry pi zero into sort of a hack i guess so what im trying to make it do is take controll and let me put commands onto someone elses device can someone please help me?
themuffinhead
May 16, 2024, 04:20

Motor Controller Issues

Hey, I got this motor controller, it’s an L298N motor controller. I’m trying to power a 12V 60W DC motor through it. When connecting directly to the power source, the motor runs fine, but when hooked up to the motor controller it gets weird. The motor is completely unpredictable with starting and stopping whenever I enable the pins, and sometimes just pulling out an input wire from the RPi onto the motor controller just starts it, only for it to stop when putting it back on and then either stopping on its own or just stopping randomly after putting the same wire in and out over and over. I got my code from here: https://www.electronicshub.org/raspberry-pi-l298n-interface-tutorial-control-dc-motor-l298n-raspberry-pi/
class='img rounded m-1' src='/assets/assets/1240519334703530064.webp'>
milekat
May 15, 2024, 18:15

Home automation, Light dimming

Hello, I'm looking for build a light dimming on my house, using a PIZero 2W or a PI4. I searched for dimming modules, I found this product : https://fr.aliexpress.com/item/32802025086.html "Dimmer 8A-400V" look good but I'm a bit afraid as it's a chines product, I wont burn my house <:CH_PepeWizard:704997748461535314> Did someone already tried this module / know another good module to make lights dimming ?
bedebe._11454
May 15, 2024, 16:52

Assistance with coding.

I am still learning python and trying to get it down. Creating a simple script to run 3 fans. I am getting some errors and I am not able to correct. Even after I have search for an answer. I am having issue with the python checker and not having whitespaces around certain items. I am sure this can be cleaned up and it has to much lines already in the script. Any assistance would be greatly appreciated.
adde9882
May 15, 2024, 16:22

Port a python library dependant on RPi.GPIO to Raspberry Pi 5

There is a library that is very large and uses RPi.GPIO extensively. Is there any fast "dirty" way to port it, maybe using a wrapper library or similar, so that I won't have to manually rewrite it all using something like gpiozero?
killerbean0112
May 15, 2024, 16:03

Zero W Access Denied - SSH - Operating System.

Board - Raspberry Pi Zero W - Connected with a power/data cable to a power bank. Installation - Raspberry OS Settings General { Set host name: raspberrypi.local User/Pass: bomzas/pass Configure wireless LAN (enabled) Set locale settings (time zone)/us (keyboard layout) } Services { Enable SSH (enabled) Use password auth (enabled) ) My main OS I use: Ubuntu (latest) Hello, I have a problem with SSH not letting me connect, when installing the rp operating system I picked the settings as I stated above. I used a command "ssh pi@localhost (the host name wont work for some reason) the output was: " ssh pi@localhost | pi@localhost's password: (my pass) | Permission denied, please try again.". The passwords Ive tried: raspberry (to my knowledge this is the default?), pass, etc.. Would appreciate if someone could guide me through the installation. (Tried almost everything to my knowledge for the past 6-7 hours) Adding the Imager image too for the version and settings I use.
incognitas0411
May 15, 2024, 15:46

No such file or directory [Makefile:66: install_conf] Error 255 Error 2 [Makefile:42: install_conf]

Hi, I am following miner installation guide here: https://github.com/maco2035/DiyHeliumHotspots/blob/master/RAK2287/Raspberry%20Pi%204B/Guide.md I came to the line, where I have to Install the config files with comand line "make install_conf" after that I get the error below: pi@raspberrypi:~/sx1302_hal $ make install_conf make install_conf -e -C packet_forwarder make[1]: Entering directory '/home/pi/sx1302_hal/packet_forwarder' ---- Copying packet_forwarder conf files to localhost:/home/pi/sx1302_hal/bin global_conf.json.sx1250.AS923 100% 3186 2.0MB/s 00:00 global_conf.json.sx1250.AS923_1 100% 3932 2.7MB/s 00:00 global_conf.json.sx1250.EU868_D 100% 3932 3.4MB/s 00:00 global_conf.json.sx1250.EU868_E 100% 3932 4.4MB/s 00:00 global_conf.json.sx1250.EU868_F 100% 3932 4.6MB/s 00:00 global_conf.json.sx1250.IN865 100% 3745 3.1MB/s 00:00 global_conf.json.sx1250.IN865_A 100% 3745 3.2MB/s 00:00 global_conf.json.sx1250.KR920 100% 3303 2.3MB/s 00:00 global_conf.json.sx1250.KR920_A 100% 3303 3.1MB/s 00:00 global_conf.json.sx1250.RU864_A 100% 3901 3.5MB/s 00:00 global_conf.json.sx1250.US915 100% 4324 5.3MB/s 00:00 global_conf.json.sx1250.US915_SB2 100% 4324 4.7MB/s 00:00 scp: stat local "global_conf.json.sx1257.": No such file or directory make[1]: [Makefile:66: install_conf] Error 255 make[1]: Leaving directory '/home/pi/sx1302_hal/packet_forwarder' make: * [Makefile:42: install_conf] Error 2 Here is the list of files in the directory: pi@raspberrypi:~/sx1302_hal $ ls bin LICENSE.TXT readme.md util_chip_id libloragw Makefile target.cfg util_net_downlink libtools packet_forwarder tools VERSION
overlordma
May 15, 2024, 11:08

Connecting GRAS 46AE 1/2'' CCP Free-field Standard Microphone Set to raspberry pi 4b

I am not able to find any help from the GRAS department , as i have a necessity to collect data from it using raspberry pi , is it possible to connect it to the raspberry pi?


adriaanszoon
May 15, 2024, 08:42

VNC display problem on remotely managed PiHello,To help with digital things around my moms house,

VNC display problem on remotely managed Pi. When i remote connect to a Pi, the chromium tab shows an alternating black screen and a normal but massively distorted/compressed 'normal' screen that is un-usable. The pi is updated, on a stable network connection, adequately powered. Link to image: https://imgur.com/a/fwVcA4H
limitmore
May 14, 2024, 21:14

how I can select a keyboard configuration in the first boot without a mouse?

relox
May 14, 2024, 19:53

I got a RPi5 but..... (undervoltage detected)

If I connect the power supply with a random USB-C -> USB cable to my PS4, it says undervoltage detected, can I ignore it? Like will it damage my RPi5 in any way? Or is there any official USB-C -> USB cable for RPi5 which I can use to connect with my PS4?
kierbik
May 14, 2024, 19:47

UPM Module problem

Hi! I tried to use LCD from grove. When I used simple example of code, I got this error: ModuleNotFoundError: No module named 'upm'. Before, when I tried to install it, could'nt do it. Please help
incognitas0411
May 14, 2024, 17:51

ERROR: [main] failed to start the concentrator modify start.sh script

Hi I am getting "ERROR: [main] failed to start the concentrator" when testing out packet forwarder. I think I found the solution here https://forum.rakwireless.com/t/rak2247-spi-pi-supply-failed-to-start-concentrator-follow-up/4679 I need to modify "start.sh" script, but I have no idea what commands to type in so I get to it and do modifications. here is the script that I need to get to: RAKWireless/rak_common_for_gateway/blob/master/lora/start.sh #! /bin/bash # Reset iC880a PIN SX1301_RESET_BCM_PIN=17 echo "$SX1301_RESET_BCM_PIN" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/direction echo "0" > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/value sleep 0.1 echo "1" > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/value sleep 0.1 echo "0" > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/value sleep 0.1 echo "$SX1301_RESET_BCM_PIN" > /sys/class/gpio/unexport ./set_eui.sh sleep 0.2 #./update_gwid.sh ./local_conf.json sleep 0.5 ./lora_pkt_fwd
dariodaf
May 13, 2024, 23:28

Xwrapper not always working on PI3

I have a minimal raspberry os install with xfce on, using xorg-xserver-legacy, I have set anybody as Xwrapper configuration and I can run startx from systemd and ssh fine on raspberry 4; I am using the exact same install (same sd) for raspberry 3 too and all startx sometimes (decided at boot) doesnt work complaining about permissioms etc... (Like legacy was not installed or not configured) Putting need_root in the wrapper seems to solve the issue, I'd like to avoid that tho; I'd like to understand what makes it work all the time under pi4 and not pi3
j.o.ey.
May 13, 2024, 22:00

hwmon hwmon2: undervoltage detected!

im using the cable it came with plugged straight into the wall. im using a terminal based OS and its spamming that message and its annoying
f15shy
May 13, 2024, 21:19

Raspberry Pi B+ V1 2 discord bot host

not sure if this is the best place to ask, but to put it simply i need to download node.js version 14/16 so i can work with it inside of the Pi and then host the bot from the device, all my knowlage is in the writing part of the code so im completely lost trying to set this up, any help is appriciated and any more info you need please ask!!
incognitas0411
May 13, 2024, 19:19

Make Install Error 255 Permission Denied

Hi all, I am following miner installation guide here: https://github.com/maco2035/DiyHeliumHotspots/blob/master/RAK2287/Raspberry%20Pi%204B/Guide.md I messed up something on a line where it says: If you do not want to have to put in your password a million times in the next step, you can create a ssh key in the sub steps below otherwise skip to the next step. Create the ssh key pair. ssh-keygen -t rsa Press enter three times to accept the defaults. Set up your user to use the key pair. ssh-copy-id -i ~/.ssh/id_rsa.pub pi@localhost so I followed steps and came to the point: Make the executables: make install when making install it asks for password and then gives all errors below as I messed up something in previous steps so cant make an install I think I made a mistake where it says pi@localhost where I had to input my username??? please help sorting this out 😭 myusername@raspberrypi:~/sx1302_hal $ make install make install -e -C libloragw make[1]: Entering directory '/home/myusername/sx1302_hal/libloragw' ---- Copying libloragw files to localhost:/home/pi/sx1302_hal/bin pi@localhost's password: Permission denied, please try again. pi@localhost's password: Permission denied, please try again. pi@localhost's password: pi@localhost: Permission denied (publickey,password). make[1]: [Makefile:38: install] Error 255 make[1]: Leaving directory '/home/myusername/sx1302_hal/libloragw' make: [Makefile:36: install] Error 2
frosty_ken
May 13, 2024, 09:03

Raspberry pi potential in cyber security

So i am a cyber security student and am working on raspberry pie , I have been assigned with finding different ways on how raspberry pi is being used in the field of cyber security , they want me to gather around 50 topics , i have been researching about it and was wondering if you guys have any idea on the usage of raspberry pie in cyber security
csscooby
May 12, 2024, 21:29

Tow problem 1 My camera does not appeare in the config so i cant active the cam / 2 help for install

so 1 my camera does not appear either with the desktop or on the config I cannot activate it 2 i try to install an Object Detection with a tutorial but i have an error and i don't know how to solve it. The installing is blocked at the last line indefinetly it say "Installing build dependencies . . . \ " and i don't kwon what can i do somebody can help please
nebulafdv2
May 12, 2024, 18:44

How To Fix fbcp-ili9341 white screen issue and reverse display output

i connected ili9341 to pi zero 2w and it doesnt always start correctly it gets stuck on white screen but if i retry starting the binary multiple times after random retry it starts also idk how to reverse the display output also when it fails there is no error code Cmake Command: sudo cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DDISPLAY_INVERT_COLORS=OFF -DGPIO_TFT_DATA_CONTROL=25 -DCMAKE_BUILD_TYPE=Debug -DILI9341=ON -DSTATISTICS=0 ..
cryptokovri
May 12, 2024, 16:01

What RDP/VNC setup renders 3D printing slicers better? Desktop environments, X11 or Wayland?

I want to use RDP to load slicers on a pi so that I can modify the settings from an iPad/Phone.
omar7691
May 12, 2024, 03:15

removed lists

I was running sudo apt-get update on my raspberry pi, however, due to some network issues, I got some errors. I did not know it was due to network issues, but thought that it was due to some damaged list, so I ran the following command: sudo rm /var/lib/apt/lists/ -vf After that, I ran sudo apt-get update again, but the issue persisted, after which I concluded that it must be a network problem. I moved to a place with a better network, and ran sudo apt-update again. The previous error didn't show up, so I knew that it was a network error all along, and that the issue was gone. However, another error showed up: pi@retropie: Ì‹ $ sudo apt-get update apt-get: /lib/arm-linux-gnueabihf/libgcc_s.so.1: version GCC_3.5' not found (required by apt-get) apt-get: /lib/arm-linux-gnueabihf/libgcc_s.so.1: version GCC_3.5' not found (required by /lib/arm-linux-gnueabihf/libapt-private.so.0.0) apt-get: /lib/arm-linux-gnueabihf/libgcc_s.so.1: version GCC_3.5' not found (required by /lib/arm-linux-gnueabihf/libapt-pkg.so.5.0) apt-get: /lib/arm-linux-gnueabihf/libgcc_s.so.1: version GCC_3.3' not found (required by /lib/arm-linux-gnueabihf/libstdc++.so.6) apt-get: /lib/arm-linux-gnueabihf/libgcc_s.so.1: version GCC_3.5' not found (required by /lib/arm-linux-gnueabihf/libstdc++.so.6) apt-get: /lib/arm-linux-gnueabihf/libgcc_s.so.1: version GCC_3.0' not found (required by /lib/arm-linux-gnueabihf/libstdc++.so.6) I'm assuming the libraries I removed earlier using sudo rm /var/lib/apt/lists/ -vf caused this? How do I fix this? I already tried sudo apt-get install --reinstall gcc and sudo apt-get install --reinstall libstdc++6. They both just got the same results as above. I got the idea to run sudo rm /var/lib/apt/lists/* -vf from this thread over here: https://askubuntu.com/questions/454895/update-manager-bug-encountered-a-section-with-no-package-header/454899#454899
jpvgaster
May 12, 2024, 00:55

can anyone help compiling a pi pico uf2?

currently dont have a linux machine setup and was wondering if anyone that has a setup environment could help with compiling the usb microphone example found here: https://github.com/ArmDeveloperEcosystem/microphone-library-for-pico/tree/main/examples any help would be appreciated