So, I'm new to programming and I'm having trouble with parsing data from the input I'm entering into the serial monitor. I want to input 4 numbers (either 1s or 0s) and assign each number to one variable in the code.
Pseudocode:
Input into Serial Monitor: 1101
Var1 = 1
Var2 = 1
Var3 = 0
Var4 = 1
Also, what if I'm inputting 12 numbers into the serial monitor and I want to assign the first 3 to Var1, second 3 to Var2, and so on?
I am asking this because I'm trying to control a set of 8 motors from the input data. Eventually I want to have the data sent from 4 pressure sensors, which will then control the 8 motors. But I don't have the pressure transducers yet, so I'm using the serial monitor to make sure I know how to program it when I get them.