close
close
Study shows successful use of ChatGPT in agricultural training

Using AI…

Microcontrollers are widely used in agriculture, but computer programming courses are not.

FAYETTEVILLE, Arkansas – Artificial intelligence tools like ChatGPT show promise in agriculture as a useful means of writing simple computer programs for microcontrollers, according to a study published this month.

Microcontrollers are small computers that can perform tasks based on user-written computer programs. They receive input from sensors and can be used in climate and irrigation controls, food processing systems, and robotic and drone applications, to name a few agricultural applications.

A recent study published in collaboration with the Arkansas Agricultural Experiment Station and the Dale Bumpers College of Agricultural, Food and Life Sciences showed that agricultural students who had no knowledge of computer programming were able to use ChatGPT to program a microcontroller to perform a simple task.

Don Johnson, university professor of agricultural education, communication and technology at the University of Arkansas’s System Division of Agriculture, conducted a study that demonstrated the successful use of ChatGPT by agriculture students to program an Arduino microcontroller with limited instruction. (Photo: U of A System Division of Agriculture)

“Generative AI can have a huge impact on agriculture… I can’t imagine it wouldn’t,” said Don Johnson, university professor of agricultural education, communication and technology and lead researcher on the project. “We need to prepare our graduates to be part of that.”

“Generative” refers to the tool’s ability to create content.

Johnson’s latest study on this topic, titled “Using Generative Artificial Intelligence for Microcontroller Programming by Agricultural Students,” was published in Scientific education Journal in August. Co-authors included Bumpers College faculty members in the Department of Agricultural Education, Communication and Technology Will Doss, assistant professor, and Christopher Estepp, associate professor.

Johnson said that computer programming is not typically taught in most agricultural degree programs, but the inclusion of microcontrollers as components of agricultural equipment and systems has become more common. While there will always be a demand for individuals with in-depth knowledge of computer programming, Johnson explained that the focus of these studies was to explore how people without in-depth knowledge can use microcontrollers in their academic and professional careers.

Johnson conducts research on human capital development and agricultural technologies for the Experimental Station, the research arm of the University of Arkansas’s Department of Agriculture.

“I think we’ve shown that agricultural students can use generative artificial intelligence to write code to solve moderately difficult programming problems without having any deep programming knowledge,” Johnson said.

Origins of the study

Johnson began looking into AI-assisted programming in 2022 when ChatGPT was released and learned that it could write code for microcontrollers like Arduinos. Shortly after, he conducted a preliminary study comparing the skills, interest, and confidence of two groups of agriculture students who programmed a microcontroller to blink two LEDs in a specific order. One group of students wrote their own programs, while the other group used ChatGPT.

The results showed that students who wrote their own programs developed more confidence and skills in Arduino programming than beginners who used ChatGPT. However, both groups were equally successful and equally interested in learning more about the microcontrollers and programming.

The follow-up study, published in August, was conducted exclusively with agricultural students with no significant programming experience. The goal of the study was to determine their ability to use ChatGPT to write Arduino code for a more challenging problem than the first study. In this second study, students had to use ChatGPT to program the Arduino to turn on a transfer pump when the solution level in a heating tank fell 20 cm or more below a sensor, and then turn the pump off when the tank was filled to within 7.5 cm of the sensor.

“You would have to have some level of programming knowledge to write code to solve this problem in the second study, and none of these students were able to do that,” Johnson said. “But they were successful. Nine of the 11 teams of two were able to get the code to do exactly what it was supposed to do.”

The ChatGPT coaching in both studies involved communicating to students what makes a good prompt for the generative AI platform. A good prompt, Johnson explained, would clearly describe the situation, components and connections, and the desired outcome.

Go one step further

Johnson wants to take the experiment one step further by leaving the problem open: The students should come up with their own scenarios and write the code for a microcontroller using ChatGPT.

“I want to give students the confidence to approach microcontrollers in a problem-solving way and say, ‘Yes, I can use this tool to solve my problem,'” Johnson said.

For more information about the Division of Agriculture’s research, visit the Arkansas Agricultural Experiment Station website. Follow us on X at @ArkAgResearch, subscribe to the Food, Farms and Forests podcast, and sign up for our monthly newsletter, the Arkansas Agricultural Research Report. For more information about the Division of Agriculture, visit uada.edu. Follow us on X at @AgInArk. For more information about extension programs in Arkansas, contact your local Cooperative Extension Service representative or visit uaex.uada.edu.


About the Department of Agriculture

The mission of the University of Arkansas Division of Agriculture is to strengthen agriculture, communities and families by connecting trusted research with the implementation of best practices. Through the Agricultural Experiment Station and the Cooperative Extension Service, the Division of Agriculture conducts research and extension work within the nation’s historic land-grant education system.

The Department of Agriculture is one of 20 institutions in the University of Arkansas System. It has offices in all 75 Arkansas counties and faculty at five system locations.

The University of Arkansas Division of Agriculture offers all of its Extension and research programs and services without regard to race, color, sex, gender identity, sexual orientation, national origin, religion, age, disability, marital status, veteran status, genetic information, or any other legally protected status and is an affirmative action and equal opportunity employer.

–John Lovett
University of Arkansas Department of Agriculture
about EurekAlert!

By Jasper

Leave a Reply

Your email address will not be published. Required fields are marked *