Question about bluetooth
Question about bluetooth
On request from a client I want to send data from a sensor over bluetooth. The sensor uses I2C. Im quite new to programming embedded systems. I was thinking to run the bluetooth and the i2c in their own threads do you think this is a good idea or is it unnecessary?
Re: Question about bluetooth
I'm afraid its too broad a question to give you much in the way of experience or advice. One usually performs multi-threaded work because it offers better utilization of the device. For example while thread A is blocked I can be doing work on thread B. However adding threading for the sake of threading can introduce design complexity and errors. Assuming that the ESP32 is the I2C master and is polling the I2C sensor slave, what would be the negative effect of blocking waiting for a BLE response longer than how often you read from the sensor. For example, if a BLE call takes 50 msecs and you normally poll the sensor every 10msecs ... what does that mean to your overall solution? If the answer is nothing ... then maybe multi-threading isn't needed?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Question about bluetooth
Thanks for your answer this makes sense and will help me with my project.
Who is online
Users browsing this forum: Bing [Bot] and 356 guests