Splitting a comma separated string through serial (Arduino)
问题 So my arduino is receiving a string from serial, comprising of three values separated by commas, I'm trying to separate these values into three different variables, the rest I can do. The string looks something like this "1000,1.5,0.9" or "5000,20,0.01" I would like something like: a - 1000, b - 1.5, c - 0.9 Cheers 回答1: I presume you are receiving the string that can be split in to three parts. Here's a sample code taken from this thread: void setup(){ Serial.begin(9600); } void loop(){