In several machine learning (ML)-based Internet of Things (IoT) systems, data is captured by IoT devices and then transmitted over a wireless channel for remote processing. Since noise often appears on the channel (so causing data corruption and consequently an incorrect ML result), channel protection must be provided to guarantee an acceptable error rate for the transmitted data, especially in safety-critical applications. An often-used protection technique employs error correction codes (ECCs); however, even with some improved designs, the power dissipation required by an ECC implementation may still not meet the strict requirements of hardware-constrained platforms. To address this issue, a "joint learning and channel coding" (JLCC) scheme is proposed in this paper. In such a scheme, the ML model is retrained using two methods to tolerate some channel errors, such that the system requires an ECC with significantly lower protection capability. Since ML training is executed remotely, JLCC achieves a significant power reduction for ECC without introducing any additional overhead to the IoT device. An electrocardiogram (ECG) system is taken as a case study to illustrate the proposed JLCC scheme and evaluate its effectiveness. A low-density parity-check (LDPC) code is employed for protection of the system with/without JLCC; its analysis and implementation are presented. Simulation results show that, when employing JLCC with the proposed two retraining methods, an average reduction of 29.15% and 34.82% in the dissipated power is achieved for the ECG sensor when compared to the original system.Impact Statement-Internet of Things (IoT) are one of the most promising technology frameworks in today's digital world; the use of machine learning (ML) is important for improving the efficiency of analyzing data transmitted between different IoT devices. However, recent research has demonstrated that the data transmitted in an ML-based IoT system can be affected by errors in the wireless channel, causing an incorrect outcome of the entire system; this may lead to a catastrophic consequence in safetycritical applications, so error protection for data transmission must be performed to guarantee a reliable result. The joint learning and channel coding (JLCC) technique proposed in this paper overcomes the limitation of existing error protection approaches in terms of hardware overhead (for metrics such as power dissipation). Therefore, it is very attractive for ML-based IoT systems implemented in hardware-constrained platforms for a wide variety of safety-critical applications like smart healthcare and transportation.