Easiest ESP32 BLE (Bluetooth Low Energy) Tutorial | Arduino

  Рет қаралды 94,342

LiveSparks

LiveSparks

Күн бұрын

Пікірлер: 113
@LiveSparks
@LiveSparks 5 жыл бұрын
How many times did I say 'BLE'?
@crazytom
@crazytom 5 жыл бұрын
What's the current consumption of this loaded board while running this "Low Energy" sketch?
@LiveSparks
@LiveSparks 5 жыл бұрын
That's a good question. I haven't actually measured the current consumption on this board but on the M5Stack (a ESP32 board with an absolutely minuscule battery), the everything-to-string sketch runs for about a hour (while a client is connected) while a WiFi web server sketch dies within minutes.
@mewintle
@mewintle 4 жыл бұрын
I’ve been struggling with an ESP-32 BLE project for a long time. It’s a project for reading devices for medical missions to 3rd world locations. I’ve read dozens of articles, PDFs, etc. All were too low-level or high-level. From this I understand all the theory, but putting it into practice has been too much. This is the first resource that gave me hardcore practical information. I’m excited that now I understand how I can make it work! Thank you so much for this help!
@rakithadealwis8468
@rakithadealwis8468 4 жыл бұрын
best BLE tutorial i have seen so far !!
@BenjaminLovelady
@BenjaminLovelady 2 жыл бұрын
Super helpful to have this info in a short video I've been able to rewatch whenever i need to write BLE code. Thanks!
@MRRAWRAW1
@MRRAWRAW1 4 жыл бұрын
Amazing clear guide! Im looking into building my own vertical hydroponic garden and using audrinos in order to compile data on the garden and make sure its recieving proper amounts of water and nutrients. Please keep it up!!
@sandeepsinghjagdev3485
@sandeepsinghjagdev3485 4 жыл бұрын
Best tutorial also I want to know that is connection remain connected when esp32 wakes up from deep sleep (i use deep sleep for very low battery power consumption (1mA) )??
@bolow
@bolow 2 жыл бұрын
Thank you so much, for the through explanation of the BLE basics, even though I knew most of it, you clarified some of questions I had.
@antonellostella8544
@antonellostella8544 5 ай бұрын
Hi, I can't find the definition of the temperatureCharacteristic function. Can you tell me where it was defined to understand how it works? Thanks
@trantuan4558
@trantuan4558 4 жыл бұрын
Thanks for your clear instruction. How about making a BLE beacon. Do you have any project that touched on subject ?
@miketony2069
@miketony2069 4 жыл бұрын
Very good detail description of BLE on ESp 32
@solosailorsv8065
@solosailorsv8065 3 жыл бұрын
The BLE Viewer App does not see any devices at all, the nRF Connect works fine as sees all BLEs in the area
@jairoalbertoreyes
@jairoalbertoreyes 4 жыл бұрын
Good video, how can I make a simple process a resend some data to the phone? For example, a humidity sensor and a light sensor send data to a device, and then the device sends these data to my phone via Bluetooth. Can a ESP32 be configured as Client and server at the same time? Thanks
@shaiseg
@shaiseg 4 жыл бұрын
Thanks for a great tutorial! May I ask where do I find the XML that defines a pre-defined standard characteristic like the temperature (8:30 in the video) I do not find it anywhere in bluetooth site. The service XML does not have this info. Thanks!
@tanujsharma2647
@tanujsharma2647 2 жыл бұрын
how to configure wifi by using ble in esp32 using arduino? Do you have any video in this regard?
@Neuro010
@Neuro010 11 ай бұрын
Hi, I want to send an int type array of lenght 34 over BLE and recieve it using matlab. can you please help me out here how to proceed!
@wei48221
@wei48221 3 жыл бұрын
This is a very helpful tutorial for newbies. Thank you very much for your effort.
@mattygsa
@mattygsa 4 жыл бұрын
Great video thanks. Question. Am I able to send a bluetooth classic throttle signal over serialBT from a transmitter ESP32 to a receiver ESP32 whist also sending temperature readings back to the transmitter ESP32? If so! Would I use BLE for this? Can I even use BT and BLE at the same time?
@keepsafesystems2995
@keepsafesystems2995 2 жыл бұрын
Hi there. I hope you are still active. I need to build a bluetooth scanner which fires a relay when a specific bluetooth device is in the proximity. I have a firebeetle and the arduino IDE. I am lost from that point on. I can't find the board in the list, I cannot seem to connect. Yes, I am a n00b
@davidkempton2894
@davidkempton2894 8 ай бұрын
Thanks very much for this! Your explanation was very useful. Thanks for telling us about chars too.
@solosailorsv8065
@solosailorsv8065 3 жыл бұрын
Please clarify: This sets up the ESP32 as a BLE Server in Broadcast mode? THANKS
@LiveSparks
@LiveSparks 3 жыл бұрын
Yes
@rahmanmahmud2566
@rahmanmahmud2566 4 жыл бұрын
How to receive integer data from an iphone BLE app? I was able to receive just 1 digit in ASCII. No matter the length of my data is it only take the first digit in consideration. But if I send whole string like name then it is fine. This is the receiving code" if (rxValue.length() > 0) { Serial.println("*********"); Serial.print("Received Value: "); for (int i = 0; i < rxValue.length(); i++) x = (rxValue[i]); Serial.println(x); I want to assign any value I send from my iphone
@axa.axa.
@axa.axa. 5 жыл бұрын
You can send more than a single byte in a characteristics value. Using the setvalue byte array parameter is not a workaround, it's a feature
@LiveSparks
@LiveSparks 5 жыл бұрын
You are right, of course. I should have worded that better.
@SA-oj3bo
@SA-oj3bo Жыл бұрын
Hi , I would like to replace HM10 by the ESP32 BLE so that the existing Android and IOS app's can be used without the need of the HM10. Can you or someone here give some advice please? I changed the UUID's already but that seems not enough. How to modify the code to replace the HM10? Thx.
@valentingomez4546
@valentingomez4546 Жыл бұрын
im having an extremely hard time making this work on a psoc 6 board, the code is kinda similar but some of the concepts differ a little bit, if possible, could you do a tutorial with a board of the psoc 6 family using Eclipse IDE?
@seekyou
@seekyou 2 жыл бұрын
What should I put in the ESP32 disconnect function in order to let the ESP32 be advertised for a new connection? Its seems the code in the setup is executed one time and when I disconnect client device (a MIT appinventor custom app) I cannot reconnect again. The ESP32 server is stopped - maybe you have a link to correct configuration for a MIT app disconnect command?
@shaiknadeemsameer8168
@shaiknadeemsameer8168 4 жыл бұрын
sir, can we consider RSSI value without pairing one with another BLE and perform action based on RSSI value?
@rickmiles3701
@rickmiles3701 4 жыл бұрын
Trying to get a 2nd ESP32 to act as a client for the BLE switch (server). Any suggestions on what code to load on the client side?
@paytufo
@paytufo 4 жыл бұрын
How could I do to read the Slope in Zwift (bike simulator) and the said a motor move to position 1 to 10?
@ceptic7707
@ceptic7707 4 жыл бұрын
Hi, I'm making an android app like mojipic with ble. Can you help me? I have to convent gifs to c array and then show it on a led panel with arduino
@rghrg
@rghrg 3 жыл бұрын
Hi! Do you know any method to limit on the server the number of incomming connections (clients) to one? Thank you.
@LiveSparks
@LiveSparks 3 жыл бұрын
You can use pAdvertising->start() after the first client has connected.
@rghrg
@rghrg 3 жыл бұрын
@@LiveSparks Thank you. I'm not sure I get it, if I start it even if the first client has connected, it will still advertise for the second and subsequent clients, right?
@LiveSparks
@LiveSparks 3 жыл бұрын
Sorry, I meant pAdvertising->stop().
@rghrg
@rghrg 3 жыл бұрын
@@LiveSparks Thank you, it worked! I stop on connect and start on disconnect.
@LiveSparks
@LiveSparks 3 жыл бұрын
Glad to hear it.
@umashankarumashankar6796
@umashankarumashankar6796 4 жыл бұрын
nice vedio im trying to use float variable and i want to perform read and write value using BLE but im not able to do that can you exeplian me . thanks
@FLBRGZ
@FLBRGZ 4 жыл бұрын
Hello, great tutorial, can you help with idea? Can you connect to the zwift cycling program as a fitness machine ftms and receive or obtain the gradient or resistance level. I have been trying for months. Thanks for any help.
@bilgekaantekin9785
@bilgekaantekin9785 3 жыл бұрын
Hi, did you finish your fitness machine or indoor bike project?
@Arthurgoujon
@Arthurgoujon 4 жыл бұрын
best tutorial on this topic by far! many thanks!
@shanmcarthur
@shanmcarthur Жыл бұрын
What app are you using on your Android phone to see the BLE device with characteristics and values being sent?
@oscargraveland
@oscargraveland Жыл бұрын
I am late to the party.. but the app he is using looks very much like "nRF Connect" (made by Nordic semiconductor)
@MegaCoolshot
@MegaCoolshot 5 жыл бұрын
Not working, I'm using a huzzah32 board with ds18b20 and I am not able to get any temp readings using this code. i can connect via ble but will not give me any temp values on the app or on the serial monitor ive tried many different pins. Any help please?
@LiveSparks
@LiveSparks 5 жыл бұрын
If you are not getting anything even on the serial monitor then you might wanna try a different pin for the sensor.
@MegaCoolshot
@MegaCoolshot 5 жыл бұрын
@@LiveSparks Thanks for the response, I am getting this on the serial monitor rec = 0 85.00 repeating
@MegaCoolshot
@MegaCoolshot 5 жыл бұрын
Disregard my last message, my resistor was not connected properly. I am getting readings now on the serial monitor but not on the nRF app. It is connected but for value it shows 0x280A instead of a temp reading
@MegaCoolshot
@MegaCoolshot 5 жыл бұрын
So i believe im getting a hexadecimal value
@LiveSparks
@LiveSparks 5 жыл бұрын
I am sorry but I am stumped as to why this might be. Is the environment sensing service showing up correctly in the nRF Connect app?
@Trungkienelectronic
@Trungkienelectronic 4 ай бұрын
Is there any way to increase BLE broadcast capacity?
@rudycandu1633
@rudycandu1633 4 жыл бұрын
I appreciate your video. But it would help if the sound was better. It is hard to understand you because of the room reverberations. Move the mic closer to you. Or use some soft items to absorb the sound of the room.
@LiveSparks
@LiveSparks 4 жыл бұрын
I don't have a mic currently, I just use my phone but I'll try to get better sound.
@mahendrau4212
@mahendrau4212 3 жыл бұрын
Superb explanation boss and thanks for this tutorial.
@muhammadjafarshiddiq1408
@muhammadjafarshiddiq1408 5 жыл бұрын
Hello, thanks for the tutorial! but i've got some problem that my potentiometer analog value is always 255 (shown in the serial monitor), or the value at the characteristic is always FF at the nRF Connect App. I use GPIO14 from ESP32 DOIT DEVKIT V1 Board. Can you help me please? thanks
@LiveSparks
@LiveSparks 5 жыл бұрын
Not all pins of the ESP32 are suitable for analog readings. Try some other pins too.
@rohitkhot8976
@rohitkhot8976 5 жыл бұрын
Hi, thanks for the wonderful tutorial, I am trying to connect my ESP32 board to Chrome using web Bluetooth, however, the chrome is not able to detect it, can you please help what might be the problem? It works well with nrfConnect
@LiveSparks
@LiveSparks 5 жыл бұрын
Sadly I am not very familiar with web Bluetooth. You can take a look at the client app project inside the MIT App Inventor to see how the client flow works which you can then try and replicate with web Bluetooth.
@rohitkhot8976
@rohitkhot8976 5 жыл бұрын
@@LiveSparks Thanks I will look into it :)
@soundofsoul8700
@soundofsoul8700 2 жыл бұрын
How to set multiple characteristics in one service?
@MeisterQ
@MeisterQ 5 жыл бұрын
Hey, nice Video. Im trying atm to communicate with a bluetooth radiator-valve atm. If i scan for ble devices with the examplecode given by the IDE, i can find it. But i was hopeing i could use your video to find out which data i can request or just get from the device. There is an existing project on github already, but i want to build my own. I need abit of help. Do you have any idea?
@LiveSparks
@LiveSparks 5 жыл бұрын
github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/BLE_client/BLE_client.ino
@MeisterQ
@MeisterQ 5 жыл бұрын
@@LiveSparks Thank you very much. with that, i could connect to the service uuid and get a data. But only one. the valves consisting of alot of data. weird
@LiveSparks
@LiveSparks 5 жыл бұрын
You need to code for each service that you want to read. Use nrf connect app to see what services are being advertised.
@unpredictable14686
@unpredictable14686 3 жыл бұрын
Thanks for great tutorial but BLE_Viewer2.apk is not able to detect my esp32 ble device
@froh_do4431
@froh_do4431 3 жыл бұрын
Will this code also work if I use other hardware? I am using the dht22 as a sensor and I have the bluefruit spi friend as a bluetooth device both connected to the arduino
@LiveSparks
@LiveSparks 3 жыл бұрын
The Bluetooth code is hardware specific to the esp32
@0miker0
@0miker0 Жыл бұрын
Great video and everything was explained very well.
@mytechnotalent
@mytechnotalent 4 жыл бұрын
Thank you for your BLE videos. I have an ESP32 and I have tried your BLE examples and they all work on my phone. I am struggling to get the BLE Client to work as I want to be able to have another ESP32 read these values. Here is what happens when I run your BLE_everything_to_string program on another client BLE which I am using the built in BLE_client app: Starting Arduino BLE Client application... BLE Advertised Device found: Name: , Address: 4b:41:58:c8:94:f2, manufacturer data: 4c0010050818237b8e BLE Advertised Device found: Name: , Address: 1e:44:1e:8d:54:08, manufacturer data: 0600010920021f0f72b658f8fa6a56054b76f656467d07548b169b875d BLE Advertised Device found: Name: , Address: 4a:f7:2c:59:b5:ec, manufacturer data: 4c001005421c6e4d8a BLE Advertised Device found: Name: , Address: 7f:79:4e:7f:82:4e, manufacturer data: 4c0010050818237b8e BLE Advertised Device found: Name: , Address: 57:b1:e4:c9:d2:82, manufacturer data: 4c001005401c7dd543 BLE Advertised Device found: Name: , Address: 7b:d8:62:bc:e9:84, manufacturer data: 4c001005241c548cdc, txPower: 8 As you can see I do not see the Device Name or any of the messages like this is a string as I am seeing them on my phone app but not on the BLE_client. Any help would be appreciated!
@vishalpanchal6332
@vishalpanchal6332 4 жыл бұрын
Best BLE tutorial... 👌🙌
@s.husain6125
@s.husain6125 5 жыл бұрын
I'm am to able to convert incoming Lora data packet to char at initialization sir how I can send seprate sensor value to custom app I have tried all the stuff. I want to send my Lora reciver data packet which is coming from node to reciver to my custom app sir how I can achieve that
@LiveSparks
@LiveSparks 5 жыл бұрын
I have shown how to do so in the video. You can also look at the examples that I have linked in the description
@hondaman900f
@hondaman900f 5 жыл бұрын
What was the dev tools you mentioned you created the Android app in?
@LiveSparks
@LiveSparks 5 жыл бұрын
MIT App Inventor 2
@mikelemon5109
@mikelemon5109 5 жыл бұрын
8:26 how do I access this page to view how data for different pre defined characteristics needs to be formatted for a guide for an incoming project.
@LiveSparks
@LiveSparks 5 жыл бұрын
There are links in the video description for services and characteristics. Download the xml for the appropriate thing and view it in the XML viewer.(Link also in the description).
@mikelemon5109
@mikelemon5109 5 жыл бұрын
@@LiveSparks OK, But how to I find the relevant URL for say the temp characteristic?
@mikelemon5109
@mikelemon5109 5 жыл бұрын
@@LiveSparks OK I understand now you have to literally copy the hyper link of the service\characteristic and throw it to the online converter to view that.
@goranjosic
@goranjosic 4 жыл бұрын
Really good explanation!! Thank you!
@spiderion1
@spiderion1 2 жыл бұрын
How can I send json data via bluetooth?
@biker2k3
@biker2k3 4 жыл бұрын
Gracias!!! muy buena explicacion!
@swaroopbu3564
@swaroopbu3564 4 жыл бұрын
how to transfer data between two ble server and client plzhelpme in tht
@adityapandya8098
@adityapandya8098 2 жыл бұрын
Thank you so much This is helpful
@toastrecon
@toastrecon 4 жыл бұрын
Very helpful, thank you!
@cliffmathew
@cliffmathew 4 жыл бұрын
Excellent! Thanks
@tamer79
@tamer79 4 жыл бұрын
Didn't work at all.... Couldnt connect to iOS (iphone XS) or Windows 10. 2 months looking for a solution and nothing... I guess I'll go back to Arduino....
@Esteapen
@Esteapen 3 жыл бұрын
Is it possible to extend its range?
@LiveSparks
@LiveSparks 3 жыл бұрын
There are some ESP32 modules that have external antennas. Those would have better range.
@davoodnasehi
@davoodnasehi 2 жыл бұрын
Do you do freelance works?
@ravikharb
@ravikharb 2 жыл бұрын
Yes. Contract me on livesparking@gmail.com
@rizqifw
@rizqifw 2 жыл бұрын
Amazing content bro.
@zyroxiot9417
@zyroxiot9417 Жыл бұрын
Good job, thanks a lot! ✌🏼🇧🇷
@Nabilphysics
@Nabilphysics 2 жыл бұрын
Oh boy... Finally, an Indian boy comes to rescue the BLE developer. Thanks.
@mukund22kar
@mukund22kar 5 жыл бұрын
hello the app is not connecting to ESP32 always responds no device found
@LiveSparks
@LiveSparks 5 жыл бұрын
Make sure your Bluetooth is on. The custom app doesn't give a warning if Bluetooth is off.
@mukund22kar
@mukund22kar 5 жыл бұрын
@@LiveSparks Yes its on
@LiveSparks
@LiveSparks 5 жыл бұрын
Can you see the device in the nRF Connect app? If not, then the issue might be with the code running on the ESP
@mukund22kar
@mukund22kar 5 жыл бұрын
Yes i am able to see the device in nrf connect app
@mukund22kar
@mukund22kar 5 жыл бұрын
I am trying to add button on mit app intventer but not able to make one can help on how to do that
@3015gaurav
@3015gaurav 3 жыл бұрын
Can you guide me
@davoodnasehi
@davoodnasehi 2 жыл бұрын
Nice one
@nfaza80
@nfaza80 Жыл бұрын
bruh too much object
@3015gaurav
@3015gaurav 3 жыл бұрын
Can you guide me
BLE with ESP32 tutorial part 1: the Server
25:23
MoThunderz
Рет қаралды 93 М.
#173 ESP32 Bluetooth BLE with  Arduino IDE (Tutorial) and Polar H7
15:55
Как не носить с собой вещи
00:31
Miracle
Рет қаралды 1,7 МЛН
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 11 МЛН
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 54 МЛН
My first ESP32 project: Bluetooth Low Energy RGB LED Controller
5:34
Bluetooth Proximity Detection | FireBeetle ESP32
5:20
Davy Wybiral
Рет қаралды 106 М.
Cool inventions ideas and tools for you
5:36
ideas corner
Рет қаралды 85
ESP32 BLE - Bluetooth Low Energy sending data to phone
8:31
BLE with ESP32 tutorial part 2: the client
36:07
MoThunderz
Рет қаралды 35 М.
Как не носить с собой вещи
00:31
Miracle
Рет қаралды 1,7 МЛН