I apologize for replying a little late. Currently, four conditions are required
if (enableDataLogging == 0 && (receivedChar.indexOf("2") > -1 || voltage > 2 ) )
I increased this even more There are 4 conditions.
if (( voltage > 2 || (receivedChar.indexOf("2") > -1 ))&& enableDataLogging == 0 && receivedChar.indexOf("3") > -1 )
in this case i want it to work here. 1-) enableDataLogging == 0 AND receiveChar.indexOf("3") > -1
2-) received Char.indexOf("2") > -1 OR voltage>2 will return true if all conditions are true.
but here, these two conditions should always be checked first, and if these two conditions are not true, the other conditions should not be checked.
enableDataLogging == 0 AND receiveChar.indexOf("3") > -1
Thank you for your help