Hi all,

I've been working this last week to understand as much as possible by myself the arduino. And I am feeling that I now need to attack the understanding of ARRAYS for which I haven't found a clear tutorial for what I am looking for. Your guidance help would be much appreciated.

I am simplifying as much my project so let's say to simplify I have 3 leds on 3 analog outputs + 1 pot + 2 switches.

What I would like to do is my pot to determine the led I am "working on" - if my analog read gives me from 0 to 341 I'm on ledPin1 , if from 341 to 682 on ledPin2 else on ledPin3

if i'm working on ledPin1 - i wan't my switches to either increment or decrement the voltage value given to the ledPin1 by changing the value in the ARRAY and to turn off the other 2 ledPins.

I have written this code without ARRAYS but I'm just trying to understand the principle and how to change values within an array and how to get to work with them (read, write) to simplify my codes.

Therefore I would like to work with ARRAYS : 1) If I'm working on led1 - i want to read and change the voltage of each 3 with the switchs 2) if I go to led2 - I want to do the same 3) If I go back to led1 I want to get back to the same states for each led than when I stopped working previously on 1)

Help would be appreciated. Once again i haven't found a clear beginner's guide to ARRAYS and the tutorial on Arduino's website doesn't really help me.

Thanks in advance, m