当前位置:网站首页>[basic course of flight control development 7] crazy shell · open source formation UAV SPI (barometer data acquisition)
[basic course of flight control development 7] crazy shell · open source formation UAV SPI (barometer data acquisition)
2022-07-28 13:58:00 【efans_ Mike】
COCOFLY course
—— Crazy shell · Unmanned aerial vehicle (uav) · series
SPI( Barometer data acquisition )
chart 1
One 、SPL06 brief introduction
SPL06 It's Goethe's latest air pressure sensor , Newly launched new air pressure sensor SPL06-001, Goethe is the world's leading MEMS manufacturer ,SPL06 Take advantage of Goethe's accumulation over the years MEMS Development technology , By carrying high-precision detection MEMS(MicroElectroMechanicalSystems) That is, micro electromechanical systems and low-power integrated circuits , Achieve the highest level of accuracy in the industry ±5cm,SPL06 It is a miniaturized digital air pressure sensor with high precision and low current consumption , It has two characteristics of pressure and temperature measurement . The pressure sensor element is based on the principle of capacitance sensor , Ensure high-precision measurement in the process of temperature change . Small package structure is suitable for mobile applications and wearable devices .SPL06 The internal signal processor converts the output of pressure and temperature sensor elements into 24 Bit data . Each pressure sensor has been calibrated separately and contains a calibration factor . In the application, the coefficient is used to convert the measured results into real pressure and temperature values .
SPL06 The physical drawing of is shown below .
chart 2
Two 、 Barometer data acquisition experiment
Barometer data acquisition experiment use STM32 The hardware SPI And barometer SPL06 Connect , A serial port 1 namely UART1, adopt USB Connect the serial port module to the computer , hold SPI Acquired SPL06 The original pressure value and the original temperature value data are transmitted through the serial port 1 The serial port debugging assistant transmitted to the computer is displayed . When doing this experiment, you need to temporarily remove the visual module , And the USB The line to serial port is connected to the interface of the visual module . barometer SPL06 White on top of the drone RGB In the lantern box , Through the soft row handle SPI And power supply outlet , As shown in the figure below .
chart 3
According to the schematic diagram , You can see SPL06 Of course SPI The interfaces are :PB15、PA5、PA6、PA7, As shown in the figure below .
chart 4
A serial port 1 The configuration of can refer to 《 A serial port ( Basic transceiver ), Configuration code ( By calling the official library ). obtain SPL06 The idea of data code writing is as follows :
surface 1
SPI The initialization code is as follows :

chart 5
SPI The reading and writing code of is as follows .
chart 6
SPL06 The initialization code of is as follows .
chart 7
SPL06 The reading and writing code of is as follows .
chart 8
Check the manual and find the pressure 、 Temperature 24 Bit original value at address 0x00~0x05 On .
chart 9
Read the register data , And send it to the serial port . The code is as follows .
chart 10
Pay attention to configuring the serial port for sending , In this way, the data can be sent to the computer . A serial port 1 adopt USB Connect the serial port module to the computer , preservation 、 compile 、 Download code , You can see USB The serial port module is constantly printing SPL06 Of 3 Bytes of raw pressure value data and 3 Bytes of raw temperature data , The data is shown in the figure below :
chart 11
More complete learning materials and corresponding open source Suites , Please visit the official website :“ Crazy shell ”
For customized development , Please use the official website “ Crazy shell ” At the bottom of the page “ Contact us ” Make contact
边栏推荐
- SQL daily practice (Niuke new question bank) - day 4: advanced operators
- R语言因子数据的表格和列联表(交叉表)生成:使用summay函数分析列表查看卡方检验结果判断两个因子变量是否独立(使用卡方检验验证独立性)
- Analyzing the principle of DNS resolution in kubernetes cluster
- 7. Dependency injection
- Uva1599 ideal path problem solution
- 30天刷题训练(一)
- Denial of service DDoS Attacks
- R language ggplot2 visualization: visualize the scatter diagram and add text labels to the data points in the scatter diagram, using geom of ggrep package_ text_ The rep function avoids overlapping da
- No swagger, what do I use?
- R language test sample proportion: use prop The test function performs the single sample proportion test to calculate the confidence interval of the p value of the successful sample proportion in the
猜你喜欢

30天刷题训练(一)

Socket class understanding and learning about TCP character stream programming

Qt5 development from introduction to mastery -- the first overview

Better and more modern terminal tools than xshell!

Customized template in wechat applet

Record a fake login of cookie

30 day question brushing plan (III)

第六章 支持向量机

产品经理:岗位职责表

不用Swagger,那我用啥?
随机推荐
30天刷题计划(三)
【安全】 阅读 RFC6749 及理解 Oauth2.0 下的授权码模式
性能超群!牛津&上海AI Lab&港大&商汤&清华强强联手,提出用于引用图像分割的语言感知视觉Transformer!代码已开源...
No swagger, what do I use?
Record a fake login of cookie
多线程与高并发(三)—— 源码解析 AQS 原理
Leetcode depth first and breadth first traversal
Poj1860 currency exchange solution
图的遍历(BFS&&DFS基础)
[security] read rfc6749 and understand the authorization code mode under oauth2.0
Merge table rows - three levels of for loop traversal data
Tutorial on the principle and application of database system (060) -- MySQL exercise: operation questions 11-20 (IV)
R语言使用lm函数构建多元回归模型(Multiple Linear Regression)、并根据模型系数写出回归方程、使用confint函数给出回归系数的95%置信区间
拒绝服务 DDoS 攻击
What is the reason why the words behind word disappear when typing? How to solve it?
不用Swagger,那我用啥?
30天刷题计划(二)
regular expression
C language: random number + quick sort
C language: optimized merge sort