# Bluetooth Low Energy doesn't receive data

**URL:** <https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198>\
**Category:** Questions about Thunkable X\
**Created:** [September 15, 2019, 5:42am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198 "2019-09-15T05:42:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 15, 2019, 5:42am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/1 "2019-09-15T05:42:14Z")

</div>

Hi friends

I’m developing an iOS app to work with a Yourduino RoboRED Board (Arduino compatible) in order to control a robot via the App.

I want the App to be able to receive a character which an Arduino sends through the HM10 BLE module.

I used a timer set to 100ms to loop the BLE receive block, but nothing happens.

Please help me.

I have attached an image of the block.

Thank you

 ![doesn't%20receive%20data](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/f/ff315d085ce42be03953404ca8dc553d341205bc.png)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 15, 2019, 6:55am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/2 "2019-09-15T06:55:56Z")

</div>

Hi, @kufirre! 👋

* * *

It might be that, the `Bluetooth_Low_Energy1 call Receive` is not receiving **data**.  
To catch the error, try these blocks -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/e/be868230513ab4b8653c8c80fcdee1d3ef631564.png)

> **Note:** Please use the **else if** instead of **else** in the if block.  
> There’s a little problem with **else** going on, hope the **dev. s** are looking over it.

* * *

Hope I helped you! 😄

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 15, 2019, 5:38pm UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/3 "2019-09-15T17:38:41Z")

</div>

Wow. Thanks bro. Let me try this right away. I’d get back to you on the result ASAP

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 15, 2019, 7:03pm UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/4 "2019-09-15T19:03:59Z")

</div>

This block looks like it only happens once. I need to constantly check for data coming in from the Arduino through the BLE module to the App. Therefore, I need a block to loop the BLE receive function.

Any ideas?

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 1:51am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/5 "2019-09-16T01:51:25Z")

</div>

> [@kufirre](#):
>
> I need to constantly check for data coming in from the Arduino through the BLE module

Ok..  
So, if you use a loop, I assume everytime you will get **“V”** as the response, right?  
If so, Text to speech will continuously speak obstacle detected 😅 (It will be fishy…)

So, can you suggest another way you can replace the text-to-speech block?

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 7:49am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/6 "2019-09-16T07:49:54Z")

</div>

Oh, actually, the Arduino sends the “V” whenever it detects an obstacle. Now, the App is supposed to be listening for this “V” in order to vibrate the phone and speak “obstacle detected”. That’s what I have in mind

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 8:00am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/7 "2019-09-16T08:00:19Z")

</div>

Oh 😄  
I will reply to u after 4-5 hours 😊

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 8:01am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/8 "2019-09-16T08:01:33Z")

</div>

Sorry bro. We are in different time zones… Really sorry for my late replies. It’s 9am over here

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 8:03am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/9 "2019-09-16T08:03:28Z")

</div>

Ok, I will provide approx time to you -

# ~ 2019-09-16T13:00:00Z

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 8:05am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/10 "2019-09-16T08:05:15Z")

</div>

OK. Thanks

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 11:04am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/11 "2019-09-16T11:04:00Z")

</div>

Hi, @kufirre! 👋

* * *

So, I understood your question 🕶 😜

* * *

Your Arduino will send a **" V "**  **only** if it detects an **obstacle**. Right? 🤔

If so, try these blocks -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/f/cfc8c737b9268078f75c46ab027efd2e3d7b0331.png)

* * *

Hope it helps! 😄  
If any problem occurs, please inform 😉

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 11:15am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/12 "2019-09-16T11:15:44Z")

</div>

Hi @kartik14

I’m going to try this. Although, I feared that the while loop would cause the whole code to block?

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 11:17am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/13 "2019-09-16T11:17:39Z")

</div>

Hi, @kufirre! 👋

* * *

> [@kufirre](#):
>
> would cause the whole code to block?

**Means?**

* * *

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 11:21am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/14 "2019-09-16T11:21:09Z")

</div>

In Arduino C programming, a while loop would cause the flow of the code to pause until the test condition becomes false. And here, the test condition is “true” (as in “while TRUE”), which would always be true. I was wondering if it would “block” the flow.

I’d try this and get back to you ASAP

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 11:27am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/15 "2019-09-16T11:27:25Z")

</div>

Hi, @kufirre! 👋

* * *

Do you have a C/C++ compiler right now?  
If so, try this code - (you will understand about **while true** )

```
#include iostream

using namespace std;

int main() {
  while (true) {
    cout << "looping infinite times. (forever)\n";
  }
}

```

* * *

You will see, that it loops forever -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d26ef085a8a694d613ff811c805e00222dc1772d.png)

* * *

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 11:30am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/16 "2019-09-16T11:30:14Z")

</div>

I will catch you after few hours, (I am studying 😁)  
Probably at **~ 2019-09-16T15:00:00Z** 😉

* * *

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 11:37am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/17 "2019-09-16T11:37:52Z")

</div>

I understand that. If you put anything else outside that “while true” block, that function would never happen.

Example:

#include iostream

using namespace std;

int main() {  
while (true) {  
cout \<\< “looping infinite times. (forever)\n”;  
}  
cout \<\< “do this after the loop\n”;  
}

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [September 16, 2019, 12:09pm UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/18 "2019-09-16T12:09:35Z")

</div>

Hi @kartik14

Still receives nothing 😣

---

<div class="post-metadata">

**Author:** ![slidethc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/slidethc/32/55603_2.png) [@slidethc](https://community.thunkable.com/u/slidethc)\
**Post date:** [January 13, 2020, 11:43am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/19 "2020-01-13T11:43:10Z")

</div>

Don’t waste your, I think the staff already know about the problems on receiving data but don’t want to admit it.

---

<div class="post-metadata">

**Author:** ![dolsenu](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dolsenu](https://community.thunkable.com/u/dolsenu)\
**Post date:** [July 14, 2020, 2:17am UTC](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198/20 "2020-07-14T02:17:10Z")

</div>

Similar problems when trying to receive data over BLE. Tried HC08 and HC10 modules with no success. Transmit seems to work ok, just not receive.  
Has anyone been successful receiving data over BLE with Thunkable?  
If so, please chime in and help us out here.

[Next page](https://community.thunkable.com/t/bluetooth-low-energy-doesnt-receive-data/227198.md?page=2)
