Working arduino code with reading from serial