This paper presents a framework to recognize the affective state of children with Autism Spectrum Disorder (ASD) in an in-the-wild setting using Heart Rate (HR) information. Our algorithm classifies a child’s emotion into positive, negative, or neutral states by analyzing the heart rate signal. The HR signal is obtained from a smartwatch in real-time using our smartwatch application. The heart rate data is acquired when the child learns to code a robot while interacting with an avatar that assists the child in communications skills and programming the robot. In this paper, we also present a comparison of using HR data for the classification of emotions with classification based on features extracted from HR signals using Discrete Wavelet Transform (DWT). Our experimental results show that the proposed method produces a comparable performance with the state-of-the-art HR-based emotion recognition techniques, despite the fact that our experiments are performed in an uncontrolled setting as opposed to a lab environment. This work contributes to real-world affect analysis of children with ASD using HR information.