Authored by Rachel S. Haselby
In this activity, you will learn how to create functions to be reused throughout the code. You will also learn about inputs and outputs and how to group logic into pieces. We will use an Arduino program and a Wokwi simulator to create a two-button math counter.
By the end of this activity, you’ll be able to define the word function, understand how to use functions, explain inputs and outputs, and create functions using a standard formula.
For this activity, please use a desktop or laptop computer. Mobile devices are not supported.
How would you like to do this activity?
Hint: After completing the activity, don’t forget to
mark it as
complete to track your progress!
Brought to you by Purdue University Extension and Google No endorsement by 4-H is implied or intended. 4-H is the youth development program for our nation’s cooperative extension system.