Dear all,
the capabilities if Itoo (great @Kumaraswamy !!!) are one more than infinite !
For those who want to make their life difficult, by using multiple screens, and want to have a unique BT communication from the screens, Itoo comes to help.
The annexed .aia is a very raw example on how to use Itoo to handle a unique BTclient acrross Screen1 and Screen2 (if you want more screens, I believe you can elaborate my example on your own).
Provided that by using "virtual screens" can be much more easy and efficient, but since very often a request about the possibility to have more screens exchanging data to a single BT server arises, I've tried to find a solution.
As of today the answer has been always that when changing from one screen to another the BT communication ceases.
But, by using Itoo that runs in background, I've found possible to maintain alive a unique BT client across screens.
Practically Screen1 initializes Itoo, allocates on Itoo the BT client and exchanges data via BT.
Then Screen2 applies to Itoo and uses the same ciient to send and receive its own data on the same BT client.
Obviously to exchange data across screens one shall use the TynyDB, but this is another story. Here, I bound my example to the BT.
The second annexed file is the Arduino (UNO + HC06) code that is the counterpart of the APP.
The main structure is: once started Itoo from Screen1, by pressing a button , the character "A" is sent to Ardiuno (from screen1), Arduino receives it and sends back "RA". The same applies after having switched to Screen2: by pressing a local button the character "B" is sent to Ardiuno which sends back "RB".
During the screens switching the BT client remains alive.
BT_itoo_Two_Screens.aia (167.0 KB)
BT_Send_Monitor.ino (2.0 KB)
CREDITS:
@Taifun for his extension TaifunTools to keep awake the screen
@Kumaraswamy for his extension ITOO
Blocks on Screen1
Blocks on Screen2
In a nutshell: Itoo manages a unique BT client that can be accessed (by using Itoo rules) from several Screens.