check the pin configuration on your end. you need to edit that part.
also esp32 have memory alloc limitation take that in mind when training models in edge impulse.
If I remember it correctly its around 52920 raw samples. dont exceed from that point
the result of the accuracy of model in Edge Impulse and in the real word testing is really different.
You need to test and test and test to get the result you want here. no need to modify much on the code. you need to train model non-stop to get result you want on the real world applications