3 Replies Latest reply on Mar 5, 2015 3:34 AM by user_1377889
      • 1. Re: compiling errors...can anyone help me
        user_1377889

        Triple post, follow up here

           

         

           

        Bob

        • 2. Re: compiling errors...can anyone help me
          bathula.navya.deepika

           UART1_Init(9600);       //initialize UART module

             

            UART1_Write_Text("Starting ADXL345 test.\n");

             

            UART1_Write(13);

             

            UART1_Write(10);

             

           

             

            CyDelay_ms(1000);

             

           

             

            // Go into standby mode to configure the device.

             

              ADXL345_Write(POWER_CTL, 0x00);

             

           

             

            // Full resolution, +/-16g, 4mg/LSB.

             

            ADXL345_Write(DATA_FORMAT, 0x0B);

             

           

             

            // Set data rate.

             

            ADXL345_Write(BW_RATE, SPEED);

             

           

             

            // Measurement mode.

             

            ADXL345_Write(POWER_CTL, 0x08);

             

           

             

            while(1) {

             

           

             

              CyDelay_ms(800);

             

           

             

              // Read X Hi

             

              readings[0] = ADXL345_Read(DATAX0) << 8;

             

           

             

              // Read X Lo

             

              readings[0] = readings[0] | ADXL345_Read(DATAX1);

             

           

             

              // Read Y Hi

             

              readings[1] = ADXL345_Read(DATAY0) << 8;

             

           

             

              // Read Y Lo

             

              readings[1] = readings[1] | ADXL345_Read(DATAY1);

             

           

             

              // Read Z Hi

             

              readings[2] = ADXL345_Read(DATAZ0) << 8;

             

           

             

              // Read Z Lo

             

              readings[2] = readings[2] | ADXL345_Read(DATAZ1);

             

          }

             

          // Send values via UART

             

              //   X

             

              UART1_Write_Text("X: ");

             

              IntToStr(readings[0], out);

             

              UART1_Write_Text(out);

             

              UART1_Write(13);

             

              UART1_Write(10);

             

           

             

              Delay_ms(100);

             

           

             

              //   Y

             

              UART1_Write_Text("Y: ");

             

              IntToStr(readings[1], out);

             

              UART1_Write_Text(out);

             

              UART1_Write(13);

             

              UART1_Write(10);

             

           

             

              CyDelay_ms(100);

             

           

             

              //   Z

             

              UART1_Write_Text("Z: ");

             

              IntToStr(readings[2], out);

             

              UART1_Write_Text(out);

             

              UART1_Write(13);

             

              UART1_Write(10);

             

             //

             

              UART1_Write(13);

             

              UART1_Write(10);

             

             //

             

          //

             

             }

             

          its showing "type specifier missing,defaults to int" error

          • 3. Re: compiling errors...can anyone help me
            user_1377889

            When you double-click on the error-message you will be directed immediately to the line in your source that has the error.

               

            Not much use for us to read your posted code, please always attach the complete project, so that we all can have a look at all of your settings? To do so, use
            Creator->File->Create Workspace Bundle (minimal)
            and attach the resulting file.



            Bob