EB024 Bluetooth

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
lorgues83
Posts: 5
Joined: Sun Mar 23, 2014 11:37 am
Contact:

EB024 Bluetooth

Post by lorgues83 »

Hi everybody!
Our students and us are working on a bluetooth project between an android tablet and eblocks
The pairing and connection have succeed. We know how to send and receive data from android but...
We didn'nt find how to send a data (analog measure for example) from the eblocks to the tablet??
Must wu use a script with the atx<string> command??
There's no bluetooth "sendByte" routine in Flowcode V4...
Thanks for your help!
Serge

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB024 Bluetooth

Post by Benj »

Hello Serge,

You can do this in a number of different ways.

1) Add binary data to the bytes of the command string. This way each byte in the string can represent a numeric value from 0 to 255.

2) As in solution 1 but you use multiple bytes to store the binary value allowing larger values, e.g. 16-bit values give a range of 0 to 65536.

3) Add ASCII data to the bytes of the command string by converting your value into a string and then sending each of the characters. At the Android end you would then need to convert the string back into a binary number.

lorgues83
Posts: 5
Joined: Sun Mar 23, 2014 11:37 am
Contact:

Re: EB024 Bluetooth

Post by lorgues83 »

Hello,
We found exactly this solution this morning!
We regret the lack of documentation about the eblocks functions. Sometimes it's hard to figure how to use them without analysing examples...
Thank you anyway!
Serge

gael.balduini
Posts: 2
Joined: Sat Mar 29, 2014 2:18 pm
Contact:

Re: EB024 Bluetooth

Post by gael.balduini »

Bonjour Serge,
c'est Gael Balduini du lycée du VAL D'ARGENS.
Je suis sur le même problème que toi et j'en ai déjà discuté avec Jean-Louis mais je n'arrives même pas à activer le BT avec mon flowcode V5.
Pourrais tu me donner les adresses des broches RTS et CTS que tu as utilisé.
En lisant le datasheet de la carte EB024 il semble que RTS soit cablé par défaut sur la broche 5 et CTS sur la 6 mais je ne suis pas sur!

D'avance merci.

Gael

Boudier
Posts: 11
Joined: Mon Jan 21, 2013 10:53 am
Contact:

Re: EB024 Bluetooth

Post by Boudier »

Hello Serge
I also wish to work with a bluetooth card EB024 and a tablet, but I can not activate the bluetooth card. Can you give me your method.
Thank you in advance.
Jacques

Yuexjtlu
Posts: 3
Joined: Wed Dec 10, 2014 3:46 am
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: EB024 Bluetooth

Post by Yuexjtlu »

Dear all
I'm working on the Bluetooth project too, but I have problem in sending expacted data or words from one kit to another, would you please tell me how to work on it?
It said that the "ATX" command could handle it, while would you please give me an example to follow? Thanks a lot!

Best wishes

Post Reply