Skip to first unread message

Kaly

unread,
May 6, 2019, 9:56:29 AM5/6/19
to mitappinv...@googlegroups.com
Salut,

Je suis nouveau ici, et j'ai un projet à réaliser (projet de terminal),
Et, afin de le terminer, j'ai besoin de faire une application mobile,
l'application est déjà faite (à peu près, il n'y a juste pas d’esthétisme),

Le problème est :

Lorsque je reçois les données de ma Carte Arduino par le module Bluetooth (HC-06), je reçois des symboles spéciaux (Screen ci-dessous), alors que je souhaite y voir des chiffres (Screen du code en plus)

----------------------------------------

Hi,

I am new here, and I've a project to do (terminal project),
And, in order to complete it, I need to make a mobile application,
the application is already done (there's just no style),

The problem is:

When I receive the data from my Arduino Card via the Bluetooth module (HC-06), I receive special symbols (Screen below), while I want to see numbers (Screen of the code in addition):
Screenshot_20190506-150215.png
unknown.png

Chris Ward

unread,
May 6, 2019, 9:54:27 PM5/6/19
to MIT App Inventor Forum
Hi Kaly

We need to see your App Inventor Blocks
https://www.professorcad.co.uk/appinventortips#TipsBlocks    How to create an image of your Blocks and add it to your Forum Post


With reference to your Arduino Sketch, the last line of your data send should not be:

Serial.print(",");

Change this line to:

Serial.println();  //nothing inside the parentheses. This signals "End of Data" to your App. (= ASCII char 10 = Line Feed)



Kaly

unread,
May 10, 2019, 9:56:34 AM5/10/19
to MIT App Inventor Forum
Thanks Chris Ward for your answer,
Here is a screen of the block part
MIT_app_block.PNG

ABG

unread,
May 10, 2019, 12:42:23 PM5/10/19
to MIT App Inventor Forum
You are using the Clock Timer to chop off pieces of the incoming data stream
blindly.

There is a way to insure you get only complete messages, using message Delimiters ...

Use println() to separate messages when you transmit.
Set Delimiter = 10 in BlueTooth Designer.
Check for Bytes Available > 0 in blocks,
but then request -1 bytes to get only full  messages.


ABG
MIT_app_block.png
Reply all
Reply to author
Forward
0 new messages