By John Lovett
Credit: U of A System Division of Agriculture
By John Lovett
University of Arkansas System Division of Agriculture
FAYETTEVILLE, Ark. — Artificial intelligence tools such as ChatGPT show promise as a useful means in agriculture to write simple computer programs for microcontrollers, according to a study published this month.
Microcontrollers are small computers that can perform tasks based on custom computer programs. They receive inputs from sensors and can be used in climate and irrigation controls, food processing systems, as well as robotic and drone applications, to name a few agricultural uses.
A recent study published with the Arkansas Agricultural Experiment Station and the Dale Bumpers College of Agricultural, Food and Life Sciences showed agriculture students who were unfamiliar with computer coding were able to a program a microcontroller to perform a simple task using ChatGPT.
“Generative AI can make a big impact on agriculture … I can’t see how it wouldn’t,” said Don Johnson, University Professor of agricultural education, communications and technology and the lead researcher on the project. “We need to prepare our graduates to be a part of that.”
“Generative” refers to the tool’s ability to create content.
Johnson’s latest study on the topic, titled “Agriculture students’ use of generative artificial intelligence for microcontroller programming,” was published in the Natural Sciences Education journal in August. Co-authors included Bumpers College faculty members in the agricultural education, communications and technology department, Will Doss, assistant professor, and Christopher Estepp, associate professor.
Johnson said computer programming has typically not been taught in most undergraduate agriculture majors, 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 who have deep expertise in computer programming, Johnson explained the focus of these studies has been to explore how people without deep expertise can use microcontrollers in their academic and professional careers.
Johnson conducts research on human capital development and agricultural technologies for the experiment station, the research arm of the University of Arkansas System Division of Agriculture.
“I think what we’ve established is that ag students can use generative artificial intelligence to write code to solve moderately difficult programming problems without any deep knowledge of programming,” Johnson said.
Study origins
Johnson began investigating the topic of AI-assisted programming in 2022 when ChatGPT was released and learned that it could write code for microcontrollers like Arduinos. He conducted a preliminary study not long afterward comparing the abilities, interest and confidence between two groups of undergraduate agriculture students as they programmed a microcontroller to blink two LEDs in a particular sequence. One group of students wrote their own programs while the other group used ChatGPT.
The results indicated students writing their own programs developed grater Arduino programming confidence and ability than novice students using ChatGPT. However, both groups had the same level of success and interest in learning more about the microcontrollers and coding.
The follow-up study published in August was conducted solely with undergraduate agricultural students without significant computer programming experience. The study aimed to determine the confidence in their ability to use ChatGPT to write Arduino code for a more advanced problem than in the first study. This second study required students to use ChatGPT to program the Arduino to turn on a transfer pump when the level of solution in a heating tank fell 8 inches or more below a sensor and then turn the pump off when the tank refilled to within 3 inches of the sensor.
“You would need some degree of sophistication in programming to write a code for this problem in the second study, and none of these students did,” Johnson said. “But they were successful. Nine of the 11 two-person teams were successful in getting the code to do exactly what it was supposed do.”
ChatGPT coaching in both studies involved informing the students what made 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.
Going a step further
Johnson would like to take the experiment one step further by leaving the problem open-ended — let students come up with their own scenarios and use ChatGPT to write the code for a microcontroller.
“I want to give students the confidence to approach microcontrollers in a problem-solving orientation and say ‘Yes, I can use this tool to solve my problem,” Johnson said.
To learn more about the Division of Agriculture 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. To learn more about the Division of Agriculture, visit uada.edu. Follow us on X at @AgInArk. To learn about extension programs in Arkansas, contact your local Cooperative Extension Service agent or visit uaex.uada.edu.
About the Division of Agriculture
The University of Arkansas System Division of Agriculture’s mission is to strengthen agriculture, communities, and families by connecting trusted research to the adoption 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 Division of Agriculture is one of 20 entities within the University of Arkansas System. It has offices in all 75 counties in Arkansas and faculty on five system campuses.
The University of Arkansas System Division of Agriculture offers all its Extension and Research programs and services without regard to race, color, sex, gender identity, sexual orientation, national origin, religion, age, disability, marital or veteran status, genetic information, or any other legally protected status, and is an Affirmative Action/Equal Opportunity Employer.
DOI
10.1002/nse2.20155
Method of Research
Observational study
Subject of Research
People
Article Title
Agriculture students’ use of generative artificial intelligence for microcontroller programming
Article Publication Date
12-Aug-2024