 ``` #include Myro.h #include math.h #include stdio.h #include iostream using namespace std; int fibonacciSequence(int round) { double numbers[round]; numbers = 0; numbers = 1; for(int i = 2; i <= round; i++) { numbers[i] = numbers[i - 1] + numbers[i - 2]; } for (int n = 1; n <= round; n++) { robot.forward(1,numbers[n]/10.0); robot.turnLeft(1,.733/3); robot.forward(1,numbers[n]/10.0); robot.turnLeft(1,.733/3); robot.forward(1,numbers[n]/10.0); robot.turnLeft(1,.733/3); } } int main(int argc, char ** argv) { int round = 0; connect("/dev/tty.Fluke2-01FB-Fluke2"); cout << "enter how many numbers you want in the sequence" <> round; fibonacciSequence(round); disconnect(); return 0; } ``` ``` #include Myro.h #include math.h #include stdio.h #include iostream using namespace std; int getFib(int n) { int result=0; if(n>=2) { result= getFib(n-2)+getFib(n-1); } else { result=n; } return result; } int main() { connect("/dev/rfcomm0"); cout << "Waiting..." << endl; wait(2); cout << "Battery status: " << robot.getBattery() << endl; for (int i=0; i<6; i++) { robot.motors(getFib(i)*.1,1); wait(1); cout << getFib(i) << endl; } cout << "Waiting to disconnect..." << endl; wait(5); cout << "Disconnecting. Goodbye." << endl; disconnect(); return 0; } ``` 