How to create a distance matrix using the HC-SR04 sensor?

The red button?
You pressed the red button?
Are you crazy?!?

What red button?

@Robin2 has written an excellent introduction to serial handling
You should read it

Seriously, the numbers start as integers - you may as well leave them as integers, and do the processing on the host.