Go Down

Topic: Appinventor and bluetooth module send two data (Read 347 times) previous topic - next topic

mikoreis

Feb 17, 2019, 08:22 pm Last Edit: Feb 17, 2019, 08:23 pm by mikoreis
Hello, I am translating translation using Google Translate because my english is bad:
my question is: I'm using the bluetooth module through the appinventor to stream data,
but I'm sending only one data, how do I send two data?


Code: [Select]
  if(Serial.available()>0){
    char clock = Serial.read();
 //char name = Serial.read();
    delay(100);
  }

lesept

Send them separated by a comma ',' and when you read them on the serial port search for the comma to separate them again
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

PaulS

Read the documentation for the read() method. Your code will not work when you try to send more than one char for each value.

Required reading:
Serial Input Basics - updated
The art of getting good answers lies in asking good questions.

mikoreis

Send them separated by a comma ',' and when you read them on the serial port search for the comma to separate them again
I'm hows make this?

J-M-L

who is sending what? is your arduino sending data to the phone or the opposite?
Hello - Please do not PM me for help,  others will benefit as well if you post your question publicly on the forums.
Bonjour Pas de messages privés SVP, postez dans le forum directement pour que ça profite à tous

mikoreis

who is sending what? is your arduino sending data to the phone or the opposite?
Android app is sending to arduino

J-M-L

#6
Feb 22, 2019, 09:11 pm Last Edit: Feb 22, 2019, 09:11 pm by J-M-L
I would read this
Hello - Please do not PM me for help,  others will benefit as well if you post your question publicly on the forums.
Bonjour Pas de messages privés SVP, postez dans le forum directement pour que ça profite à tous

Go Up