int main () { nrk_setup_ports(); nrk_setup_uart(UART_BAUDRATE_115K2); TWI_Master_Initialise(); sei(); nrk_led_set(RED_LED); /* initialize the adxl345 */ init_adxl345(); init_itg3200(); init_hmc5843(); nrk_init(); nrk_led_clr(ORANGE_LED); nrk_led_clr(BLUE_LED); nrk_led_clr(GREEN_LED); nrk_led_clr(RED_LED); nrk_time_set(0,0); nrk_create_taskset (); nrk_start(); return 0; }
void ImuSetup() { Wire.begin(); Serial.begin(9600); for(int i = 0; i < 3; ++i) { accelerometer_data[i] = magnetometer_data[i] = gyro_data[i] = 0; } init_adxl345(); init_hmc5843(); init_itg3200(); }