Dear All,
I am new to the Arduino World and I would like to request your guidance with the following issue (which is probably going to be very easy for you guys to figure it out).
My objective is to read four (4) different Analog inputs and store them in an Array. Later, I print the results of the array.
This is the code I've written:
const int R1_AI_inputs[] = {A0 , A1, A2, A3}; // Specifies the pins used for the Analog Inputs used for the Current Sensors at Room 1
int R1_analogsensor_[] = {1, 2, 3, 4}; // Initializes the type for the current sensors readings
void setup()
{
Serial.begin(9600); /* Sets up communication with the serial monitor */
void loop()
{
for (int count = 0; count < 3; count=count++) {
R1_analogsensor_[count] = analogRead(R1_AI_inputs[count]);
delay(10);
}
Serial.print("R1_analogsensor_A0: ");
Serial.println(R1_analogsensor_[0]);
Serial.print("R1_analogsensor_A1: ");
Serial.println(R1_analogsensor_[1]);
Serial.print("R1_analogsensor_A2: ");
Serial.println(R1_analogsensor_[2]);
Serial.print("R1_analogsensor_A3: ");
Serial.println(R1_analogsensor_[3]);
delay(1000);
}
The code is compiling without any errors but I do not see any results at the Serial Monitor. Could you clarify what I am doing wrong?
Kind regards and thank you for your patience.
Marcus