I am not completely sure how to describe this but here we go…
I am trying to add the values from my sensor to each other. If the value is 500 (as the number of measurements) the test is confirmed since the measured value should be 1. If the value is less than 500 the test has failed.
int Sensor = 4;
for (int i = 0; i <= 500; i++)
int sensorVal = digitalRead(Sensor);
byte arrayIndex = 0;
A[arrayIndex] = sensorVal;
This is where i want to add the values