RX - Tx
TX - RX
GRD - GRD
VCC - 5V
And the code that reads the input ?
IO-Pin-Numbers? pictures?
I don't understand
From get bluetooth code till end
That's the problem with you. Too short answers. Write looooooong description
//get bluetooth code received from serial port
//check the code
Do you mean that the code after the first comment gets the data received from Bluetooth ?
If so, then you are wrong. Did some code go missing from between the comments ?
//get bluetooth code received from serial port
//check the code
if (dataIn == 'F'){//Forward
determinant = 'F';
}
else if (dataIn == 'B'){//Backward
determinant = 'B';
}
else if (dataIn == 'L'){//Left
determinant = 'L';
}
else if (dataIn == 'R'){//Right
determinant = 'R';
}
else if (dataIn == 'S'){//Stop motor
determinant = 'S';
}
else if (dataIn == 'G'){//1 Light On
determinant = 'G';
}
else if (dataIn == 'A'){//2 Light On
determinant = 'A';
}
else if (dataIn == 'E'){//3 Light On
determinant = 'E';
}
else if (dataIn == 'C'){//4 Light On
determinant = 'C';
}
else if (dataIn == 'D'){//5 Light On
determinant = 'D';
}
else if (dataIn == 'g'){//1 Light Off
determinant = 'g';
}
else if (dataIn == 'a'){//2 Light off
determinant = 'a';
}
else if (dataIn == 'e'){//3 Light Off
determinant = 'e';
}
else if (dataIn == 'c'){//4 Light Off
determinant = 'c';
}
else if (dataIn == 'd'){//5 Light off
determinant = 'd';
}else if (dataIn == 'Z'){//All Light On
determinant = 'Z';
}
else if (dataIn == 'z'){//All light off
determinant = 'z';
}
else if (dataIn == '0'){//Speed 0
vel = 0;
}
else if (dataIn == '1'){//Speed 25
vel = 25;
}
else if (dataIn == '2'){//Speed 50
vel = 50;
}
else if (dataIn == '3'){//Speed 75
vel = 75;
}
else if (dataIn == '4'){//Speed 100
vel = 100;
}
else if (dataIn == '5'){//Speed 125
vel = 125;
}
else if (dataIn == '6'){//Speed 150
vel = 150;
}
else if (dataIn == '7'){//Speed 175
vel = 175;
}
else if (dataIn == '8'){//Speed 200
vel = 200;
}
else if (dataIn == '9'){//Speed 225
vel = 225;
}
else if (dataIn == '11'){//Led 0
god = 0;
}
else if (dataIn == '12'){//Led 25
god = 25;
} else if (dataIn == '13'){//Led 50
god = 50;
} else if (dataIn == '14'){//Led 75
god = 75;
} else if (dataIn == '15'){//Led 100
god = 100;
} else if (dataIn == '16'){//Led 125
god = 125;
} else if (dataIn == '17'){//Led 150
god = 150;
} else if (dataIn == '18'){//Led 200
god = 200;
}
else if (dataIn == '19'){//Led 255
god = 255;
}
else if (dataIn == '21'){//Led 0
aod = 0;
}
else if (dataIn == '22'){//Led 25
aod = 25;
} else if (dataIn == '23'){//Led 50
aod = 50;
} else if (dataIn == '24'){//Led 75
aod = 75;
} else if (dataIn == '25'){//Led 100
aod = 100;
} else if (dataIn == '26'){//Led 125
aod = 125;
} else if (dataIn == '27'){//Led 150
aod = 150;
} else if (dataIn == '28'){//Led 200
aod = 200;
}
else if (dataIn == '29'){//Led 255
aod = 255;
}
else if (dataIn == '31'){//Led 0
bod = 0;
}
else if (dataIn == '32'){//Led 25
bod = 25;
} else if (dataIn == '33'){//Led 50
bod = 50;
} else if (dataIn == '34'){//Led 75
bod = 75;
} else if (dataIn == '35'){//Led 100
bod = 100;
} else if (dataIn == '36'){//Led 125
bod = 125;
} else if (dataIn == '37'){//Led 150
bod = 150;
} else if (dataIn == '38'){//Led 200
bod = 200;
}
else if (dataIn == '39'){//Led 255
bod = 255;
}
else if (dataIn == '41'){//Led 0
cod = 0;
}
else if (dataIn == '42'){//Led 25
cod = 25;
} else if (dataIn == '43'){//Led 50
cod = 50;
} else if (dataIn == '44'){//Led 75
cod = 75;
} else if (dataIn == '45'){//Led 100
cod = 100;
} else if (dataIn == '46'){//Led 125
cod = 125;
} else if (dataIn == '47'){//Led 150
cod = 150;
} else if (dataIn == '48'){//Led 200
cod = 200;
}
else if (dataIn == '49'){//Led 255
cod = 255;
}
else if (dataIn == '51'){//Led 0
dod = 0;
}
else if (dataIn == '52'){//Led 25
dod = 25;
} else if (dataIn == '53'){//Led 50
dod = 50;
} else if (dataIn == '54'){//Led 75
dod = 75;
} else if (dataIn == '55'){//Led 100
dod = 100;
} else if (dataIn == '56'){//Led 125
dod = 125;
} else if (dataIn == '57'){//Led 150
dod = 150;
} else if (dataIn == '58'){//Led 200
dod = 200;
}
else if (dataIn == '59'){//Led 255
dod = 255;
}
}
return determinant;
}
I think the code of receiving is correct
the code you have posted does NO receiving at all.
That is your very very very FUNDAMENTAL MIS-understanding
I am curious whether you will be able to let the following very clear words approach you and understand:
You are a super ultra hyper arrogant ignorant know-it-all who is so convinced of yourself that you are no longer able to answer questions.
These questions come from people who are really much more experienced in programming than you are.
These people see the errors in your code that you don't see out of sheer arrogant ignorance.
These people ask you questions because the code depends on the answers YOU have to give. But you ignore these questions. As long as you do not answer the questions, you can NOT be helped.
It certainly isn't
The code posted makes no attempt to read any data from the HC-05
Ok thanks now I understand what to do and what to write in the code to get bluetooth code
it seems it will be a long way from where you are now to real selfconfidence to be able to say "ah here I was wrong in my assumptions"
To me this sentence seems to be trying to hide that you don't know it.
You have asked for this information
There was nothing said in this thread how to "receive data over a bluetooth-module HC05" (except maybe private messages)
Now you claim to know it.
But nobody wrote something about how to "receive data over a bluetooth-module HC05" in this thread.
So I highly doubt it that you know it now.
Usually I just think such things without writing it. In your case I write it to give you honest feedback what the real impression is that you make to me (and maybe most other users here)
My recommendation is: writing in detail what your knowledge-level is and asking specific questions or asking where you can find information on how to do it.
Questions like this clearly show that english is not your native language
I recommended to use google-translate. But you did go on with small insufficient sentences in english.
You seem to try to make things faster but what is really happening is slowing down finishing your project.
Well it is far away from beeing against a law to act in the way you do.
But you could have your code up and running today if you would have answered the questions you have been asked.
best regards Stefan
Thanks for feedback I will improve myself thank you so much. But one thing I am getting confused that can I attach 5 different slider and get different values for that all the different slider?
Yes you can, but first I suggest that you write the simplest possible program to receive and display a single value to the Serial monitor
Ok, thanks😊
else if (dataIn == '59'){//Led 255
dod = 255;
}
}
return determinant;
}
I think the code of receiving is correct
What do you think '59' is, and how is it represented?
@anon73444976
He/she is far away from worrying out trivialities like that when Bluetooth data is not even being read, let alone interpreted
I know, I was trying to emphasise a step-wise approach.
In this case the first step would be to read from Bluetooth. The rest of the journey can wait its turn ![]()