大学生
最后登录1970-1-1
在线时间 小时
注册时间2015-8-29
|
如题所示哪位大神帮忙看一下 我想用液晶显示6050的测量结果。
但是,LCD_DisEnCh();这三个函数进不去while(1)里面去
求解这是为什么呢?
/**
******************************************************************************
* @file main.c
* @author fire
* @version V1.0
* @date 2013-xx-xx
* @brief òo¾§ÏÔê¾ÖDÎÄ
******************************************************************************
* @attention
*
* êμÑéƽì¨:ò°»e iSO STM32 ¿a·¢°å
* ÂÛì3 :http://www.firebbs.cn
* ìÔ±| :http://firestm32.taobao.com
*
******************************************************************************
*/
#include "stm32f10x.h"
#include "stm32f10x_it.h"
#include "bsp_usart1.h"
#include "bsp_ili9341_lcd.h"
#include "bsp_sdfs_app.h"
#include "bsp_SysTick.h"
#include "bsp_led.h"
#include "mpu6050.h"
#include "bsp_i2c.h"
#define TASK_ENABLE 0
void XIANSHI(void);
extern unsigned int Task_Delay[NumOfTask];
int lcd_char1,lcd_char2,lcd_char3;
int main(void)
{
short Accel[3];
short Gyro[3];
short Temp;
SysTick_Init();
SysTick->CTRL|=SysTick_CTRL_ENABLE_Msk;
/* LED ¶Ë¿ú3õê¼»ˉ */
LED_GPIO_Config();
/* USART1 config */
//USART1_Config();
//printf("\r\n this is a fatfs test demo \r\n");
/* ′®¿úí¨DÅ3õê¼»ˉ */
USART1_Config();
NVIC_Configuration();
//I2C3õê¼»ˉ
i2c_GPIO_Config();
//MPU60503õê¼»ˉ
MPU6050_Init();
LCD_Init();
LCD_Clear(0, 0, 240, 320, BACKGROUND);
/* 3õê¼»ˉsd¿¨ÎļtÏμí3£¬òòÎaoo×ÖμÄ×Ö¿a·ÅÔúáËsd¿¨àïÃæ */
Sd_fs_init();
LCD_DispStr(5, 5, (uint8_t *)"fatfs init success ", RED);
LCD_DispStr(5, 25, (uint8_t *)"insure the sdcard has insert......", RED);
LCD_DispStrCH(50, 50, (uint8_t *)"ò°»e¿a·¢°å", RED);
LCD_DispEnCh(30, 90, "Welcome to use ò°»e ISO Stm32 ¿a·¢°å bigo------", RED);
while(1)
{
if(Task_Delay[0]==TASK_ENABLE)
{
LED1_TOGGLE;
Task_Delay[0]=1000;
}
if(Task_Delay[1]==0)
{
MPU6050ReadAcc(Accel);
printf("\r\n加速度: %8d%8d%8d ",Accel[0],Accel[1],Accel[2]);
//sprintf((char*)lcd_char1,"加速度:4d %4d %4d",Accel[0],Accel[1],Accel[2]);
//LCD_DispEnCh(0, 150, (const uint8_t *)lcd_char1, BLUE );
MPU6050ReadGyro(Gyro);
printf("陀螺仪: %8d%8d%8d ",Gyro[0],Gyro[1],Gyro[2]);
//sprintf((char*)lcd_char2,"陀螺仪: %8d%8d%8d ",Gyro[0],Gyro[1],Gyro[2]);
//LCD_DispEnCh(0, 155, (const uint8_t *)lcd_char2, BLUE );
MPU6050_ReturnTemp(&Temp);
printf("温度: %d",Temp);
//sprintf((char*)lcd_char3,"温度: %d",Temp);
//LCD_DispEnCh(0, 160, (const uint8_t *)lcd_char3, BLUE );
Task_Delay[1]=100;//100ms
}
//************************************* ÏÂÃæêÇÔö¼óèÎÎñμĸñê½************************************//
// if(Task_Delay==0)
// {
// Task(i);
// Task_Delay=;
// }
}
}
|
|