## 4 Methodology
### Procedure  
Participants in both groups worked on the same learning task (learning [PERSON]'s algorithm), used the same version of DARA, and followed a very similar working methodology. The only difference was the instrument each group used to measure emotions.  
The classroom intervention with the students of the GEmolive group was organized in three phases:  
1. Getting Started. Fifteen minutes were spent providing students with instructions on how to use the DARA app and installing it on their mobile devices.
2. Development. Thirty minutes were allocated to complete the work assignment. Students had the Java source code for [PERSON]'s algorithm on paper and used DARA to read the problem statement and an explanation of the greedy scheme. DARA then activated the smartphone camera, and students focused on the parts of the source code they found the most complex or did not understand, to obtain additional explanations on the smartphone screen. The students then manipulated an animation of the algorithm for a given graph.
3. Finalization. This final phase, which lasted 30 min, was used to address students' questions and concerns.  
In Phases 1 and 3, students were organized into 3 shifts of 10 students each, ensuring that each shift did not exceed the maximum number of 12 users supported by Emolive. All three shifts received the same treatment and were taught by the same teacher. Each shift convened at a different time. While one shift of students was in Phases 2 and 3, the remaining students were given free time outside the classroom.  
The students in the GAEQ group followed the same methodology, with only two variations. Firstly, students completed the task of Phase 2 in a single turn (there was no need to limit the number to 12 students because Emolive was not used). Second, an additional 20 min was allocated between Phases 1 and 3 to allow the students to complete the questionnaires (in Phase 2, questionnaires were not provided so as not to interrupt the task). A visual summary of the classroom intervention methodology, including group assignments, intervention phases, and the emotion assessment timeline, is shown in Figure 3.  
GEmolive group participants were assessed using the Emolive tool. Emolive allows for continuous, real-time measurement of emotions, but it was decided to record emotions at only three moments: at the beginning, during, and at the end of the learning task. This way, the analysis is focused on some of the key moments of the session and avoids an overload of irrelevant data. Therefore, the six non-neutral emotions detected by Emolive (anger, disgust, fear, happiness, surprise, and sadness) were measured at all three moments. For each of the three measurement moments, two average variables were computed, one for positive emotions (happy and surprised) and another for negative emotions (anger, fear, disgust, and sadness). An anonymized example of the Emolive emotion detection log is available in Supplementary Material S4.  
The emotions of the GEAQ student group were measured with the psychometric AEQ questionnaire. The questionnaire presents statements about different emotional states, and students must indicate the degree to which they identify with those emotions using a 5-point Likert scale, from \"very little\" (scored with 1) to \"very much\" (scored 5). This questionnaire measures eight possible emotions: enjoyment, hope, pride, anger, anxiety, shame, hopelessness, and boredom. It consists of 75 items that are organized into three sections that allow for the emotional state to be assessed at three different times: before, during, and after completing the learning task.  
Note that some specific emotions are not captured by both instruments; for example, one measures happiness while the other one measures enjoyment. To compare the measures from both instruments, emotions were grouped into positive and negative, as has been done in other studies [36].