Arrays

So I want to put all of these methods (not sure if that is the right term) in to an array so I can access them in a FOR loop. Here is what I have tried... Any help would be appreciated.

WiiChuck chuck = WiiChuck();
WiiChuck (I've tried chuck here as well) command[6] = chuck.readRoll(), chuck.readPitch(), chuck.readAccelX(), chuck.readAccelY(), chuck.readAccelZ();

for(int i = 0; i < 6; i++){
   if(command[i] < 10){
      do something
   }
}

Interesting idea but it won't work. You can store only variables and text.

http://arduino.cc/en/Reference/Array

How much Wii would a WiiChuck chuck if a WiiChuck could chuck Wii...

Doesn't quite have the same ring to it...

:smiley:

You can store only variables and text.

..or structures, or objects, or pointers to objects, or...

I don't know C++ so can't comment on that bit, but in C you could have an array of function pointers, and consequently call each function as you iterate through the array.