Skip to main content
Skip to main content

Hot Bots

Years 7-8

In this series of lessons, students are set a design challenge to create a program to automatically switch on an air conditioner.

For this project, students are introduced to the Arduino microcontroller and Arduino integrated development environment for programming. However, other similar microcontrollers could be used instead following a similar process.

This lesson was designed by Cindy Thornton, Flinders Island District High School, Tasmania.



Learning intentions

  • Students will design an autonomous Arduino microcontroller containing a temperature sensor and alert signal (ACTDIP027)/(ACTDIP028)
  • Students will construct an autonomous Arduino microcontroller containing a temperature sensor and alert signal
  • Students will program the robot to collect and present data on ambient classroom temperature (ACTDIP025)/(ACTDIP029)/(ACTDIP030)
  • Students will program the robot to give an alert when the temperature reaches 25C (ACTDIP029)/(ACTDIP030)

Learning hook

  1. What are automated systems and how might they work?

    A sensor light is an automated system. How might that work? Consider how a computer program is used to automate the system. What data does the system require? How would it use this data in a computer program?

  2. Discuss advantages of automation and provide examples of other automated systems or ask students to describe systems they know about.

Learning map and outcomes

In this series of tasks, students will use and develop some important programming skills that relate to controlling an automated system.

For students who have only just started learning to program with general purpose programming and are unfamiliar with programming Arduinos, consider adapting the PRIMM approach to programming (Sentance, 2017) for this project.

Learning input

Introduction to Arduino

  1. Provide a basic code, for example, Blinking LED (Figure 1) for students to view on a whiteboard or similar and predict what it might do. As a class ‘read’ the code together. Talk about the syntax, for example, digital Write writes a HIGH or a LOW value to a digital pin. Talk about delay (1000), which is measured in milliseconds, so 1000 ms is equivalent to 1 second.
LED code on a whiteboard. It says 'Line 1: int Led Pin equals 13 semi colon. Line 2: void setup open bracket close bracket open curly bracket. Line 3: pin Mode open bracket led Pin comma output close bracket semi colon. Line 4: close curly bracket. Line 5: void loop open bracket close bracket open curly bracket. Line 6: digital write open bracket led pin comma high close bracket. Line 7: delay open bracket 1000 close bracket semi colon. Line 8: digital write open bracket led pin comma low close bracket. Line 9: delay open bracket 1000 close bracket semi colon. Line 10: close curly bracket.'

Figure 1: LED code. Image credit: Flinders Island District High School.

  1. It may help to revise the concept of a circuit and discuss the use of resistors. Provide the Arduino hardware to construct the circuit associated with the program, for example, an LED circuit (Figure 2a, 2b).

    Photo of the hardware used for the UNO LED circuit.

    Figure 2a: Hardware for LED circuit

    Image of a three primary school males setting up their circuits.

    Figure 2b: Constructing the circuit

  2. Provide students with access to the Arduino integrated development environment. Students investigate and run the program from the built-in examples in Arduino, referred to as sketches. Once the code and outputs are working, ask students to read the code and annotate it (Figure 3), commenting on what each line of code does. Students can then modify the code to change inputs or outputs or other functionality. Example of code with student annotations. Line 1 has the code 'int led Pin equals 13'. The student states 'this means I connect the led to pin number 13'. Line 2 has the code 'void set up open bracket close bracket open curly bracket'. The student states 'this is how it will be set up'. Line 3 has the code 'pin Mode open bracket led pin comma output close bracket semi colon'. The student states 'the led will give an ouput (the light will go on)'. Line 4 has the code 'close curly bracket'. The student states 'this is the end of the set up bit'. Line 5 has the code 'void loop open bracket close bracket open curly bracket'. The student states 'this is the part that repeats'. Line 6 has the code 'digital Write open bracket led pin comma high close bracket semi-colon'. The student states 'the led will turn on (high means on and low is off)'. Line 7 has no code. The student states 'there are only two states because it is digital'. Line 8 has the code 'delay open bracket 1000 close bracket semi colon'. The student states 'it will wait (stay on) for 1000 milliseconds (1 second)'. Line 9 has the code 'digital Write open bracket led pin comma low close bracket semi-colon'. The student states 'it will turn off'. Line 10 has the code 'delay open bracket 1000 close bracket semi colon'. The student states 'it will be off for 1 second'. Line 11 has the code 'close curly bracket'. The student states 'it will keep doing this loop'.

    Figure 3: Student comments on code show understanding of the program

    Teacher reflection

    Originally it was planned to present the design challenge to the students in the first lesson, but then it was decided that students needed an idea of what Arduino is, and can do, so they could keep that in mind when brainstorming ideas. Considering materials is part of the investigating and defining phase of the design process (Albion Campbell & Jobling, 2018). Using the PRIM part of PRIMM (Sentance, 2017) was successful, and definitely an approach that will be used again. Student program annotations were a relatively quick, flexible formative assessment tool that could be completed as a whole class, individually, verbally or in writing.

Learning construction

The challenge brief for the 7 to 8 digital technologies project is as follows: construct an arduino robot that will alert us when the temperature reaches 25 degrees celsius and then we will put the airconditioning on. Think, research, design, build, test, modify and then share it.

Figure 4: Hot bots technology challenge brief

  1. Set the challenge

    Present students with the Hot bots challenge (Figure 4) and ask them to brainstorm as many ideas as possible. Sample ideas students might come up with include:

    • wireless connection to the air conditioner
    • wristband vibration alerts
    • consideration of people with sight or hearing impairments
    • screens to display the temperature and design aesthetics.
A large variety of student examples.
  • Figure 5. Student examples


    Teacher reflection

    Giving students five minutes to silently and individually brainstorm in a written or pictorial format, before seeing what their peers had done, ensured every student had to contribute and not leave the thinking to others. Differentiation in how they could record their thoughts, suited student preferences for writing, drawing or using diagrams.


  1. Development of ideas and skills

    Provide time for students to explore other activities in the Arduino kit, including buzzers and the temperature sensor to aid in the development of their skills in assembling and programming Arduino, and to assist in refining their thinking about their proposed solution.

    Student learning

    Sometimes if students copied and pasted code, a ‘stray 304’ error would appear and the code would not compile. Undertaking an internet search for this issue found that it was caused by hidden characters (see Figure 7) in the copied code. Using ‘Tools>Fix encoding & reload’ highlighted the characters for deletion, or typing code into the IDE, instead of copying and pasting, solved this issue. Students added to their electronics knowledge, learning about temperature sensors and how they have three pins – power, voltage output and ground – and how to identify which is which.


    Example of 304 errors in code.

    Figure 6: Stray 304 errors


    Teacher reflection

    Being open with students about Arduino being a new learning experience for the teacher, as well as the students, led to a collaborative learning atmosphere, with students enjoying solving problems (such as debugging sample code errors) alongside the teacher. Teacher expertise can indeed grow when they learn alongside their students! (Kelly, 2006). For example, the teacher learnt about temperature sensors and the (intense!) heat they create if connected the wrong way round and could remind the students about the importance of polarity!

Learning demo

Flowcharts and pseudocode

Discuss with students the two different ways of designing algorithms: pseudocode and flowchart.

Ask students to articulate their idea of how the Arduino would be controlled by using their choice of a flowchart or pseudocode. Compare this approach with jumping straight into programming.


Image of a temperature sensor robot flowchart. It orders as follows: Start, which leads to 'Complile and unload code to Arduino' which leads to 'measure temperature' which leads to the question 'Is the temperature above 25 degrees?' If the answer is no, then users are led back to the command 'Measure temperature'. If the answer is yes, then the next command is 'Buzzer makes a sound' which then leads to the final command: 'We can turn the air conditioner off'.

Figure 7: Flowchart


Teacher reflection

Because the Arduino was completely new to students, it was important that other tasks such as flowcharts and concepts of branching and decision-making had been previously introduced to students. This would mean the project was not overwhelming for less confident students. Giving students a choice of flowcharts, pseudocode or code suited individual abilities (and temperaments!).

Learning construction

Making and modifying

  1. After completing their exploration of the Arduino kit, students can start to implement their digital solution for the Hot bots design challenge. One solution could be to automate the switch on the remote of an air conditioner. This would include the need of a servo with an ‘arm’ attached. (Figure 8).

Figure 8: Servo motor with arm attached

  1. The challenge in this case is to program the servo and temperature sensor together. Figure 9a and 9b show an example of the hardware and programming. The Arduino displayed data in the serial monitor is displayed in Figure 10.
Image of hot bot hardware including a circuit, remote and battery pack.

Figure 9a Hot bot hardware

Extensive code for the Hot Bot program Extensive code for the Hot Bot program Extensive code for the Hot Bot program

Figure 9b: Hot bot program

Student learning

Student groups worked at their own pace; some needing a lot of time on exploring preliminary projects but formative assessment through observations and discussions showed all were working toward achieving the basic learning intentions. Students received feedback on their progress that was specific, substantial but not overly detailed, as this would benefit their learning most (Albion et al, 2017).

Learning reflection

Use these prompts to guide and support student self-reflection and self-assessment.

Hot bot student reflection prompts:

  • What are your thoughts on using the class Gantt chart to manage your project?
  • Describe the computational thinking skills you used during this project.
  • How did your project function?
  • How user-friendly was your design?
  • Explain the features of your code. How could you use the data generated by your Hot bot?
  • How could you extend this project?

Further challenges

The temperature sensor could be used in future projects requiring measurement of ambient temperatures in different locations around the school, such as different classrooms or the garden hothouses, and be programmed to give readings at different time intervals.

Students can use the data to make predictions, publish it to the cloud, or display it on an app or with an LED light display.

Other project ideas could involve making:

  • electronic thermometers
  • temperature-controlled food containers that show a readout of the temperature inside the box
  • temperature-controlled lights or weather stations.

Resources