• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Question on utilizing ESP32 single wire temp sensor using BLE

Q&A Forum › Category: ESP32 › Question on utilizing ESP32 single wire temp sensor using BLE
0 Vote Up Vote Down
carlos asked 5 years ago

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

Question Tags: ESP32 BLE
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

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

0 Vote Up Vote Down
carlos answered 5 years ago

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?

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Carlos.
On the 2nd edition of the eBook, the project starts at page 569.
Do you find it?
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.