Тёмный

How to use Bluetooth Controllers with Python on Raspberry Pi 

Core Electronics
Подписаться 126 тыс.
Просмотров 54 тыс.
50% 1

Опубликовано:

 

12 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 50   
@denisseromero4026
@denisseromero4026 5 лет назад
Thank you! it was a really good explanation. I'm a beginner so I'm happy to find a tutorial easy to understand like this one.
@tarnis3d
@tarnis3d 6 лет назад
This looks like exactly what I've been looking for...trying to control a robot over wifi and this looks like the missing link and simpler then PyGame.
@Sal19
@Sal19 Год назад
Hands down the best tutorial out there, easy and straight to the point. Thanks
@nejcpocrvina3630
@nejcpocrvina3630 7 месяцев назад
were you ableto install 'python-dev' , because i cant and i says that the packages replace it: python-dav-is-python3. So do i need to replace 'python-dev' with 'python-dav-is-python3' or something else?
@Walikanani
@Walikanani 3 года назад
thanks for the info, had to make a few modifications for my joystick, but pretty straightforward.
@Coolpackers
@Coolpackers 3 месяца назад
Guys heres some notes to make: 1. It MIGHT work after unplugging hdmi cable, highly unlikely to because hdmi cable is a form of dev/input/ event so basically once you unplug it, it wilk work, but if you are running a robot and you run the script on startup, the events will be different and thus it wont work 2. Raspberry pi doesnt have an on/off button and needs an sd card, just reminder, unless its raspi 5, but that one can only shut down and switch on and not turn off fully 3. A lot of the commands are outdated or need sudo, if commands dont work use sudo in front, if deprecated follow the new command, and python2.7 should be swapped to python3 more than likely since this video is outdated 4. I forgot to mention, any mouses or keyboards or cables plugged in raspberry pi count as events so that can mess with your script, i dont know work arounds beside using the command to see the events and trial and error 5. GREAT VIDEO 🙏 6. (Optional) Try to use a headless setup if possible
@TheWesterwaelder
@TheWesterwaelder 2 года назад
Thank you for the instructions. For me it helped me to read PS5 controller
@metaeditors
@metaeditors 5 лет назад
Excellent starter Tutorial got hot with PI and Python
@Illyrium_sacrum
@Illyrium_sacrum Год назад
I like the video, respect from Albania
@paulb8264
@paulb8264 6 лет назад
Great video. So straight forward. I have only just started to work on my project (Meccanum drive robot) I'll be using a xbox 360 controller, my 8bitdo NESPro30 does not want to connect no matter what I do. You mentioned button holding. Are you planning to make a second video about that or possible the other input types? Ideally I want to use the joysticks for navigation with my project.
@xmendes1212
@xmendes1212 7 лет назад
i got with codes of btns .. but with the axes control i cant. can u post a python code to read axes buttons? tks
@kevinduffy86
@kevinduffy86 5 лет назад
Thank you, really helpful video. I want to set up 2 SNES type controllers for 2 player pong game. How will this work for the 2nd controller, will it get its own unique values or will I need to reference the event() before the controller value?
@Koolkole27
@Koolkole27 2 года назад
How do you do it with thumb sticks on the controller?
@lgbonfim
@lgbonfim 3 года назад
Very useful! Thank you very much!
@owenbrook320
@owenbrook320 4 года назад
Hi, I was wondering if this script would work with a PS3 controller and pi, and if so how to use the inputs in writing a program for a robot? Thans
@msholly4608
@msholly4608 3 года назад
I'm a noob but I figured I'd give my thoughts. if you find the inputs for your controller you should be able to have your py script take those inputs from the controller to an if statement that would utilize the GPIO pins on the pi to make robot go brrr
@newretrorockets
@newretrorockets 6 лет назад
awesome tutorial! thanks! I used this to get an xbox one s controller reading into python on an RPI3 perfectly. Now Im just wondering if there is a way to handle the controller going to sleep (event 40) from within that for loop...as is, this causes the program to crash... any suggestions? thanks!
@andym3695
@andym3695 4 года назад
thank you
@panzerfaustnl
@panzerfaustnl 2 года назад
Oh this is a movie from 2017, ok no problem, is this usable with Pygame?
@RyuuzakiJulio
@RyuuzakiJulio 5 лет назад
What if you want to make your pi discoverable by other devices like iOS or Android? Is it even possible?
@IbarsDaniel
@IbarsDaniel 3 года назад
hey Sam, I'm following your tutorial with a Raspberry pi Zero W, I want to connect a generic PS3 controller but it turns out that when I hit the Bluetooth scan my raspberry disconnects me from ssh session
@jilljessurun2897
@jilljessurun2897 3 года назад
damn good tutorial thanks very much man
@KJ7JHN
@KJ7JHN 4 года назад
Beauty. Thank you for this tutorial.
@shuha3216
@shuha3216 3 года назад
Thanks! How to control rpi gpios via android like bluetooth controller?
@stinkyjutsu
@stinkyjutsu 2 года назад
so where's the follow up explaining which values to use and how to write the script to test the motor control?
@iand6309
@iand6309 4 года назад
I was following along fine until I started using python. I got a no module named evdev import error. Please Help! Also I just realized I have python 3.7 not 2. How do i get python 2 working?
@jojojorisjhjosef
@jojojorisjhjosef 4 года назад
I made it work for python 3 by installing it with pip3 (pip3 install evdev) then, I also got the "no module" error, which I solved by making python's path variable point towards it like this: import sys sys.path.append('/home/pi/.local/lib/python3.7/site-packages/') if your directory is something else you'd change it inside the brackets accordingly.
@olimac938
@olimac938 4 года назад
@@jojojorisjhjosef Ohhh god, you help me a lot. thanks for the answer really help me
@justinlin441
@justinlin441 3 года назад
Cannot get the hold info. Should it event.value == 2? My gamepad didn't get it. Does any anyone know why?
@NickTheHunter
@NickTheHunter 6 лет назад
Thank you for the video! Good explanation! I shall try to connect the PS3 controller to my RPi :3
@xandernorton2690
@xandernorton2690 5 лет назад
did this work for your ps3 controller?
@msholly4608
@msholly4608 3 года назад
My controller (8bitdo sf30) won't show up as an even in ls /dev/inputs. plz help
@jacobzweig6446
@jacobzweig6446 6 лет назад
what do i change if i want to hold down the buttons on the 8bitdo?
@vihangpathak9759
@vihangpathak9759 4 года назад
Hey can we use ssh to use joystick ?
@VecterProd
@VecterProd 6 лет назад
Hi hi. [bluetooth]# power on Failed to set power on: org.bluez.Error.Blocked I checked the net, didnt find any solution, any idea?
@alfredcornflake5032
@alfredcornflake5032 5 лет назад
I had the same problem. Use the command "sudo rfkill unblock bluetooth" , then do "sudo bluetoothctl" , "power on".
@ionheart9313
@ionheart9313 5 лет назад
Alfred Cornflake help it’s not working
@jhou-cyunsu6526
@jhou-cyunsu6526 3 года назад
Thanks a lot
@Core-Electronics
@Core-Electronics 3 года назад
Happy to help
@bobyau8755
@bobyau8755 Год назад
Does it work for python 3?
@tomueirin
@tomueirin 5 лет назад
No one will ever reply to this but how do we know which one is the controller?
@fvgoya
@fvgoya 5 лет назад
I think you just need to do what he did at 5:50
@Myrslokstok
@Myrslokstok 3 года назад
Turn it on and off.
@Coolpackers
@Coolpackers 4 месяца назад
If i unplug it from the monitor 1. Will it still work? 2. When i recconect the device, will it run the code again? Prob not
@Core-Electronics
@Core-Electronics 4 месяца назад
If you run the code and you unplug the Pi from a display it should all keep running
@Coolpackers
@Coolpackers 4 месяца назад
@@Core-Electronics alright I'll make sure to auto run the code whenever the pi is rebooted thanks
@黃柏軒-r9e
@黃柏軒-r9e 2 года назад
can this work on mac?
Далее
I2C with Arduino and Raspberry Pi - Two Methods
30:13
Просмотров 205 тыс.
How To Use Joysticks & Controllers in PyGame
14:52
Просмотров 20 тыс.
RC Helicopter Trick
00:13
Просмотров 7 млн
Bluetooth Controlled Raspberry Pi Rover
7:27
Просмотров 14 тыс.
Raspberry Pi Battery Power
20:34
Просмотров 344 тыс.
Tour of A Hacker's Backpack (My EDC)
24:58
Просмотров 2 млн
TailsOS Guide For The Ultra Paranoid
35:32
Просмотров 440 тыс.
Raspberry Pi Servo Motor Control
17:36
Просмотров 390 тыс.
RetroPie: A Raspberry Pi Gaming Machine
33:03
Просмотров 453 тыс.
What's the difference? Arduino vs Raspberry Pi
6:21
Просмотров 1,8 млн
RC Helicopter Trick
00:13
Просмотров 7 млн