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

妮妮云香港CTG云服务器1核 1G 3M19元/月

香港ctg云服务器香港ctg云服务器官网链接 点击进入妮妮云官网优惠活动 香港CTG云服务器地区CPU内存硬盘带宽IP价格购买地址香港1核1G20G3M5个19元/月点击购买香港2核2G30G5M10个40元/月点击购买香港2核2G40G5M20个450元/月点击购买香港4核4G50G6M30个80元/月点击购买香...

舍利云:海外云服务器,6核16G超大带宽vps;支持全球范围,原价516,折后价200元/月!

舍利云怎么样?舍利云推出了6核16G超大带宽316G高性能SSD和CPU,支持全球范围,原价516,折后价200元一月。原价80美元,现价30美元,支持地区:日本,新加坡,荷兰,法国,英国,澳大利亚,加拿大,韩国,美国纽约,美国硅谷,美国洛杉矶,美国亚特兰大,美国迈阿密州,美国西雅图,美国芝加哥,美国达拉斯。舍利云是vps云服务器的销售商家,其产品主要的特色是适合seo和建站,性价比方面非常不错,...

柚子互联(34元),湖北十堰高防, 香港 1核1G 5M

柚子互联官网商家介绍柚子互联(www.19vps.cn)本次给大家带来了盛夏促销活动,本次推出的活动是湖北十堰高防产品,这次老板也人狠话不多丢了一个6.5折优惠券而且还是续费同价,稳撸。喜欢的朋友可以看看下面的活动详情介绍,自从站长这么久以来柚子互联从19年开始算是老商家了。六五折优惠码:6kfUGl07活动截止时间:2021年9月30日客服QQ:207781983本次仅推荐部分套餐,更多套餐可进...

qq部落24-2为你推荐
江门旅游景点哪个好玩的地方江门蓬江区有什么地方好玩?江门旅游景点哪个好玩的地方江门有那个地方好玩呢绝地求生加速器哪个好现在绝地求生哪个加速器好点?无纺布和熔喷布口罩哪个好活性碳口罩和无纺布口罩有什么不同?杰士邦和杜蕾斯哪个好杜蕾斯好用还是杰士邦好要?手机管家哪个好手机管家 用什么最好?车险哪个好汽车保险买哪个公司的好qq空间登录不上qq空间登不进去 怎么办qq空间登录不了登陆不了QQ空间yy空间登录怎样进入YY主播的空间
过期域名查询 parseerror lamp配置 河南服务器 美国十次啦服务器 徐正曦 paypal注册教程 英雄联盟台服官网 论坛主机 登陆qq空间 winds alertpay easypanel 美国西雅图独立 电信测速器在线测网速 电脑显示屏不亮但是主机已开机 主机托管 tftp服务器是什么 网通ip地址 灵动鬼影实录1 更多