Skip to content

Read_Gyro Not declared in scope #68

@Tar997

Description

@Tar997

I got this error while tried to upload the Arduino/Razor_AHRS/Razor_AHRS.ino using Arduino, i also had all the other .ino files from that folder open

#Error Message#

Razor_AHRS:456:13: error: 'Read_Gyro' was not declared in this scope

if (!reset_calibration_session_flag) return;

     ^

Razor_AHRS:457:14: error: 'Read_Accel' was not declared in this scope

Razor_AHRS:458:13: error: 'Read_Magn' was not declared in this scope

// Reset acc and mag calibration variables

     ^

D:\Tariq\Engineering\Study\Projects\Ball Bot Project\04. Parts of the Bot\01. IMU Sensor\02. Codes\01. Sample Code from SparkFun\razor-9dof-ahrs-master\razor-9dof-ahrs-master\Arduino\Razor_AHRS\Razor_AHRS.ino: In function 'void reset_sensor_fusion()':

Razor_AHRS:478:43: error: 'Vector_Cross_Product' was not declared in this scope

Razor_AHRS:486:19: error: 'Compass_Heading' was not declared in this scope

while (Serial.available() < 1) { } // Block

           ^

Razor_AHRS:490:52: error: 'init_rotation_matrix' was not declared in this scope

D:\Tariq\Engineering\Study\Projects\Ball Bot Project\04. Parts of the Bot\01. IMU Sensor\02. Codes\01. Sample Code from SparkFun\razor-9dof-ahrs-master\razor-9dof-ahrs-master\Arduino\Razor_AHRS\Razor_AHRS.ino: In function 'void setup()':

Razor_AHRS:568:12: error: 'I2C_Init' was not declared in this scope

   if (values_param == 'r')  // Output _r_aw sensor values

    ^

Razor_AHRS:569:14: error: 'Accel_Init' was not declared in this scope

     output_mode = OUTPUT__MODE_SENSORS_RAW;

      ^

Razor_AHRS:570:13: error: 'Magn_Init' was not declared in this scope

   else if (values_param == 'c')  // Output _c_alibrated sensor values

     ^

Razor_AHRS:571:13: error: 'Gyro_Init' was not declared in this scope

     output_mode = OUTPUT__MODE_SENSORS_CALIB;

     ^

D:\Tariq\Engineering\Study\Projects\Ball Bot Project\04. Parts of the Bot\01. IMU Sensor\02. Codes\01. Sample Code from SparkFun\razor-9dof-ahrs-master\razor-9dof-ahrs-master\Arduino\Razor_AHRS\Razor_AHRS.ino: In function 'void loop()':

Razor_AHRS:699:91: error: 'output_calibration' was not declared in this scope

Razor_AHRS:707:23: error: 'Compass_Heading' was not declared in this scope

Razor_AHRS:708:21: error: 'Matrix_update' was not declared in this scope

Razor_AHRS:709:17: error: 'Normalize' was not declared in this scope

Razor_AHRS:710:24: error: 'Drift_correction' was not declared in this scope

Razor_AHRS:711:20: error: 'Euler_angles' was not declared in this scope

Razor_AHRS:713:63: error: 'output_angles' was not declared in this scope

Razor_AHRS:717:64: error: 'output_sensors' was not declared in this scope

D:\Tariq\Engineering\Study\Projects\Ball Bot Project\04. Parts of the Bot\01. IMU Sensor\02. Codes\01. Sample Code from SparkFun\razor-9dof-ahrs-master\razor-9dof-ahrs-master\Arduino\Razor_AHRS\DCM.ino: In function 'void Normalize()':

DCM:12:65: error: 'Vector_Dot_Product' was not declared in this scope

error= -Vector_Dot_Product(&DCM_Matrix[0][0],&DCM_Matrix[1][0])*.5; //eq.19

                                                         ^

DCM:14:58: error: 'Vector_Scale' was not declared in this scope

Vector_Scale(&temporary[0][0], &DCM_Matrix[1][0], error); //eq.19

                                                  ^

DCM:17:67: error: 'Vector_Add' was not declared in this scope

Vector_Add(&temporary[0][0], &temporary[0][0], &DCM_Matrix[0][0]);//eq.19

                                                           ^

DCM:20:74: error: 'Vector_Cross_Product' was not declared in this scope

Vector_Cross_Product(&temporary[2][0],&temporary[0][0],&temporary[1][0]); // c= a x b //eq.20

                                                                  ^

D:\Tariq\Engineering\Study\Projects\Ball Bot Project\04. Parts of the Bot\01. IMU Sensor\02. Codes\01. Sample Code from SparkFun\razor-9dof-ahrs-master\razor-9dof-ahrs-master\Arduino\Razor_AHRS\DCM.ino: In function 'void Drift_correction()':

DCM:54:77: error: 'Vector_Cross_Product' was not declared in this scope

Vector_Cross_Product(&errorRollPitch[0],&Accel_Vector[0],&DCM_Matrix[2][0]); //adjust the ground of reference

                                                                     ^

DCM:55:72: error: 'Vector_Scale' was not declared in this scope

Vector_Scale(&Omega_P[0],&errorRollPitch[0],Kp_ROLLPITCH*Accel_weight);

                                                                ^

DCM:58:44: error: 'Vector_Add' was not declared in this scope

Vector_Add(Omega_I,Omega_I,Scaled_Omega_I);

                                    ^

D:\Tariq\Engineering\Study\Projects\Ball Bot Project\04. Parts of the Bot\01. IMU Sensor\02. Codes\01. Sample Code from SparkFun\razor-9dof-ahrs-master\razor-9dof-ahrs-master\Arduino\Razor_AHRS\DCM.ino: In function 'void Matrix_update()':

DCM:85:53: error: 'Vector_Add' was not declared in this scope

Vector_Add(&Omega[0], &Gyro_Vector[0], &Omega_I[0]); //adding proportional term

                                             ^

DCM:110:60: error: 'Matrix_Multiply' was not declared in this scope

Matrix_Multiply(DCM_Matrix,Update_Matrix,Temporary_Matrix); //a*b=c

                                                    ^

exit status 1
'Read_Gyro' was not declared in this scope

Please help me resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions