Coding: addressing real-world problems for farmers (lesson plan)
Modern farming is being put to the test; the world’s population is growing but resources— soil, water, and air—are being undermined by urban sprawl and human activity. Farmers are being called on to do more with less. It may be a surprise to learn that coding is at the root of potential solutions!
This blog intends to provide teachers with content that supports teaching about coding, specifically as it concerns the real-world problems of agriculture and their impacts on life. Aside from the growing application of technology in agriculture, both technology and agriculture may lead to future career opportunities for your students!
Lesson Plan
Note: The following content has been written so that it could be easily used in your teaching slides.
Curriculum relevance:
Grade 3 Science and Technology
A2. Coding
A2.2: identify and describe impacts of coding and of emerging technologies on everyday life, including skilled trades
A3. Applications, Connections, and Contributions
A3.1: describe practical applications of science and technology concepts in various occupations, including skilled trades, and how these applications address real-world problems
Preparing for the lesson:
Most people may not think of agriculture as a high-tech industry. But agriculture has changed along with every other industry and today farmers use technology to farm more efficiently and sustainably. Technology on farms includes drones, GPS, mapping programs, and even autonomous equipment (robots). In fact, modern farms are STEM playgrounds! Take a look at Tech toolbox for sustainable farming for a thorough overview of farming technology.
LESSON IDEAS
Minds ON!
Show this video about precision agriculture and discuss.
- What stood out to you about this video?
- What is precision agriculture?
- Why is it important to our future?
Lesson content:
Have you ever thought of applying coding to agriculture? Agriculture is an example of an area that programmers can specialize in.
One of the ways technologies help farmers work more efficiently is by allowing them to see their fields and crops without driving on the fields. Why would farmers want to drive less on their fields?
Farmers need to watch their plants to make sure they are healthy and to see whether they need more or less water, fertilizer to grow stronger, or protection against pests like diseases, weeds or insects. But driving on fields can harm the soil—farm equipment is heavy and compacts soil when it is driven over fields too often, or in poor soil conditions like wet soil.
A great way for farmers to check their fields is to have an eye in the sky— data from drones that uses GPS and satellite images can create maps of farmers’ fields and take images of the conditions of plants.
Using high-tech machines like robotic tractors for farming requires coding, the process of writing instructions for a computer to follow. You can compare it to following a recipe. The instructions tell a computer what to do (the algorithm) and the order in which to do it (the sequence). Sometimes it helps to break a big problem into smaller parts (decomposition).
Coding languages need to be exact. A computer can only do what it is told; it cannot guess what you are thinking if you do not provide precises instructions. In one sense, coding instructions are simple—the steps have to follow each other logically—but they are also complex because they must be perfect.
There are no exceptions to how coding works. On a farm, computer instructions for a drone or autonomous tractor must be perfectly clear.
Coding has the potential to help farmers be more efficient by instructing machines to do a certain task. If farmers can monitor their fields more efficiently and practise sustainability, it helps everyone. We all need to eat!
Word wall
Precision Agriculture: Precision agriculture involves collecting, analyzing, and taking actions based on data.
Algorithm: a sequence of steps to do a task
Sequence: the order the steps must be in. Sequencing means putting the steps in the right order to do the task.
Decomposition: to break a big problem into smaller parts. For a big computer project, it helps to think of the problem backwards, from the goal to the step before it and so on.
Autonomous: able to do things on one’s own; in machines, it means following coded instructions without a person making the machine work. Think: a robot that moves by itself.
Debugging: fixing errors. It means going back through your work to make sure everything is correct.
Action!
ACTION 1: Research Precision Agriculture
A simple action is to have students research real-life examples of precision agriculture. Break students up into groups. Challenge them to find and present on real-life example of how coding/programming is being used on farms. What problem is it helping to solve?
You might suggest they start with these search terms:
- precision agriculture
- precision farming
- auto-steer tractor
- drones in agriculture
- variable-rate technology
- robots farming
- satellites agriculture
- SMART farm
You might have students start with this blog article: https://canadianfoodfocus.org/on-the-farm/precision-farming-what-is-it/
ACTION 2: Unplugged Coding – Origami Bookmark
Students will be encouraged to think like a programmer to create a bookmark with an image of a tractor or satellite. In part 1, students will order scrambled origami steps to create the project. If they run into issues, they will need to debug.
Key concepts: paper folding, discussion of algorithms, sequence and decomposition.
You will need:
- Square paper
- Scissors
- Pre-folded bookmark sample
- Printout of scrambled steps
Steps:
- Discuss coding by introducing/reinforcing: algorithms, sequences and decomposition
- Brainstorm examples of naturally breaking a big job into smaller tasks and following steps in order (ex. Following a recipe)
- When might this apply to farming? Brainstorm
- Farmers identify steps to follow to plant, grow and harvest grain
- Farmers use computers on their tractors. Without good instructions, the results could be really silly! Navigation systems in tractors that steer themselves use coding to follow detailed instructions based on satellite images.
- Print out the scrambled origami steps (page 20), one per student. Have students cut them out and place them in the right order by decomposing the origami.
- Provide students with sheets of origami/square paper and have them test their algorithm.
- For older students, you could select a tougher origami design that requires more steps to “code” before they fold the paper.
Extension: Introduce students to a guide game where one student guides the class to make the simple satellite by giving specific instructions.
Download the full lesson plan here, page 20.
Wrap-up:
What surprised you about today’s lesson?
Can you think of a problem on a farm that coding could help solve or improve? How? applications of coding can you imagine would be helpful to a farmer?