基于STM32的三轴加速度传感器代码

上传者: fydpx | 上传时间: 2019-12-21 19:46:14 | 文件大小: 235KB | 文件类型: rar
void Adxl_Show_Num(u16 x,u16 y,short num,u8 mode) { if(mode==0) //显示加速度值 { if(num<0) { LCD_ShowChar(x,y,'-',16,0); //显示负号 num=-num; //转为正数 }else LCD_ShowChar(x,y,' ',16,0); //去掉负号 LCD_ShowNum(x+8,y,num,4,16); //显示值 }else //显示角度值 { if(num<0) { LCD_ShowChar(x,y,'-',16,0); //显示负号 num=-num; //转为正数 }else LCD_ShowChar(x,y,' ',16,0); //去掉负号 LCD_ShowNum(x+8,y,num/10,2,16); //显示整数部分 LCD_ShowChar(x+24,y,'.',16,0); //显示小数点 LCD_ShowNum(x+32,y,num,1,16); //显示小数部分 } }

文件下载

资源详情

[{"title":"( 80 个子文件 235KB ) 基于STM32的三轴加速度传感器代码","children":[{"title":"基于STM32的三轴加速度传感器代码","children":[{"title":"README.TXT <span style='color:#111;'> 545B </span>","children":null,"spread":false},{"title":"USMART","children":[{"title":"usmart.c <span style='color:#111;'> 14.42KB </span>","children":null,"spread":false},{"title":"usmart_str.h <span style='color:#111;'> 3.16KB </span>","children":null,"spread":false},{"title":"usmart_config.c <span style='color:#111;'> 1.74KB </span>","children":null,"spread":false},{"title":"usmart_str.c <span style='color:#111;'> 11.29KB </span>","children":null,"spread":false},{"title":"usmart.h <span style='color:#111;'> 5.35KB </span>","children":null,"spread":false},{"title":"readme.txt <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"SYSTEM","children":[{"title":"usart","children":[{"title":"usart.c <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"usart.h <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false}],"spread":true},{"title":"delay","children":[{"title":"delay.c <span style='color:#111;'> 4.91KB </span>","children":null,"spread":false},{"title":"delay.h <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false}],"spread":true},{"title":"sys","children":[{"title":"system_stm32f10x.h <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false},{"title":"stm32f10x.h <span style='color:#111;'> 619.08KB </span>","children":null,"spread":false},{"title":"sys.c <span style='color:#111;'> 6.23KB </span>","children":null,"spread":false},{"title":"sys.h <span style='color:#111;'> 4.34KB </span>","children":null,"spread":false}],"spread":true},{"title":"readme.txt <span style='color:#111;'> 992B </span>","children":null,"spread":false}],"spread":true},{"title":"OBJ","children":[{"title":"test.hex <span style='color:#111;'> 121.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"keilkill.bat <span style='color:#111;'> 399B </span>","children":null,"spread":false},{"title":"USER","children":[{"title":"test.Opt <span style='color:#111;'> 5.16KB </span>","children":null,"spread":false},{"title":"test.c <span style='color:#111;'> 3.37KB </span>","children":null,"spread":false},{"title":"JLinkSettings.ini <span style='color:#111;'> 578B </span>","children":null,"spread":false},{"title":"test.uvproj <span style='color:#111;'> 21.23KB </span>","children":null,"spread":false},{"title":"startup_stm32f10x_hd.s <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false},{"title":"test.uvgui.Administrator <span style='color:#111;'> 68.42KB </span>","children":null,"spread":false},{"title":"test.uvopt <span style='color:#111;'> 26.65KB </span>","children":null,"spread":false},{"title":"test.Uv2 <span style='color:#111;'> 4.44KB </span>","children":null,"spread":false}],"spread":true},{"title":"HARDWARE","children":[{"title":"ADXL345","children":[{"title":"adxl345.c <span style='color:#111;'> 4.98KB </span>","children":null,"spread":false},{"title":"adxl345.h <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false}],"spread":true},{"title":"EXTI","children":[{"title":"exti.c <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"exti.h <span style='color:#111;'> 646B </span>","children":null,"spread":false}],"spread":true},{"title":"DMA","children":[{"title":"dma.c <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"dma.h <span style='color:#111;'> 773B </span>","children":null,"spread":false}],"spread":true},{"title":"KEY","children":[{"title":"key.h <span style='color:#111;'> 825B </span>","children":null,"spread":false},{"title":"key.c <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false}],"spread":true},{"title":"OLED","children":[{"title":"oled.c <span style='color:#111;'> 6.81KB </span>","children":null,"spread":false},{"title":"oled.h <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"oledfont.h <span style='color:#111;'> 15.79KB </span>","children":null,"spread":false}],"spread":true},{"title":"CAN","children":[{"title":"can.c <span style='color:#111;'> 7.68KB </span>","children":null,"spread":false},{"title":"can.h <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true},{"title":"ADC","children":[{"title":"adc.h <span style='color:#111;'> 988B </span>","children":null,"spread":false},{"title":"adc.c <span style='color:#111;'> 2.86KB </span>","children":null,"spread":false}],"spread":false},{"title":"FLASH","children":[{"title":"flash.c <span style='color:#111;'> 9.41KB </span>","children":null,"spread":false},{"title":"flash.h <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false}],"spread":false},{"title":"24CXX","children":[{"title":"24cxx.c <span style='color:#111;'> 3.77KB </span>","children":null,"spread":false},{"title":"myiic.c <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false},{"title":"24cxx.h <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"myiic.h <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":false},{"title":"JOYPAD","children":[{"title":"joypad.h <span style='color:#111;'> 821B </span>","children":null,"spread":false},{"title":"joypad.c <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false}],"spread":false},{"title":"WKUP","children":[{"title":"wkup.c <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"wkup.h <span style='color:#111;'> 755B </span>","children":null,"spread":false}],"spread":false},{"title":"RS485","children":[{"title":"rs485.c <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false},{"title":"rs485.h <span style='color:#111;'> 1005B </span>","children":null,"spread":false}],"spread":false},{"title":"LCD","children":[{"title":"lcd.h <span style='color:#111;'> 9.14KB </span>","children":null,"spread":false},{"title":"ILI93xx.c <span style='color:#111;'> 78.33KB </span>","children":null,"spread":false},{"title":"FONT.H <span style='color:#111;'> 15.78KB </span>","children":null,"spread":false}],"spread":false},{"title":"REMOTE","children":[{"title":"remote.c <span style='color:#111;'> 3.92KB </span>","children":null,"spread":false},{"title":"remote.h <span style='color:#111;'> 872B </span>","children":null,"spread":false}],"spread":false},{"title":"SPI","children":[{"title":"spi.c <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"spi.h <span style='color:#111;'> 964B </span>","children":null,"spread":false}],"spread":false},{"title":"TOUCH","children":[{"title":"touch.c <span style='color:#111;'> 14.52KB </span>","children":null,"spread":false},{"title":"ott2001a.c <span style='color:#111;'> 4.47KB </span>","children":null,"spread":false},{"title":"ctiic.h <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"touch.h <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"ctiic.c <span style='color:#111;'> 2.97KB </span>","children":null,"spread":false},{"title":"ott2001a.h <span style='color:#111;'> 1.98KB </span>","children":null,"spread":false}],"spread":false},{"title":"RTC","children":[{"title":"rtc.h <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"rtc.c <span style='color:#111;'> 6.33KB </span>","children":null,"spread":false}],"spread":false},{"title":"TIMER","children":[{"title":"timer.c <span style='color:#111;'> 5.05KB </span>","children":null,"spread":false},{"title":"timer.h <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false}],"spread":false},{"title":"DAC","children":[{"title":"dac.h <span style='color:#111;'> 677B </span>","children":null,"spread":false},{"title":"dac.c <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":false},{"title":"LED","children":[{"title":"led.h <span style='color:#111;'> 685B </span>","children":null,"spread":false},{"title":"led.c <span style='color:#111;'> 934B </span>","children":null,"spread":false}],"spread":false},{"title":"BEEP","children":[{"title":"beep.c <span style='color:#111;'> 753B </span>","children":null,"spread":false},{"title":"beep.h <span style='color:#111;'> 681B </span>","children":null,"spread":false}],"spread":false},{"title":"WDG","children":[{"title":"wdg.c <span style='color:#111;'> 2.14KB </span>","children":null,"spread":false},{"title":"wdg.h <span style='color:#111;'> 851B </span>","children":null,"spread":false}],"spread":false},{"title":"TPAD","children":[{"title":"tpad.h <span style='color:#111;'> 918B </span>","children":null,"spread":false},{"title":"tpad.c <span style='color:#111;'> 4.13KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明