# How to send a 1 Byte Number

**URL:** <https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322>\
**Category:** Questions about Thunkable X\
**Created:** [August 23, 2021, 6:40pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322 "2021-08-23T18:40:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![atstargets](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@atstargets](https://community.thunkable.com/u/atstargets)\
**Post date:** [August 23, 2021, 6:40pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/1 "2021-08-23T18:40:39Z")

</div>

How would I send 1 byte numbers on thunkable. There’s a function already preset on MIT App Inventor, but I need to replicate it on thunkable.

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

I know that I will use the transmit function block and that I need the UUID. What I don’t know is how to make it send a 1 byte number. It has the data(string). Am I able to send 1 byte through that somehow? If someone could help me out as soon as possible that would be great.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/0/4017b2138eb2a12a7f0d680dc733197679afb5e5.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [August 23, 2021, 7:06pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/2 "2021-08-23T19:06:24Z")

</div>

You should always search the forums before posting a question. A Google search for _one byte number thunkable_ resulted in these two topics which look promising:

> [@\[Solved\] Bluetooth LE Transmit Byte Array](https://community.thunkable.com/t/solved-bluetooth-le-transmit-byte-array/685541):
>
> A few questions about the “data (byte array)” option of the BLE transmit block: 1: What data type does it actually take (i.e. list, number, string, etc.)? 2: Why does it just instantly crash the Thunkable Live app whenever I attempt to transmit with it? Bearing in mind that the transmit string option works just fine. 3: Is the inability to transmit purely an issue with the Thunkable Live app (i.e. if I was to download and install the app on my phone, would it then work successfully)? If it h…

> [@Bluetooth questions - translating from App Inventor](https://community.thunkable.com/t/bluetooth-questions-translating-from-app-inventor/1386259):
>
> How would I replicate this function on thunkable? [image] [image]

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 23, 2021, 7:59pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/3 "2021-08-23T19:59:04Z")

</div>

If your receiving device expects a `byte number` then just use the number from the `number drawer`, if in the other hand, your device expects a `byte array` then you need to have the number inside a `list`.

---

<div class="post-metadata">

**Author:** ![atstargets](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@atstargets](https://community.thunkable.com/u/atstargets)\
**Post date:** [August 23, 2021, 8:07pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/4 "2021-08-23T20:07:19Z")

</div>

Sorry, I think that I should be using the Transmit Byte Array block and not the Transmit String. Is that what it would look like to send 1 byte to a BLE device?

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

---

<div class="post-metadata">

**Author:** ![abrotzman4598f5a4](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@abrotzman4598f5a4](https://community.thunkable.com/u/abrotzman4598f5a4)\
**Post date:** [August 23, 2021, 8:33pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/5 "2021-08-23T20:33:22Z")

</div>

That looks like it should work fine to me. I don’t think it actually makes any difference whether you use the “string” or “byte-array” blocks - I believe it’s just to improve readability by sign-posting its intended purpose (remember that a string at least in ASCII, is just a byte array). I’ll add testing this theory to my ‘to-do’ list and report back in my BLE thread.

---

<div class="post-metadata">

**Author:** ![atstargets](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@atstargets](https://community.thunkable.com/u/atstargets)\
**Post date:** [August 23, 2021, 8:45pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/6 "2021-08-23T20:45:52Z")

</div>

Sounds good, thank you. Would you know how to return the value of the value TGTMove just like I did on MIT App Inventor?

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/4/64dbeff3290f6ca73b30e3007814aad0e3459ff8.png)

---

<div class="post-metadata">

**Author:** ![abrotzman4598f5a4](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@abrotzman4598f5a4](https://community.thunkable.com/u/abrotzman4598f5a4)\
**Post date:** [August 23, 2021, 9:26pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/7 "2021-08-23T21:26:20Z")

</div>

See [this post](https://community.thunkable.com/t/solved-bluetooth-le-transmit-byte-array/685541/6) which contains all the knowledge I currently have on reading values over BLE using Thunkable. Unfortunately, it is much more limited than MIT AppInventor. You will need to do your own reading/experimenting to determine whether the service you are targeting is READ ONLY or not. If it is, then you’re okay, if not then you might have to do further reading of documentation to see if there are any AT commands (or similar) which allow you to modify the service to be READ ONLY, or if you can create your own service that is READ ONLY that ‘mirrors’ this value. The latter points are unlikely to work though if this is an ‘off-the-shelf’ Bluetooth product, but might be worth looking into anyway.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/how-to-send-a-1-byte-number/1465322/8 "2024-11-08T13:17:14Z")

</div>


