Returning different parts of a char array arduino

后端 未结 1 688
情话喂你
情话喂你 2021-01-29 10:39

I asked a question here about my issue and thanks to @enhzflep I solved the huge part of my problem. My problem was if I write 46754!ABCDEFG12345#qwerwe to the serial, I want to

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-29 11:39

    I can't test any code myself, but I think this should work. Change the allocation of command to 200 bytes. Your commented out code seemed mostly correct. I just made some minor changes:

    if(Index>=2){
        command[Index-2] = received;
        Index++;
        Serial.print(received);
    }
    

    0 讨论(0)
提交回复
热议问题