Device to measure angle and get IMU measurements.

Dependencies:   mbed commands BLE_API nRF51822

main.cpp

Committer:
dkester
Date:
2015-06-07
Revision:
5:46947b447701
Parent:
4:2a5a08b14539
Child:
6:75263c93daf7

File content as of revision 5:46947b447701:

#include "mbed.h"
#include "Controller.h"


//Ticker ticker;

//InterruptIn   button(p23);
volatile int ledBlink = 0; 

/*

void ledInt(){
    led = !led;    
    }
    
    

void buttonInt(){
    if(ledBlink) {
        //ticker.detach();
        //ledBlink = 0;
        //led = 0;
        *(uint32_t *)0x40000500 = 0x1;
    } else {
        ticker.attach(&ledInt,0.1);
        ledBlink = 1;
        }
    wait(0.25);
    
     //printf("POWER: 0x%x\n", *((unsigned int *)0x40000500));
     //printf("POWER: 0x%x\n", NRF_POWER->SYSTEMOFF);

}
*/

int main(void)
{   
    wait(1);
    Controller* goniometer = new Controller();
    wait(0.01);
    
    while(true) {
        goniometer->run();
    }
}