The heat transfer from the combustion gases to the cylinder wall affects the efficiency, emissions and power output of an internal combustion engine. Measuring the heat transfer requires a heat flux sensor inside the combustion chamber that has a short response time and is able to withstand the harsh conditions during combustion. In this work, a suitable sensor is introduced and the measured wall temperature, heat flux and convection coefficient are compared to those measured with a commercial sensor. It was found that both sensors measure the same convection coefficient, but a different wall temperature and heat flux. This is because the presence of the sensor in the combustion chamber wall affects these quantities. A method is proposed to cancel this effect and calculate the actual heat flux through the cylinder wall