Это видео недоступно.
Сожалеем об этом.
Raspberry Pi Pico & Bluetooth
HTML-код
- Опубликовано: 18 авг 2024
- Do you want to know how to add Bluetooth to your Raspberry Pi Pico? Then this is the video for you. In this video we'll look at UART, Serial communications in MicroPython and Bluetooth modules.
For more information, tutorials, parts and more visit:
www.smarsfan.com
Enjoy this video? Buy me a coffee!
www.buymeacoff...
Music by Epidemic Sounds
www.epidemicso...
Pico Bluetooth MicroPython Code on GitHub:
github.com/kev...
#Pico #MicroPython #Robotics
Forgot to mute the webcam microphone 😄. I make the same mistake sometimes. This info is extremely helpful. Thank you!
Fantastic video Kevin - I'd glad to see you getting more support and exposure from the Raspberry pi Foundation too. Your Pico W videos are excellent - but this is still relevant for Bluetooth and so much better informed than the usual stuff that can't see past the HC-05/06s!
very nice video - thank you
btw I think you mixed up completely the explanation about pull up/down resistors at @30:00 - by using them you bring known status to the IN pin BEFORE you short it either into +3V or GND. If you pull up, this pin is ALWAYS high so your button should be connected one side to pin and one to GND. When you press it, pin will get LOW. For pull down it will be opposite: pin by default will be on GND and button should be connected between pin and +3V. When pressed pin will get HIGH.
continue this with stopping as it is the best
Great Video Kevin, your a very smart man. Well explained
Thanks Fred, you’re too kind
Awesome video! thank you for doing that!
I was wondering if I can use the RPI Pico W, to scan for bluetooth devices (classic use)? example: list all of BT devices near it. (like: iPhones, iPads, Tablets, etc)
Thanks!
Great explaining , you do great work here 💯
Thanks!
How you set up Vscode with Pico along with Micropython. Please make a separate video on that.
Good one, sir! Thanks, I need to use C,
with the print command you can simply set the named parameter 'sep' to an empty string and then you will not get a space in between print entries.
Like so:
a = "Hello"
b = "World!"
print(a, b, sep = "")
The result will be 'HelloWorld!'
it is a lot cleaner looking than what you did.
This channel has been so helpful for me recently! I saw your tutorial on connecting the Bluetooth xbox controller to the Pi zero and I was wondering if the same was possible with this setup? (the pi pico and the Bluetooth module)
the comma automatically adds a space. if you want them together concatenate them using the plus operator
Not watched all the video ... but it occurs to me that you could possibly get two Picos talking to each other. Does that sound reasonable?
Yes yes! Very easy to do
Hi -- I just picked up an HM-19, and trying to get this code to work. I'm having a bit of a problem trying to get it to respond to AT commands. uart.readline() just seems to hang. I'm wondering if I should have stuck with a bluetooth 4 device. Once I get the device paired, it does seem to return things, but only after it disconnects for some reason... still trying to figure this out.
Thanks for this video -- has been a great motivator for me to get a project going.
Looks like I might have solved my own problem by updating the firmware on the Pico from 1.13 to 1.15.
Hello Kevin. How does blue tooth compare to NRF24. I am using this RF chip with the Arduino Nano. I think NRF24 works better for longer ranges.
Hi there, great video! I am having some trouble with my project and I wonder whether you could point me in the right direction. I want to use a Raspberry Pi Pico to control an RC car via Bluetooth. I use IOS so have bought the Adafruit Bluefruit LE UART Friend module but I am struggling to find any information about how to connect and utilise the components (despite hours of internet searches).
Hey Rhys - if you join our discord server I’m sure we can get to the bottom of that issue - action.SMARSfan.com/join-discord
That’s a great video! And all the explanations like
are brilliant little goodies along the way
Seen any BT 5.1 or 5.2 modules available for the Pi? i'm looking for a small board that i can attach to a pi which can all be taped to a drone. Currently i'm looking at a dev board from silicon labs but even that board is pretty large compared to my pi and zero.
Yes - you can get very small bluetooth modules, smaller than the ones I showcase in this video. requires a steady hand with a soldering iron though
Hiya, I just got an HC-05 to play with (cheapest) and using your picoterm code i have managed to get it named and paired to my Android phone :) However, the device refuses to reply to AT commands and also I have to comment out this line "data_output = uart.write("Got: ", data_input)" or i get an error "TypeError: can't convert bytes to int" - any ideas??? The device does seem to function though, great video again ;)
The write function can only write bytes - so you need to pass it a string it can convert to a byte array. It doesn’t work like a print statement which is why it’s saying type error
@@kevinmcaleer28 Ok, thanks, in the context where it appears, what function does that line perform? - i see we are reading bytes in but does it then write the "data_input' back to the UART?
how can i set up a bluethooth connection between raspberry pi 4 and pico?
You’ll need two Bluetooth modules and connect them both to a pair of pins that support UART, then in your favourite programming language, create a serial connection to the Bluetooth module.
@@kevinmcaleer28 Thank you very much for your reply Kevin.
pi4
port = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=1)
pico
uart0 = machine.UART(0,baudrate=9600)
Is it enough if I do this?
@@safakfahrac1524 Yes That should do it! You can use the Raspberry Pi Bluetooth manager to connect & pair and then its just like writing to a serial port
@@kevinmcaleer28 Thank you very much for your reply. If you come to Turkey, the food is on me.
BUT
"Using Raspberry Pi Bluetooth manager to connect and pair"
I do not know this.
@@safakfahrac1524 awesome! The Bluetooth manager is just the ‘B’ Bluetooth logo next to the clock in the raspberry pi desktop, click on that and then ‘Add device’, it will turn search for Bluetooth modules nearby.
I've had difficulty getting this code to work on my Pi Pico. Every time I type an AT command, my command gets printed, but the next line is just blank and then returns to asking me for an input again. I'm not sure what could be wrong.
I had some issues with BT modules of different types, each seems to have either a different BAUD rate, or a different format for the AT commands. If you can google the exact type of module you have, you should be able to find the data specification sheet and AT commands it accepts. If you want more help - join our discord group and ask the question in there (its easier to share pictures of the module etc.) action.smarsfan.com/join-discord
at 26:30 - print(a+b) ??
It’s print(a,b)
@@kevinmcaleer28 question was - how to get a and b printed with no space between - answer is - concatenate a+b not a,b
Im not good at coding so i understand nothing 😢
I have pi pico and i use it for arcade stick that i follow tutorial from youtube, i want to make it wireless but i dont know how to code it, i know i need Bluetooth module but that's it.😢
can you share the link to the app on the phone please?
Its called Dabble - if you look in the Apple app store or the Android app store you should be able to find it.
Raspberry Pi Pico W still does not have BLE. Wifi is overrated for robots.