91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 30.72MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-22
  • 語言: 其他
  • 標簽: STM32??JY901??陀螺儀??

資源簡介

JY901陀螺儀的STM32資料,程序可 用stm32直接將陀螺儀數據采集并控制

資源截圖

代碼片段和文件信息

/*
編寫者:Kevin
網址:http://RobotControl.taobao.com
作者E-mail:1609370741@qq.com
編譯環境:MDK-Lite??Version:?5.17
初版時間:?2016-1-31
測試:?本程序已在【君悅智控】的STM32Core平臺上完成測試
功能:
用STM32Core平臺IIC接口讀取JY901的數據,然后通過串口1打印到串口助手。
接線
USB-TTL工具?????????????????STM32Core??????????????JY901
VCC??????????-----???????????VCC????????----????????VCC
TX???????????-----???????????RX1??PA10腳???
RX???????????-----???????????TX1??PA9腳
GND??????????-----???????????GND????????----????????GND
?????????????????????????????SDA2?PB11腳??????----????????SDA
?SCL2??PB10腳?????----????????SCL
------------------------------------
?*/
#include?
#include?
#include?“Main.h“
#include?“REG.h“
#include?“stm32f10x_rcc.h“
#include?“stm32f10x_gpio.h“
#include?“UART1.h“
#include?“delay.h“
#include?“IOI2C.h“
#include?“hw_config.h“

void?ShortToChar(short?sDataunsigned?char?cData[])
{
cData[0]=sData&0xff;
cData[1]=sData>>8;
}
short?CharToShort(unsigned?char?cData[])
{
return?((short)cData[1]<<8)|cData[0];
}

int?main(void)
{??
??unsigned?char?chrTemp[30];
unsigned?char?str[100];
float?a[3]w[3]h[3]Angle[3];

USB_Config();
SysTick_init(7210);
Initial_UART1(115200);
IIC_Init();

while?(1)
{
delay_ms(100);
IICreadBytes(0x50?AX?24&chrTemp[0]);
a[0]?=?(float)CharToShort(&chrTemp[0])/32768*16;
a[1]?=?(float)CharToShort(&chrTemp[2])/32768*16;
a[2]?=?(float)CharToShort(&chrTemp[4])/32768*16;
w[0]?=?(float)CharToShort(&chrTemp[6])/32768*2000;
w[1]?=?(float)CharToShort(&chrTemp[8])/32768*2000;
w[2]?=?(float)CharToShort(&chrTemp[10])/32768*2000;
h[0]?=?CharToShort(&chrTemp[12]);
h[1]?=?CharToShort(&chrTemp[14]);
h[2]?=?CharToShort(&chrTemp[16]);
Angle[0]?=?(float)CharToShort(&chrTemp[18])/32768*180;
Angle[1]?=?(float)CharToShort(&chrTemp[20])/32768*180;
Angle[2]?=?(float)CharToShort(&chrTemp[22])/32768*180;

sprintf((char*)str“0x50:??a:%.3f?%.3f?%.3f?w:%.3f?%.3f?%.3f??h:%.0f?%.0f?%.0f??Angle:%.3f?%.3f?%.3f?\r\n“a[0]a[1]a[2]w[0]w[1]w[2]h[0]h[1]h[2]Angle[0]Angle[1]Angle[2]);
UART1_Put_String(str);
USB_TxWrite(str?strlen((char*)str));


????}
}




?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????836??2014-11-26?23:17??STM32\STM32\STM32Core?IIC讀取一個模塊\DOC\Note.h

?????文件?????109540??2015-12-22?14:07??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\JlinkLog.txt

?????文件????????671??2015-12-22?12:51??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\JlinkSettings.ini

?????文件?????185335??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\List\Project.map

?????文件??????55912??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\List\startup_stm32f10x_hd.lst

?????文件?????236329??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\delay.crf

?????文件????????659??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\delay.d

?????文件?????261660??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\delay.o

?????文件?????286980??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\hw_config.crf

?????文件???????1812??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\hw_config.d

?????文件?????334764??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\hw_config.o

?????文件?????254088??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\ioi2c.crf

?????文件????????768??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\ioi2c.d

?????文件?????287940??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\ioi2c.o

?????文件?????274887??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\main.crf

?????文件???????1393??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\main.d

?????文件?????302500??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\main.o

?????文件?????235781??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\misc.crf

?????文件????????619??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\misc.d

?????文件?????259240??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\misc.o

?????文件?????433460??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project.axf

?????文件???????3589??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project.build_log.htm

?????文件??????45440??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project.hex

?????文件??????87293??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project.htm

?????文件???????1148??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project.lnp

?????文件????????479??2016-01-31?14:25??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project.sct

?????文件??????62898??2017-09-20?16:57??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\Project_Project.dep

?????文件??????16426??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\queue.crf

?????文件????????245??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\queue.d

?????文件??????35124??2017-09-20?16:56??STM32\STM32\STM32Core?IIC讀取一個模塊\MDK\Obj\queue.o

............此處省略777個文件信息

評論

共有 條評論