Yeah, sorry about the lack of information. Sorry but I don't have the codes right now, just brainstorming about what I want to do.
First, I want a command that will write a data to the serial and that command is the switch, if the switch send a logic high, the writing of data to the serial will be followed. Then another set of data will be followed.
Second, about the void reply, it is wrong, typographical error.
this is the real on:
byte RxData[8];
int i;
if(Serial.available()>0){
for(i=0; i<8; i++){
RxData = Serial.read(); Serial.print(RxData*, HEX);* } if(RxData[4] == 0x05){ * Serial.print("Hello User);}* else{ Serial.print("No User profile"); } Third, I call that data in the RxData[8], but I'm getting zero, The problem is about the RxData*, like it doesn't store data at all.*
Fine, I will follow ALL YOUR DIRECTION CORRECTLY but ANSWER ALL MY QUESTIONS CORRECTLY WITHOUT ANY TRASH TALK.
I know that I am a noob here and I am approach a master or god for help, so please be considerate.
If you KNOW that you need to read 8 bytes, you must not do so until there are at least 8 bytes to read. Look at the documentation for the Serial.available() method. You will see that, despite your usage (which I abhor) that it is NOT a boolean function.
papyrus12:
ANSWER ALL MY QUESTIONS CORRECTLY WITHOUT ANY TRASH TALK.
You are asking strangers to expend their time and attention helping you, and offering nothing in return. Do you think that the attitude you're showing here is going to encourage them to do that?