Hi,
I am using the the SensorHub BoosterPack (BOOSTXL-SENSHUB) with the TM4C123GH6PM to measure the Euler's angles. Also, I do a code to recieve data from Matlab and its that's right. But, when I delete all the code of compdcm_mpu9150 and paste my code there are erros, the code on CCS is the following:
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "stdlib.h"
#include <math.h>
#include <time.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_uart.h"
#include "inc/hw_gpio.h"
#include "inc/hw_pwm.h"
#include "inc/hw_types.h"
#include "driverlib/timer.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
#include "driverlib/ssi.h"
#include "driverlib/systick.h"
#include "utils/uartstdio.h"
#include "utils/uartstdio.c"
int main (void){
int buffer=0;
int buffer2[11];
int buffer3=0;
int i=0, l;
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC);
UARTStdioConfig(0, 115200, 16000000);
while(true){
if(UARTCharsAvail(UART0_BASE) == true){
buffer= UARTCharGetNonBlocking(UART0_BASE)-48;
if(buffer == 67){
// built the number
// ------------------------------------------------
for( l=0; l< i+1; l++){
buffer3= (buffer2[l])*pow(10,(i-l-1)) + buffer3;
}
UARTprintf("data: %3d \n", buffer3);
//refresh the values
//-------------------------------
buffer3=0;
l=0;
for( l=0; l< i+1; l++){
buffer2[l]= 0;
}
l=0;
i=0;
}
//----------------------------
else{
buffer2[i]= buffer;
i=i+1;
}
}
}
}
I do not know what is wrong, Coud someone help me?
Regards,
Jhon