MMA8451 Simple Pedometer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MMA8451 Simple Pedometer

1,444 Views
federicovilli
Contributor I

I'm trying to find the simplest way to make a not too much accurate pedometer (20% error) with MMA8451.

To achieve that goal I have understand that first of all I have to configure MMA8451 properly to obtain the right data (not too few neither too much) from accelerometer.
Then I have to pull out steps from data !!

I'm looking for any kind of suggestion ...
Tnx

Labels (1)
0 Kudos
1 Reply

1,148 Views
diegoadrian
NXP Employee
NXP Employee

Hello Federico,

Thank you for writing.

In your case, I highly recommend you to use the MMA9553. The MMA9553 is an intelligent motion sensing pedometer, and is much more easy to make a pedometer with this IC than with the MMA8451.

This is how you can configure the MMA9553.

void MMA9553L_Init(void){

     pedometer_config();          // Write all the Pedometer configuration
     pedometer_enable();          // Enable the Pedometer application
     pedometer_active();
     pedometer_wakeup();          // Disable Sleep Mode and enable Wake-up Mode

}

The pedometer_config function, is the following.

void pedometer_config(void){

     unsigned char MBx[20]= {0x15, 0x20, 0x00, 0x10,
                       SLEEP_MIN_MSB, SLEEP_MIN_LSB,
                    SLEEP_MAX_MSB, SLEEP_MAX_LSB,
                    SLEEP_COUNT_THR_MSB, SLEEP_COUNT_THR_LSB,
                    CONFIG, STEP_LENGTH,
                    HEIGHT, WEIGHT, FILTER_STEP,
                    MALE_FILTER_TIME, STEP_PERIOD,
                    STEP_COALESCE, ACT_COUNT_THR_MSB,
                    ACT_COUNT_THR_LSB};

     I2C_WriteMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, sizeof(MBx), MBx);

}

The pedometer_enable function, is the following.

void pedometer_enable(void){

     unsigned char MBx[5]={0x17, 0x20, 0x05, 0x01, 0x00};

     I2C_WriteMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, sizeof(MBx), MBx);
}

The pedometer_active function, is the following.

void pedometer_active(void){

     unsigned char MBx[5]={0x15, 0x20, 0x06, 0x01, 0x80};

     I2C_WriteMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, sizeof(MBx), MBx);

}

The pedometer_wakeup function, is the following.

void pedometer_wakeup(void){

     unsigned char MBx[5]={0x12, 0x20, 0x06, 0x01, 0x00};

     I2C_WriteMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, sizeof(MBx), MBx);
}

This is how you could read the steps.

void Read_Step(void)
{
     pedometer_cmd_readstatus();

     I2C_ReadMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, 2, MBx);
     if (MBx[1]==0x80){ // Is COCO flag set?
          I2C_ReadMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, sizeof(MBx), MBx); // 12 bytes status data + 4 bytes frame start

          StepCount = ((short) (MBx[6]<<8 | MBx[7]));
          // Send the step count to the terminal
          //Hex_to_Dec(StepCount);
     }
}

The pedometer_cmd_readstatus function is the following.

void pedometer_cmd_readstatus(void){

     unsigned char MBx[4]={0x15, 0x30, 0x00, 0x0C};

     I2C_WriteMultiRegisters(MMA9553L_ADDRESS, MMA9553_SUB_ADDR, sizeof(MBx), MBx);
}

Finally, these are the macros that you are going to need.

#define MMA9553L_ADDRESS      0x4C
#define MMA9553_SUB_ADDR      0x00

#define SLEEP_MIN_MSB           0x0C
#define SLEEP_MIN_LSB           0xE0
#define SLEEP_MAX_MSB           0x13
#define SLEEP_MAX_LSB           0x20
#define SLEEP_COUNT_THR_MSB 0x00
#define SLEEP_COUNT_THR_LSB 0x96
#define CONFIG                    0x60
#define STEP_LENGTH               0x50
#define HEIGHT                     0xAA          // Height in centimeters, 170 (0xAA)
#define WEIGHT                     0x44          // Weight in kilograms, 68 (0x44)
#define FILTER_STEP           0x04
#define MALE_FILTER_TIME     0x03          // Male
#define STEP_PERIOD           0x05
#define STEP_COALESCE           0x01
#define ACT_COUNT_THR_MSB   0x00
#define ACT_COUNT_THR_LSB   0x00

I hope this information will be useful for you.

Best Regards,

