Hi, I am trying to read analog input values, coming from a potentio-meter, and store these in an array that has to be sent to Flash.
I want to read the values from the pot-meter every 2 seconds, and then store these in an array. The array needs to contain 32 characters in the end. I have written the following code so far:
int sensorPin = 2; // input pin for the potentio meter
int val = 0; // variable to store input from sensor
int i;
int myArray[33]; // the array with 33 characters, no initialization
void setup(){
Serial.begin(9600); // open serial port
}
void loop(){
val = analogRead(sensorPin);
for (val = 0; val < 33; val = val+1){
Serial.println(myArray[val]);
}
delay (2000);
}
This doesn't seem to work... I don't know how to solve this, so it would be great to get some help ![]()
Thanks so much!