AI and agriculture—how undergrads are exploring new frontiers

Could generative AI be a tool to help agriculture students perform tasks typically left to professional programmers? Find out in the latest "Down to Earth," a series breaking down and explaining recent food and farming research for readers of all backgrounds, including those without formal scientific training.
Could generative artificial intelligence (AI) be a tool to help agriculture students perform tasks typically left to professional programmers?
This study, published in Natural Sciences Education, explores whether undergraduates could use AI to program microcontrollers, chips found in electronic devices that run the programs that operate them. In greenhouses, for example, microcontrollers can turn the heating lights on and off at specific times or based on temperature sensors.
The article builds on four main questions about AI posed by previous research:
- Will AI make people work faster?
- What are the ethical considerations?
- Is the information accurate?
- What learning will occur?
Agriculture students aren’t trained in the use of microcontrollers or programming at most universities. Researchers are only beginning to understand whether AI chatbots such as ChatGPT could fill skill gaps like this.
AI chatbots can solve problems, use reason, and think creatively. Even though little is known currently, early studies suggest that chatbots can help students succeed and improve their interest, motivation, confidence and engagement with material. Opponents of AI have serious concerns about cheating and plagiarism. In both cases, it’s important to understand the full extent of what AI is capable of as a tool.
Improving student outcomes
In addition to exploring whether AI can help undergrads program, the study examined whether students became more confident in their abilities—what researchers call “self-efficacy.” The best source of this confidence comes from mastering a skill while the second best is from watching a close friend or family member succeed, according to the study. Because it can change students’ outlook and motivation, self-efficacy is important to educators.
Example of a successful prompt on the first attempt
“I have an Arduino uno connected from digital pin 4 to the in port of a relay, digital pin 2 is connected to the Echo on an HC-SR04 and digital pin 3 is connected to Trig on the same HC-SR04. Write an Arduino code that sends power to the relay when the sensor falls below 8″ and stops [when] the sensor reached [sic] 3.”
The students in the study used a microcontroller called Arduino UNO to turn on a pair of lights in sequence. Of the 11 student pairs studied, nine were successful in using AI to write a microcontroller program. They took between one and six prompts to complete the task correctly. See the box above for an example of a prompt successful on the first attempt.
The study showed that the students were more than capable of using ChatGPT for programming. It also shows that even non-programmers, such as the agriculture students, may be able to benefit massively from courses like these. As AI tools become more accessible, they could attract students with no programming experience. Studies like this can show educators how to incorporate AI into their teaching, improving outcomes for their students.
Dig deeper
The original research from Natural Sciences Education can be viewed at:
Johnson, D.M., Doss, W., Estepp, C.M. (2024). Agriculture students’ use of generative artificial intelligence for microcontroller programming. Natural Sciences Education, 53, e20155. https://doi.org/10.1002/nse2.20155
Text © . The authors. CC BY-NC-ND 4.0. Except where otherwise noted, images are subject to copyright. Any reuse without express permission from the copyright owner is prohibited.