Diego

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-629206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMMA8451%20Simple%20Pedometer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-629206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20trying%20to%20find%20the%20simplest%20way%20to%20make%20a%20not%20too%20much%20accurate%20pedometer%20(20%25%20error)%20with%20MMA8451.%3C%2FP%3E%3CP%3ETo%20achieve%20that%20goal%20I%20have%20understand%20that%20first%20of%20all%20I%20have%20to%20configure%20MMA8451%20properly%20to%20obtain%20the%20right%20data%20(not%20too%20few%20neither%20too%20much)%20from%20accelerometer.%3CBR%20%2F%3EThen%20I%20have%20to%20pull%20out%20steps%20from%20data%20!!%3C%2FP%3E%3CP%3EI'm%20looking%20for%20any%20kind%20of%20suggestion%20...%3CBR%20%2F%3ETnx%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-629206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAccelerometers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-629207%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MMA8451%20Simple%20Pedometer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-629207%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Federico%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%20for%20writing.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIn%20your%20case%2C%20I%20highly%20recommend%20you%20to%20use%20the%20MMA9553.%20The%20MMA9553%20is%20an%20intelligent%20motion%20sensing%20pedometer%2C%20and%20is%20much%20more%20easy%20to%20make%20a%20pedometer%20with%20this%20IC%20than%20with%20the%20MMA8451.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThis%20is%20how%20you%20can%20configure%20the%20MMA9553.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EMMA9553L_Init%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3Epedometer_config%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Write%20all%20the%20Pedometer%20configuration%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3Epedometer_enable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Enable%20the%20Pedometer%20application%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3Epedometer_active%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3Epedometer_wakeup%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Disable%20Sleep%20Mode%20and%20enable%20Wake-up%20Mode%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20pedometer_config%20function%2C%20is%20the%20following.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3Epedometer_config%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22keyword%20token%22%3Eunsigned%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Echar%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E20%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x15%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x20%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x00%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x10%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SLEEP_MIN_MSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20SLEEP_MIN_LSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSLEEP_MAX_MSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20SLEEP_MAX_LSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSLEEP_COUNT_THR_MSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20SLEEP_COUNT_THR_LSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BCONFIG%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20STEP_LENGTH%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BHEIGHT%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20WEIGHT%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20FILTER_STEP%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BMALE_FILTER_TIME%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20STEP_PERIOD%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSTEP_COALESCE%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20ACT_COUNT_THR_MSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BACT_COUNT_THR_LSB%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_WriteMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Esizeof%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20pedometer_enable%20function%2C%20is%20the%20following.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3Epedometer_enable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22keyword%20token%22%3Eunsigned%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Echar%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E5%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x17%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x20%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x05%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x01%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x00%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_WriteMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Esizeof%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20pedometer_active%20function%2C%20is%20the%20following.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3Epedometer_active%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22keyword%20token%22%3Eunsigned%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Echar%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E5%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x15%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x20%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x06%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x01%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x80%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_WriteMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Esizeof%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20pedometer_wakeup%20function%2C%20is%20the%20following.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3Epedometer_wakeup%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22keyword%20token%22%3Eunsigned%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Echar%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E5%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x12%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x20%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x06%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x01%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x00%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_WriteMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Esizeof%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThis%20is%20how%20you%20could%20read%20the%20steps.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERead_Step%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3Epedometer_cmd_readstatus%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_ReadMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E2%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x80%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Is%20COCO%20flag%20set%3F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_ReadMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Esizeof%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%2012%20bytes%20status%20data%20%2B%204%20bytes%20frame%20start%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BStepCount%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Eshort%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E6%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E8%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E7%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Send%20the%20step%20count%20to%20the%20terminal%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FHex_to_Dec(StepCount)%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20pedometer_cmd_readstatus%20function%20is%20the%20following.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3Epedometer_cmd_readstatus%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22keyword%20token%22%3Eunsigned%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Echar%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E4%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x15%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x30%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x00%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x0C%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22token%20function%22%3EI2C_WriteMultiRegisters%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMMA9553L_ADDRESS%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MMA9553_SUB_ADDR%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Esizeof%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EMBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20MBx%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EFinally%2C%20these%20are%20the%20macros%20that%20you%20are%20going%20to%20need.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20MMA9553L_ADDRESS%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x4C%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20MMA9553_SUB_ADDR%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x00%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20SLEEP_MIN_MSB%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x0C%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20SLEEP_MIN_LSB%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0xE0%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20SLEEP_MAX_MSB%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x13%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20SLEEP_MAX_LSB%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x20%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20SLEEP_COUNT_THR_MSB%200x00%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20SLEEP_COUNT_THR_LSB%200x96%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20CONFIG%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x60%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20STEP_LENGTH%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x50%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20HEIGHT%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0xAA%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Height%20in%20centimeters%2C%20170%20(0xAA)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20WEIGHT%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x44%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Weight%20in%20kilograms%2C%2068%20(0x44)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20FILTER_STEP%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x04%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20MALE_FILTER_TIME%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x03%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Male%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20STEP_PERIOD%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x05%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20STEP_COALESCE%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B0x01%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20ACT_COUNT_THR_MSB%26nbsp%3B%26nbsp%3B%200x00%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20ACT_COUNT_THR_LSB%26nbsp%3B%26nbsp%3B%200x00%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20hope%20this%20information%20will%20be%20useful%20for%20you.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3EDiego%3C%2FP%3E%3C%2FLINGO-BODY%3E