handlerqq部落24-2

qq部落24-2  时间:2021-01-25  阅读:()
IntroductionTheX-CUBE-MEMS1softwarepackageallowsyoutobuildapplicationsbasedonsensordatafromSTM32NucleodevelopmentplatformsmountingacompatibleX-NUCLEOexpansionboardwithseveralhighperformanceSTmotionMEMSandenvironmentalsensors.
Youcan,however,substituteindividualsensorsontheX-NUCLEOexpansionboardwithsinglesensorboardswithcompatiblepinsforthestandardDIL24socket.
HowtouseasensoronaDIL24socketinX-CUBE-MEMS1packageapplicationsAN5353ApplicationnoteAN5353-Rev1-June2019ForfurtherinformationcontactyourlocalSTMicroelectronicssalesoffice.
www.
st.
com1Stepbystepproceduretoreplaceanon-boardsensorwithaDIL24sensorInthisexample,wereplacetheLSM6DSLsensorontheX-NUCLEO-IKS01A2expansionboardwiththeLSM6DSOsensorconnectedtoaboardwithaDIL24socket.
WehavechosentheDataLogFusionapplication(usingMotionFXsensorfusionalgorithm)runningontheNUCLEO-L476RGdevelopmentboard.
Withminormodifications,youcanfollowthesameprocedureforothersensors,expansionboardsandSTM32Nucleoboardplatformsaswell.
Step1.
Addthesensorintheboardconfigurationheaderfile.
Intheinc/iks01a2_conf.
hfile,disabletheuseoftheLSM6DSLsensorbyinserting"0U"ashighlightedbelowinbold,andenabletheLSM6DSOsensorbyaddingthedefinestatementalsoshownbelowinbold.
#defineUSE_IKS01A2_ENV_SENSOR_HTS221_01U#defineUSE_IKS01A2_ENV_SENSOR_LPS22HB_01U#defineUSE_IKS01A2_MOTION_SENSOR_LSM6DSL_00U#defineUSE_IKS01A2_MOTION_SENSOR_LSM303AGR_ACC_01U#defineUSE_IKS01A2_MOTION_SENSOR_LSM303AGR_MAG_01U#defineUSE_IKS01A2_MOTION_SENSOR_LSM6DSO_01UStep2.
AddthesensordriversinaprojectforaspecificIDE(forexample,SW4STM32)andincludethepathtothesensordriversintotheprojectsettings.
Figure1.
AddLSM6DSOsensordriversinaprojectfortheSW4STM32IDEAN5353Stepbystepproceduretoreplaceanon-boardsensorwithaDIL24sensorAN5353-Rev1page2/10Figure2.
AddLSM6DSOsensorincludingpathtoaprojectfortheSW4STM32IDEStep3.
SubstitutethesensorontheX-NUCLEOexpansionboardwiththesinglesensorontheDIL24socketboardintheX-CUBE-MEMS1application.
Step3a.
SubstitutetheLSM6DSLsensorhandlerwiththeLSM6DSOsensorhandlerinthesrc/main.
cfile,main()function(inboldbelow).
/*AcquiredatafromenabledsensorsandfillMsgstream*/RTC_Handler(&msg_dat);Accelero_Sensor_Handler(&msg_dat,IKS01A2_LSM6DSO_0);Gyro_Sensor_Handler(&msg_dat,IKS01A2_LSM6DSO_0);Magneto_Sensor_Handler(&msg_dat,IKS01A2_LSM303AGR_MAG_0);Humidity_Sensor_Handler(&msg_dat,IKS01A2_HTS221_0);Temperature_Sensor_Handler(&msg_dat,IKS01A2_HTS221_0);Pressure_Sensor_Handler(&msg_dat,IKS01A2_LPS22HB_0);Step3b.
SubstitutetheLSM6DSLsensorinitializationwithLSM6DSOinitializationinthesrc/main.
cfile,Init_Sensors()function(inboldbelow).
/***@briefInitializeallsensors*@paramNone*@retvalNone*/staticvoidInit_Sensors(void){(void)IKS01A2_MOTION_SENSOR_Init(IKS01A2_LSM6DSO_0,MOTION_ACCELERO|MOTION_GYRO);(void)IKS01A2_MOTION_SENSOR_Init(IKS01A2_LSM303AGR_MAG_0,MOTION_MAGNETO);(void)IKS01A2_ENV_SENSOR_Init(IKS01A2_HTS221_0,ENV_TEMPERATURE|ENV_HUMIDITY);(void)IKS01A2_ENV_SENSOR_Init(IKS01A2_LPS22HB_0,ENV_PRESSURE);}AN5353Stepbystepproceduretoreplaceanon-boardsensorwithaDIL24sensorAN5353-Rev1page3/10Step3c.
AddtheLSM6DSOsensorUnicleoIDfromthetablebelowtothesrc/DemoSerial.
cfile(inboldbelowthetable).
Table1.
Unicleo-GUIsupportedsensorsandIDsAccelerometer/gyroscopeMagnetometerPressure/temperatureHumidity/temperatureNameIDNameIDNameIDNameIDLSM6DS01LIS3MDL1LPS25HB1HTS2211LSM6DS32LSM303AGR_MAG2LPS22HB3STTS7512LSM6DSL3LIS2MDL3LPS22HH4LIS2DH124H3LIS331DL5LSM303AGR6LSM6DSO7LIS2DW128LSM6DSR9LSM6DSOX10#defineLPS25HB_UNICLEO_ID_ONBOARD1#defineLPS25HB_UNICLEO_ID_DIL2#defineLPS22HB_UNICLEO_ID3#defineHTS221_UNICLEO_ID1#defineLSM6DS0_UNICLEO_ID1#defineLSM6DS3_UNICLEO_ID2#defineLSM6DSL_UNICLEO_ID3#defineLSM6DSO_UNICLEO_ID7#defineLIS3MDL_UNICLEO_ID1#defineLSM303AGR_UNICLEO_ID_MAG2Step3d.
SubstituteLSM6DSLsensordisablewithLSM6DSOdisableinthesrc/DemoSerial.
cfile,HandleMSG()function,CMD_ACCELERO_GYRO_Initcase(inboldbelow).
Serialize_s32(&Msg->Data[3],LSM6DSO_UNICLEO_ID,4);Step3e.
SubstituteLSM6DSLsensorenablewithLSM6DSOenableinthesrc/DemoSerial.
cfile,HandleMSG()function,CMD_Start_Data_Streamingcase(inboldbelow).
if((SensorsEnabled&ACCELEROMETER_SENSOR)==ACCELEROMETER_SENSOR){(void)IKS01A2_MOTION_SENSOR_Enable(IKS01A2_LSM6DSO_0,MOTION_ACCELERO);}if((SensorsEnabled&GYROSCOPE_SENSOR)==GYROSCOPE_SENSOR){(void)IKS01A2_MOTION_SENSOR_Enable(IKS01A2_LSM6DSO_0,MOTION_GYRO);}Step3f.
SubstituteLSM6DSLsensordisablewithLSM6DSOdisableinthesrc/DemoSerial.
cfile,HandleMSG()function,CMD_Stop_Data_Streamingcase(inboldbelow).
(void)IKS01A2_MOTION_SENSOR_Disable(IKS01A2_LSM6DSO_0,MOTION_ACCELERO);(void)IKS01A2_MOTION_SENSOR_Disable(IKS01A2_LSM6DSO_0,MOTION_GYRO);Step4.
Changesensororientation(optional).
AN5353Stepbystepproceduretoreplaceanon-boardsensorwithaDIL24sensorAN5353-Rev1page4/10IntheMotionFX_Manager.
cfileMotionFX_manager_init()function,checkaccelerometer,gyroscopeandmagnetometersensororientationsetupwithrealDIL24sensororientationandupdateifnecessary.
Inourcase,weneedtocheckaccelerometerandgyroscopesensororientationsetupwithLSM6DSO(DIL24module)orientation(inboldbelow).
/***@briefInitialisesMotionFXalgorithm*@paramNone*@retvalNone*/voidMotionFX_manager_init(void){characc_orientation[4];chargyro_orientation[4];charmag_orientation[4];acc_orientation[0]='n';acc_orientation[1]='w';acc_orientation[2]='u';gyro_orientation[0]='n';gyro_orientation[1]='w';gyro_orientation[2]='u';mag_orientation[0]='n';mag_orientation[1]='e';mag_orientation[2]='u';Note:Inthisexample,nochangeisneededastheLSM6DSLsensorontheX-NUCLEOexpansionboardandtheLSM6DSOsensorontheDIL24modulehavethesameorientation.
Step5.
BuildtheapplicationandruntheUnicleo-GUISWtocheckiftheLSM6DSOsensorisactiveandtheMotionSensorFusionalgorithmisworkingproperly.
Figure3.
RunningDataLogFusionapplicationwithLSM6DSOsensor(DIL24module)inUnicleo-GUISWRELATEDLINKSSTEVAL-MKI196V1evaluationboardLSM6DSOdatasheetfreelyavailableatwww.
st.
comAN5353Stepbystepproceduretoreplaceanon-boardsensorwithaDIL24sensorAN5353-Rev1page5/10LSM6DSOapplicationnote:AN5192,"LSM6DSO:always-on3Daccelerometerand3Dgyroscope",freelyavailableatwww.
st.
comRevisionhistoryTable2.
DocumentrevisionhistoryDateRevisionChanges11-Jun-20191InitialreleaseAN5353AN5353-Rev1page6/10Contents1Stepbystepproceduretoreplaceanon-boardsensorwithaDIL24sensor.
2Revisionhistory6AN5353ContentsAN5353-Rev1page7/10ListoffiguresFigure1.
AddLSM6DSOsensordriversinaprojectfortheSW4STM32IDE2Figure2.
AddLSM6DSOsensorincludingpathtoaprojectfortheSW4STM32IDE3Figure3.
RunningDataLogFusionapplicationwithLSM6DSOsensor(DIL24module)inUnicleo-GUISW5AN5353ListoffiguresAN5353-Rev1page8/10ListoftablesTable1.
Unicleo-GUIsupportedsensorsandIDs4Table2.
Documentrevisionhistory6AN5353ListoftablesAN5353-Rev1page9/10IMPORTANTNOTICE–PLEASEREADCAREFULLYSTMicroelectronicsNVanditssubsidiaries("ST")reservetherighttomakechanges,corrections,enhancements,modifications,andimprovementstoSTproductsand/ortothisdocumentatanytimewithoutnotice.
PurchasersshouldobtainthelatestrelevantinformationonSTproductsbeforeplacingorders.
STproductsaresoldpursuanttoST'stermsandconditionsofsaleinplaceatthetimeoforderacknowledgement.
Purchasersaresolelyresponsibleforthechoice,selection,anduseofSTproductsandSTassumesnoliabilityforapplicationassistanceorthedesignofPurchasers'products.
Nolicense,expressorimplied,toanyintellectualpropertyrightisgrantedbySTherein.
ResaleofSTproductswithprovisionsdifferentfromtheinformationsetforthhereinshallvoidanywarrantygrantedbySTforsuchproduct.
STandtheSTlogoaretrademarksofST.
ForadditionalinformationaboutSTtrademarks,pleaserefertowww.
st.
com/trademarks.
Allotherproductorservicenamesarethepropertyoftheirrespectiveowners.
Informationinthisdocumentsupersedesandreplacesinformationpreviouslysuppliedinanypriorversionsofthisdocument.
2019STMicroelectronics–AllrightsreservedAN5353AN5353-Rev1page10/10

数脉科技香港物理机 E3 16G 10M 华为线路165元 阿里云线路 188元 Cera线路 157元

2021年9月中秋特惠优惠促销来源:数脉科技 编辑:数脉科技编辑部 发布时间:2021-09-11 03:31尊敬的新老客户:9月优惠促销信息如下,10Mbps、 30Mbps、 50Mbps、100Mbps香港优质或BGPN2、阿里云线路、华为云线路,满足多种项目需求!支持测试。全部线路首月五折起。数脉官网 https://my.shuhost.com/香港特价数脉阿里云华为云 10MbpsCN...

HostSlim,双E5-2620v2/4x 1TB SATA大硬盘,荷兰服务器60美元月

hostslim美国独立日活动正在进行中,针对一款大硬盘荷兰专用服务器:双E5-2620v2/4x 1TB SATA硬盘,活动价60美元月。HostSlim荷兰服务器允许大人内容,不过只支持电汇、信用卡和比特币付款,商家支持7天内退款保证,有需要欧洲服务器的可以入手试试,记得注册的时候选择中国,这样不用交20%的税。hostslim怎么样?HostSlim是一家成立于2008年的荷兰托管服务器商,...

HostYun(25元)俄罗斯CN2广播IP地址

从介绍看啊,新增的HostYun 俄罗斯机房采用的是双向CN2线路,其他的像香港和日本机房,均为国内直连线路,访问质量不错。HostYun商家通用九折优惠码:HostYun内存CPUSSD流量带宽价格(原价)购买地址1G1核10G300G/月200M28元/月购买链接1G1核10G500G/月200M38元/月购买链接1G1核20G900G/月200M68元/月购买链接2G1核30G1500G/月...

qq部落24-2为你推荐
海贼王644海贼王600到655名称涡轮增压和自然吸气哪个好自然吸气与涡轮增压发动机哪个更好浏览器哪个好用哪款浏览器好用三国游戏哪个好玩三国类单机游戏哪个最好玩啊?海克斯皮肤哪个好LOL用100块是抽海克斯好还是抽蛮王的生化领主的活动还是直接买皮肤好雅思和托福哪个好考考托福好还是雅思好云盘哪个好免费的网盘哪个好?更大、更安全、更实用?辽宁联通营业厅辽宁移动网上营业厅进入办法willyunlee电影拳皇演的是什么意思360云盘怎么用360云盘如何使用?
jsp虚拟主机 个人域名注册 vps服务器租用 广东vps 主机 Vultr 国外idc 优惠码 css样式大全 qq数据库 河南服务器 权嘉云 howfile 秒杀汇 vip购优惠 华为云盘 wordpress中文主题 中国联通宽带测速 域名转入 googlevoice 更多