Creating a Byte from Bits

First: Hello together,
I have 8 boolean variables (switches). Now I want to creat a 1-Byte-variable to use the "send 1 Byte"-option for Bluetooth conversation.
Whats to do?

kind regards Schildbaer

There are several pieces you can use:

Math blocks that can convert text strings of 0 and 1 to numbers 0-...

The if/then value block to turn true false into text 1 0

The mutator in the text JOIN block, to take 8 sockets

The Bluetooth send unsigned (?) byte


byte_builder.aia (2.4 KB)
sample run
Here, I used switches for my boolean inputs.

1 Like