Hi all.
I have:
int xA[] = {11, 22, 33, 44, 55};
uint16_t yA[5];
I got the expected result by the sketch below:
yA[0]=11
yA[1]=22
yA[2]=33
yA[3]=44
yA[4]=55
int i = 0;
int xA[] = {11, 22, 33, 44, 55};
uint16_t yA[5];
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(1000);
Serial.println("start");
for ( i = 0; i < 5; i++)
{
yA[i] = xA[i];
delay(10);
Serial.print("yA["); Serial.print(i); Serial.print("]="); Serial.println(yA[i]);
delay(300);
}
}
void loop() {
// put your main code here, to run repeatedly:
}
question is how to get:
yA[0]=22
yA[1]=33
yA[2]=44
yA[3]=55
yA[4]=11
and:
yA[0]=33
yA[1]=44
yA[2]=55
yA[3]=11
yA[4]=22
etc. loop?
Thanks
Adam