This programs jams when it executes "gyro.begin()" Is there a solution?
int Segment, n, Compare;
double ANGLE [100];
double DISTANCE [100] ;
double XX [100] ;
double YY [100] ;
double Correlation [20 ] = {1,9,2,8,3,7,2,6,5};
double Sorted_Correlation [20 ] = {1,2,2,3,7,8,9,5,6};
bool Matched [20 ] = {0,0,0,0,0,0,0,0,0};
int Backward_Index [20 ] = {1,1,1,1,1,1,1,1,1};
double rotation, newangle, oldangle;
int Creatures = 7;
bool Searching = 1;
double angle_rad = PI / 180.;
double angle_deg = 180.0 / PI;
double speed;
double Distance;
int x, count=1, size_of_array=0, Segment0, MinPower ;
boolean Left = 1, Turning, Confident ;
void setup() {
//Set Pwm 8KHz
TCCR1A = _BV(WGM10);
TCCR1B = _BV(CS11) | _BV(WGM12);
TCCR2A = _BV(WGM21) | _BV(WGM20);
TCCR2B = _BV(CS21);
int n = 6,k, temp, Heading ;
REAL x ;
REAL y;
REAL m,b,r;
Serial.begin(9600);
Serial.println(" \n");
Serial.println("Room_Map.ino") ;
Serial.println("Start Setuuuup");
gyro.begin();
Serial.println("asdfasf");
And the output is:
Room_Map.ino
Start Setuuuup