Тёмный
RaspBerry Pi Made Easy
RaspBerry Pi Made Easy
RaspBerry Pi Made Easy
Подписаться 332
Комментарии
@brightfuturelearningacadem1042
@brightfuturelearningacadem1042 9 дней назад
This channel is EXACTLY what I was looking for, keep up the good work! However, I encounter an issue I don't know how to solve - The Pi 5 crashes, it seems, after the servo running for about 30 seconds. Do you know why this might happen?
@raspberrypimadeeasy
@raspberrypimadeeasy 8 дней назад
Thanks for reaching out! It sounds like the Raspberry Pi 5 might be experiencing some power or resource-related issues when running the servo for an extended period. Here are a few things you could try to troubleshoot: Power Supply: Ensure that your Pi 5 is getting enough power, especially if you're running multiple peripherals. Servos can draw significant current, which might cause the Pi to crash if the power supply isn't sufficient. Overheating: Check if your Pi is overheating. The Pi 5 has a higher performance than its predecessors, so it may generate more heat, particularly when running tasks like controlling a servo. You might want to check the temperature or use a heatsink/fan. Servo Power: If you're powering the servo directly from the Pi, it could be causing a power drop. It's recommended to use an external power supply for the servo to avoid overloading the Pi's power circuit. Code Optimization: Review the code controlling the servo to ensure there are no memory leaks or resource-intensive operations that might cause the crash after some time. Try these steps, and let me know how it goes.
@brightfuturelearningacadem1042
@brightfuturelearningacadem1042 8 дней назад
@@raspberrypimadeeasy Hi, I'm using the active cooler with the Pi 5. I'm not sure how to monitor temperature better. As for the Servo power, I tried powering the servo externally at current 5v==1.8A, but this caused the Pi to crash immediately. I think I changed the library or something and it seems to be working for now. I'm not entirely sure, but it is fine for now, and I don't know what I did! 😅 Thanks for the vids though, hope you'll make more! Do you have one maybe from people used to Arduino looking to use a Pi? I would definitely watch
@raspberrypimadeeasy
@raspberrypimadeeasy 8 дней назад
@@brightfuturelearningacadem1042 Glad it worked, looking forward to making more videos. Your support is appreciated
@Poylo
@Poylo 10 дней назад
what do I do if my 16x2 lcd screen has a board on the back that only needs 4 wires? (ground, 5V, gpio 2, gpio3 needed) how do i change the code to use the pins that im using
@raspberrypimadeeasy
@raspberrypimadeeasy 10 дней назад
If your 16x2 LCD screen only requires four connections (ground, 5V, GPIO 2, and GPIO 3), you can adjust the code to match these pin requirements. Code Adjustments Change the GPIO Pins: Update the pin definitions to match the GPIO pins you are using. Use I2C Communication: Since you're only using two GPIO pins for data, it's likely your LCD uses an I2C backpack. You can utilize the smbus library or the gpiozero library with I2C support. Here's an example code snippet to get you started: python Copy code from gpiozero import LED from time import sleep from luma.lcd import CharLCD # Define the pins for I2C lcd = CharLCD(pin_rs=2, pin_e=3) lcd.clear() lcd.message("Hello, World!") Explanation pin_rs=2 and pin_e=3: This indicates which GPIO pins are used for RS and E (Enable) signals. Using I2C: If your display uses an I2C interface, you'll need to install the relevant library (luma.lcd in this case) that simplifies the code and makes it compatible with fewer connections. If the display requires a specific library (like Adafruit_CharLCD for standard connections), check the documentation for details on using fewer pins. Final Note Make sure to confirm the wiring based on the type of LCD you're using. If it's an I2C LCD, you should also ensure you have the correct library installed and configured on your Raspberry Pi.
@Poylo
@Poylo 10 дней назад
@@raspberrypimadeeasy i made sure the binary is correct and i also installed luma.lcd, but the code still doesnt work and it says Traceback (most recent call last): File "/home/pie/Desktop/screen.py", line 3, in <module> from luma.lcd import CharLCD ModuleNotFoundError: No module named 'luma' Sorry for asking for help again but i am seriouslly lost at how i could fix this.
@raspberrypimadeeasy
@raspberrypimadeeasy 10 дней назад
@@Poylo It looks like you're encountering a couple of issues. Let's tackle them one by one. 1. ModuleNotFoundError: No module named 'luma'** This error indicates that the `luma.lcd` module isn't installed correctly. You can try reinstalling it using pip: pip install luma.lcd Make sure you're using the correct Python environment where your script is running. 2. Using a 16x2 LCD with I2C Module For your 16x2 LCD screen that uses only 4 wires (ground, 5V, GPIO 2, GPIO 3), it sounds like you're using an I2C module. This simplifies the connection and reduces the number of GPIO pins needed. Here's how you can modify your code to use the I2C interface with the `luma.lcd` library: 1. **Install the required libraries**: pip install luma.lcd smbus2 2. Modify your code: Replace your existing code with the following: from luma.core.interface.serial import i2c from luma.lcd.device import hd44780 from time import sleep # Initialize I2C interface serial = i2c(port=1, address=0x27) # Adjust the address if necessary device = hd44780(serial) # Define LCD parameters LCD_WIDTH = 16 # Maximum characters per line def lcd_string(message, line): """Send string to display.""" message = message.ljust(LCD_WIDTH, " ") device.text = message device.show() # Main program loop if __name__ == '__main__': while True: lcd_string("Raspberry Pi 5", 1) lcd_string("16x2 LCD Display", 2) sleep(3) ``` This code uses the `luma.lcd` library to interface with the LCD via I2C. Make sure to adjust the I2C address (`0x27` in this example) if your module uses a different address. Additional Tips - Check Connections**: Ensure that your I2C connections are correct (SDA to GPIO 2, SCL to GPIO 3). - I2C Address**: If you're unsure about the I2C address, you can use `i2cdetect` to find it: sudo apt-get install -y i2c-tools sudo i2cdetect -y 1 ``` This should help you get your LCD working with the I2C interface.
@Redyf
@Redyf 14 дней назад
It worked for me, thanks! I was looking for a tutorial for the PI5 and this one helped me.
@raspberrypimadeeasy
@raspberrypimadeeasy 13 дней назад
Glad it worked
@mahmoudsalah7628
@mahmoudsalah7628 26 дней назад
Love it ❤ But I think u might have made into a short under 1 min by showing the connections in a schematic maybe and omit the time needed to show it done
@raspberrypimadeeasy
@raspberrypimadeeasy 25 дней назад
Great suggestion!
@SJr9869
@SJr9869 27 дней назад
Thank you !
@raspberrypimadeeasy
@raspberrypimadeeasy 26 дней назад
No worries!
@amirphilip2234
@amirphilip2234 27 дней назад
Hello, recently I was working on a project and it was my first time trying to access the Raspberry Pi 5 GPIOs. I encountered the error that says Runtime error: Could not determine the SOC peripheral base address ? I was using gpiozero library,can you help me with that
@raspberrypimadeeasy
@raspberrypimadeeasy 26 дней назад
Hi! The error you're encountering typically happens when the system can't detect the correct hardware base address for the GPIO pins. This can be resolved by ensuring that your Raspberry Pi is fully updated. You can try running the following commands: ``` sudo apt-get update sudo apt-get upgrade ``` Also, make sure the `gpiozero` library is installed and configured properly. If the issue persists, consider switching to the `RPi.GPIO` library to see if that helps. Hope this helps!
@Rinoceros78
@Rinoceros78 Месяц назад
my servo jitters please help
@raspberrypimadeeasy
@raspberrypimadeeasy Месяц назад
To address the jittering issue with your servo, try adjusting the min_pulse_width and max_pulse_width values, as different servos may require slight tweaks in those values to operate smoothly. Some servos are more sensitive to pulse width variations, and using values that are too low or high can cause jittering. Additionally, you could try adding a small delay (like `sleep(0.05)`) between angle changes to prevent rapid movement, which sometimes helps reduce jitter.
@mrkeji1002
@mrkeji1002 Месяц назад
any idea why echo pin can't reach high?
@damiank4198
@damiank4198 Месяц назад
I don't know, but I had to edit the line of code chip = gpiod.Chip('gpiochip0')
@raspberrypimadeeasy
@raspberrypimadeeasy Месяц назад
My understanding is that you had to change the line chip = gpiod.Chip('gpiochip4') to chip = gpiod.Chip('gpiochip0') because the GPIO chip on your system is identified as gpiochip0 instead of gpiochip4. This can vary depending on the hardware and configuration. Thanks for pointing that out
@alicam3796
@alicam3796 Месяц назад
How can we solve shaking problem after completed movement?
@g-4660-i4l
@g-4660-i4l Месяц назад
you are a solved this problem?
@shef7777
@shef7777 Месяц назад
@@g-4660-i4l no solved
@raspberrypimadeeasy
@raspberrypimadeeasy Месяц назад
Try the following: 1. Use a stabilizing delay: Add a short delay after the movement, allowing the servo to stabilize. For example, `sleep(2)` after setting the angle might help reduce shake. 2. Adjust the pulse width: As with jittering, adjusting the `min_pulse_width` and `max_pulse_width` to fine-tune the signal to match the servo’s specifications could reduce shaking. 3. Check for power supply issues: Make sure your power supply is consistent and sufficient to drive the servo motor without fluctuations.
@msaaladl7869
@msaaladl7869 2 месяца назад
Thanks for your video , How to connect L298n with raspberry pi 5
@raspberrypimadeeasy
@raspberrypimadeeasy 2 месяца назад
Planning to release that video
@raspberrypimadeeasy
@raspberrypimadeeasy Месяц назад
Video is now live at ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0hxznifVx60.html
@chen6447
@chen6447 2 месяца назад
感謝您!受惠良多!
@raspberrypimadeeasy
@raspberrypimadeeasy 2 месяца назад
Glad it provided value 😊
@qzorn4440
@qzorn4440 2 месяца назад
This is a most helpful video. Is there a video installing and setting up the GPIOZERO software? Thank you.
@qzorn4440
@qzorn4440 2 месяца назад
This is a wonderful RPi5 servo example. Do you have a video using the RPI5 controlling the PWM pins for the brightness of a LED? Thank you.
@Mr.woman_lover
@Mr.woman_lover 12 дней назад
you can find that in the internet
@boudaoudpipo9597
@boudaoudpipo9597 2 месяца назад
Very nice tutorial I need how programme motor and sensor by vs code in raspberry pi 5 not ssh
@simratsingh2453
@simratsingh2453 3 месяца назад
Thanks for the video. Pleaseee make a lot more. There are very few resources for RPI5.
@raspberrypimadeeasy
@raspberrypimadeeasy 2 месяца назад
Sounds good!
@miguelmurillo3159
@miguelmurillo3159 3 месяца назад
Hi! I really appreciate that you're making videos about GPIO on the Pi 5. I'm just starting to learn how to use this board, and I've found that there's very little information for beginners about using the GPIO port on the Pi 5. I would appreciate it if you could let me know where I can find more information on this topic ( I would prefer not to use the gpiozero package). I hope you continue making these instructional tutorials. Specifically, I'm looking for guidance on how to use an ADC like the 16-bit ADS1115 I2C to work with analog sensors.
@FHCRT2
@FHCRT2 4 месяца назад
not working
@raspberrypimadeeasy
@raspberrypimadeeasy 4 месяца назад
@FHCRT2 can you provide more details on what's not working ?
@FHCRT2
@FHCRT2 4 месяца назад
@@raspberrypimadeeasy It does not work
@raspberrypimadeeasy
@raspberrypimadeeasy 4 месяца назад
@@FHCRT2 if you require more help please provide more detail on what's not working. I won't be able to help you if I don't know what's not working
@FHCRT2
@FHCRT2 4 месяца назад
@@raspberrypimadeeasy I used the whole code you wrote and it is not working. Also I have a raspberry pi 4 not arduino Uno. And I have a breadboard connected with a transfer of all GPIO pins to the breadboard.
@SchlumpfderMaster
@SchlumpfderMaster 5 месяцев назад
very good tutorial, cant read anything, cuz u got such a "good" quality, useless to me, but thx
@raspberrypimadeeasy
@raspberrypimadeeasy 4 месяца назад
Thank you for your feedback!
@lagtabhamza1676
@lagtabhamza1676 5 месяцев назад
Hi can i ask you please, is there's is a sensor that can present radar sensor ( calculating speed and velocity ) ? if yes tell me and thaak you so much brother
@raspberrypimadeeasy
@raspberrypimadeeasy 5 месяцев назад
Yes, there are radar sensors that can be used with a Raspberry Pi to calculate speed and velocity. Here are a couple of examples: • OmniPreSense OPS243-A Doppler Radar Sensor: This sensor was used in a project to build a “speed trap” that uses machine learning to identify vehicles and a radar sensor to measure speed1. The data was then reported to the cloud1. • HB100 Radar Sensor: This sensor can be wired to a Raspberry Pi to calculate the speed/velocity of an object2. • A111 Pulsed Radar Sensor: This is a single-chip solution for pulsed coherent radar (PCR) and comes complete with antennae and an SPI interface capable of speeds of up to 50MHz3. Applications for PCR include distance-sensing, gesture, motion, and speed detection. Check out this links below wiki.ros.org/Drivers/Tutorials/SpeedMeasurementWithRadarSensorHB100Python www.tomshardware.com/news/raspberry-pi-mobile-speed-trap learn.sparkfun.com/tutorials/getting-started-with-the-a111-pulsed-radar-sensor/all
@lagtabhamza1676
@lagtabhamza1676 5 месяцев назад
@@raspberrypimadeeasy I just want to know if there's sensor's do the same thing, that i can use in proteus simulation
@raspberrypimadeeasy
@raspberrypimadeeasy 5 месяцев назад
You can simulate the ultrasonic sensor in Proteus using the Ultrasonic Sensor Library
@carhistorian
@carhistorian 5 месяцев назад
I haven’t gotten one of these yet. Still waiting for retropie to support it.
@thegrmah5531
@thegrmah5531 5 месяцев назад
Amazing video!
@BradenNeighbor
@BradenNeighbor 5 месяцев назад
Hello ! Thank you for making this video. This is one of the rare videos I saw on raspberry pi 5 GPIO projects. I just have one issue though. The code, while not giving any compiler time error, it doesn't work. The powershell just stays black, no values appear on the screen. I copied your code on my raspberry pi 5 and checked the GPIOs. It's still blank. The only part that I didn't do is the CMD part at the very end. I just run the code with the run button. Is there some way to fix this ?
@raspberrypimadeeasy
@raspberrypimadeeasy 5 месяцев назад
Hey @BradenNeighbor, Give this link a Read mesquite-bead-b16.notion.site/Read-Me-c99015f8dd4f48c6861445a952b40d56 If it still doesn't work Here are a few things you could check: Wiring: Please ensure that the wiring of the ultrasonic sensor to the Raspberry Pi is correct. The TRIG and ECHO pins should be connected to the correct GPIO pins on the Raspberry Pi. Sensor Functionality: Check if the ultrasonic sensor is working correctly. You can do this by testing the sensor on a different circuit or using a multimeter to check if it’s sending and receiving signals. Run in Terminal: You mentioned you didn’t use the CMD part at the end. It’s possible that the script might not run correctly if it’s not executed in a terminal. Try running the script directly from the terminal using the command python3 [script_name].py, replacing [script_name] with the name of your Python script. Permissions: Ensure the script has the necessary permissions to access the GPIO pins. You might need to run the script with sudo to give it these permissions. Python Version: Check if you are using the correct version of Python. This script should be run with Python 3. lgpio Library: Ensure that the lgpio library is correctly installed and working. You can test this by running a simple script that turns an LED on and off. Remember, it’s always important to troubleshoot step by step, checking the most likely issues first. I hope this helps! Let me know if you have any other questions.
@taseadrian6401
@taseadrian6401 5 месяцев назад
Hello mate i did all the steps but gaved me the message "in <module> import lgpio as GPIO" and is there anyway to do something? (And also is saying "No module named 'lgpio' ")
@raspberrypimadeeasy
@raspberrypimadeeasy 5 месяцев назад
It seems you’re encountering an issue with the ultrasonic sensor code on your Raspberry Pi 5. Import Error for ‘lgpio’: The error message “No module named ‘lgpio’” indicates that the lgpio module is missing. To resolve this, you can try using the gpiod library instead of RPi.GPIO. The Pi 5 uses gpiod for GPIO access. Install the lgpio package by running: pip install lgpio Update your code to use gpiod: Python import lgpio
@carlosfgomez17
@carlosfgomez17 6 месяцев назад
With these 3 sensors how long is the maximun distance that is get?
@BeilaMohachek
@BeilaMohachek 6 месяцев назад
4 metter ! You have blue print from this how to connet? I nothing understand what this meen speak
@WalkingBlock
@WalkingBlock 9 месяцев назад
great thanks
@fordo111
@fordo111 9 месяцев назад
Why is the 2k ohm resistor not repeated for the other sensors?
@RixtronixLAB
@RixtronixLAB 9 месяцев назад
Nice video, thanks :)
@nutto4582
@nutto4582 11 месяцев назад
Hello there!! super useful video thank you very much. I use it with my autonomous car project. For this sensor, if I have only 2 resistors, will I be able to use it with multiple sensor?
@Detopie
@Detopie 11 месяцев назад
i don’t have a 2kohm resistor, but i have lots of 1KOhm. how would i wire it that way?
@JellyFoxYT
@JellyFoxYT 11 месяцев назад
the resistance can stack
@amroelmughrabi
@amroelmughrabi Год назад
Did you film with potato?
@ajinkya26
@ajinkya26 Год назад
Is there any reference for the pin connections I can refer to
@sushantjadhav7571
@sushantjadhav7571 Год назад
I Want to connect three ultrasonic sensor to my pi as I am making a cleaner mop robot ,,,, can u guide me how can I connect three ultras ( front , left and right ) so for robot to move in a room , i don't want to use bread board ,...can u please help >? ..
@mallanagoudameti5898
@mallanagoudameti5898 Год назад
where is code..?
@crashhhhhhh3068
@crashhhhhhh3068 2 года назад
I'm not getting a continuous output. I need to keep pressing Run on the code in order to get a single reading. Anyone knows how to fix this?
@wanderingsaint2659
@wanderingsaint2659 Год назад
Same here did you find the answer
@crashhhhhhh3068
@crashhhhhhh3068 Год назад
@@wanderingsaint2659 nope
@sameel9777
@sameel9777 Год назад
Yes , You can add “while (True):” Then put your code after this sentence then it will run continuously
@leenavin2005
@leenavin2005 11 месяцев назад
Put your code in a for loop or while loop and that should give you a continuous reading. I have noticed that the sensor gets overheated sometimes, hence make sure that you let it rest for some time using sleep.
@siriustoolshobbies229
@siriustoolshobbies229 2 года назад
hi, i would like to see the squematic. the all pin connections, can i ge it?
@siriustoolshobbies229
@siriustoolshobbies229 2 года назад
Can i add 2 more sensor in the same raspberry? volts/amps problems?
@JellyFoxYT
@JellyFoxYT 11 месяцев назад
I know this is super late but volts are the amount of pressure and won't change unless you either add more power sources change the voltage on the existing one. The sensor needs 5V and the GPIO pins get fried on anything more than 3.3V. Amps shouldn't be a problem either.
@malithaperera9801
@malithaperera9801 2 года назад
how many ultrosoinis sensor connect with a single rash pi 4?
@wajadadkarim1708
@wajadadkarim1708 2 года назад
working
@nedsonbeulamw870
@nedsonbeulamw870 2 года назад
Thank you very much
@thegrmah5531
@thegrmah5531 2 года назад
WOW thank you so much. This was the exact video I was looking for!
@sindhuvajrala
@sindhuvajrala 2 года назад
Hi, where did you get the mounting structures you used for the the two sensors? is there a 3D printing file available?
@egbuzobijoel581
@egbuzobijoel581 2 года назад
very nice and simple work
@a.m.lorenzo4457
@a.m.lorenzo4457 2 года назад
Yo dude this is very helpful! I needed this for my college project, apparently I need three ultrasonic sensors to work. Also, do i have to buy a breadboard like what you used? I was just confused why you didn't list the breadboard on the equipment needed. What size of breadboard did you use? Thanks a lot!
@raspberrypimadeeasy
@raspberrypimadeeasy 2 года назад
Glad I could help! Good point, I have included a breadboard on the equipment's needed now. A full size or half size breadboard will be a good fit for connecting two sensors
@azzalos
@azzalos 2 года назад
I would like to connect 100 of these to the Pi. Can you advise what hardware to get to make it easiest and most compact? I need to line up the sensors over a 5 meter line.
@raspberrypimadeeasy
@raspberrypimadeeasy 2 года назад
This link could help stackoverflow.com/questions/41428191/connecting-more-than-100-ultrasonic-sensors-to-a-single-raspberry-pi-3. I have not tried that before to be honest with you
@jamesrobb9632
@jamesrobb9632 2 года назад
Excellent program. I would like to download your code, is it possible?
@raspberrypimadeeasy
@raspberrypimadeeasy 2 года назад
Yes it's possible, the code can be found in the description.
@yashkelhe9508
@yashkelhe9508 Год назад
@@raspberrypimadeeasy where can i find link bro ........in the description i haven't seeen any code attached link
@rishabbasutkar7463
@rishabbasutkar7463 3 года назад
How do I connect the RS485 sensor to the Raspberry pi 4 ?
@vomm27
@vomm27 3 года назад
im getting waiting for sensors to settle then no reading any idea bro whatwent wrong
@marck4039
@marck4039 2 года назад
did you figure it out
@wajadadkarim1708
@wajadadkarim1708 2 года назад
@@marck4039 change TRIG from 16 to 23 and ECHO from 18 to 24 into the code only.
@wajadadkarim1708
@wajadadkarim1708 2 года назад
it needs GPIO value not pin number
@JellyFoxYT
@JellyFoxYT 11 месяцев назад
@@wajadadkarim1708 I have it wired to GPIO pins 21 and 20 and in the code, I assigned the right values to the variables. I don't know what the issue is though.
@suomynona7261
@suomynona7261 6 месяцев назад
@@JellyFoxYTdid you figure it out?
@vomm27
@vomm27 3 года назад
bro seems you connected pin 2 to negative railway and pin 6 to positive railway can you please confirm
@revathybashkar8545
@revathybashkar8545 3 года назад
Is that possible for connecting 6 adxl345 sensors via spi connection? How to write a code for that?
@crisagudo1256
@crisagudo1256 3 года назад
how about measuring distance between two object how many ultrasonic sensor will be used?
@raspberrypimadeeasy
@raspberrypimadeeasy 3 года назад
To determine distances between two points, a process known as triangulation can be used, and you can use two ultrasonic sensors. For more information, you can refer to these links below: circuitdigest.com/microcontroller-projects/measuring-distance-between-two-ultrasonic-sensors-using-arduino circuitdigest.com/microcontroller-projects/measuring-distance-between-two-ultrasonic-sensors-using-arduino