LSM303DLM demo

ism303demo

#include "mbed.h"
#include "LSM303.h"

int main()
{

    LSM303 lsm;
    lsm.setup();
    int heading;
    
    while(1) {
        heading = lsm.getTiltHeading();
        printf("heading=%d\n", heading);
        wait_ms(500);    
    }


Please log in to post comments.