I would like to be able to take a large number input via terminal and break it up into pieces.
For example, 1023095075.
Reason Being: I want to use the terminal (a barcode in the future) for input and use a preprogrammed parsing calculation to set humidity (3 digits)/temperature(3 digits) /co2 values (4 digits) on the fly.
So with the above number: 1023095075
I want to split it into:
co2/humidity/temperature
int co2Value = 1023;
int humidityValue = 095;
int temperatureValue = 075;
Any thoughts on how I can do this?
In an ideal world, I would just do something like:
int co2 = terminalInput/100000;
int humd = (terminalInput-(co2100000))/1000)
int temp = (terminalInput-(co2100000)+(humd*1000))
But I don't really think this is possible.
Any thoughts on where to go from here?