Beispiel #1
0
int main()
{
	struct Gyro1DKalman filter_roll;
	init_Gyro1DKalman(&filter_roll, 0.1,0.3, 1);

	Init();

	PIO_SODR = (1 << switch_pin);
	/* 3초 대기 */
	delay_ms(3000);               
	PIO_CODR = (1 << switch_pin);
	
	INIT_UART0();
	
	while(1)
	{
		if(cnt_ == 100)
		{
			Kalman(&filter_roll);
		}
	}		
	
	return 0;
}
Beispiel #2
0
void oled_setup()
{
INIT_UART0( UART_BAUDRATE_9K6, (UART_OPT_NO_PARITY|UART_OPT_8_BITS_PER_CHAR|UART_OPT_ONE_STOP_BIT));
ENABLE_UART0();
}