Need help understanding and how to code this on arduino

Create a program that reads the value of the potentiometer every 2 seconds and stores the values in an array. Read only 10 numbers. After the tenth number is read, print the stored values to the screen. Use a one second-delay between printing the numbers. Include text on the screen so the user understands what the numbers represent.

Basically i want to know how to code, if any of you could help then that would be amazing. Im really struggling understanding Arduino and how to properly use it.

Thanks so much guys

You should probably try to do your own homework.

The Arduino has a ton of programming examples built in.

Click on File then Examples.

One of the exciting features of the Arduino is the ability to do things yourself. If for some reason you don't want to do things yourself, head over to "Gigs and Collaborations" and bring your wallet.

Break it down.

Create a program that reads the value of the potentiometer and displays that value on the serial monitor.

Create a program that uses a millis() timer which self resets every 2 seconds.

Create a program which reads ten numbers from an array and then stores the values in a different array.
Extra credit - Display something like: reading X from array 1 storing X to array 2 as you go along.

Use the knowledge gained from item#2 to create a one second-delay between printing the numbers.

Create a program which prints selected explanatory *text *on the serial monitor.

When you can do all these things it's not much further to combine them and do everything at once.

several things at the same time

Bookmark this - Arduino reference

If I read this correctly this program is simple enough (i.e., everything is serialized) to just use delay(), although using millis() would be a great learning exercise.

Some useful tutorials for you:

Hi,
Welcome to the forum.

Have you downloaded the IDE?
What model Arduino do you have?
What value potentiometer do you have?

Is this a school/college/university project?

Thanks.. Tom... :slight_smile: