Serial ports can only be controlled by one program at a time.
Questions:
Don't open the port from p5 Serial port, just leave it open
the meaning of those voltage levels; is a high voltage 1 and a low voltage 0, or is the signal inverted so that a low voltage is a 1 and high voltage is 0?
the voltage levels representing a 1 or a 0 bit
the rate at which data is sent and read
For the data transmission above, a high voltage indicates a bit value of 1, and a low voltage indicates a voltage of 0. This is known as true logic. Some serial protocols use inverted logic, meaning that a high voltage indicates a logic 0, and a low voltage indicates a logic 1.
serial buffer: they can do other tasks while waiting for data to come in, and act on the data from the buffer after it comes in.