Hi, I think I have purchased every book you published by RNTL. I have found these books to be great guides to learn more about the ESP32. I have been trying to create a simple bluetooth application that will take the temperature from the DS18B20 one wire temp sensor and send the info to an iPhone. Actually I already used your project from Unit#5 Bluetooth classic and have that running and it works great, unfortunately it will not work with an iPhone. So I have taken the part of the code you have just to gather the sensor temperature and incorporate the ESP32 BLE Server routines but I have come up with a major problem that I can’t seem to solve. The temperature string you get from the sensor is my real problem. The problem I have is that I want to send a long string using the only way I know to send data on BLE:
customCharacteristic.setValue(&Data,n); // This is a value of n bytes to send out
customCharacteristic.notify(); // Notify the client of a change
So I have no idea as to how I could adapt your simple classical bluetooth temperature to a ESP32 BLE type any help or guidance on this would be greatly appreciated.
Thank you for your help
Hi Carlos.
I’m sorry, but I’m not really sure that I understood your question.
You’ve followed this project and it worked: https://rntlab.com/module-11/esp32-ble-android-application-control-outputs-and-display-sensor-readings/ , right?
You want to do the same project using an iPhone? Building compatible apps for iPhone is not an easy task and I don’t know how to do that.
I didn’t understand your problem with the string. What exactly happens? In the project I’ve mentioned the temperature is send to an android app using that method.
Regards,
Sara
Thank you so much Sara for getting back to me so quickly. My question basically was related to the use of the following statement: “pCharacteristic->setValue(txString);” in order to send the temperature string via BLE. But you have answered all my questions by pointing me to the example (module 11) you sent me, I have tried the above and it appear to work with a bluetooth terminal on my iPhone. BTW, I have purchased the “Learn ESP32” 2nd edition book from you but apparently module 11 is not included in this book, is there a newer book or a 3rd edition of this book?