Help in the bt programation...

Hello I am an electronics technician and in my work I have scheduled different types of plc and numerical control programming on different platforms but this of me consisting Aduino this work ....

My project consists of a tablet connected via bluetooth to an Arduino MEGA ...
I want to give yourself the tablet monitor 3 measures and handle some outlets ....

  1. Temperature (with DHT11).
  2. Distance (with US-020).
  3. The state of a limit switch (it's just a HIGH or LOW)

Here is my problem .... I have read "individually" (so three different sketch) each of these measurements and send them to my tablet, the problem is not how to send the three together and then "desenpaquetarlas" to separate temperature distance on one side and is on the other end of stroke condition by another ...

I guess this is done by defining bits but can not find any examples ...
From already thank you very much ...

Greetings friends!

sory for my english... the text was translated by google... :slight_smile:

You can use the sprintf function to string the data together and use the strtok function to split data back into individual parts.

You could also use the sscanf function to also split the data too.