当前位置:网站首页>[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
边栏推荐
- POJ3259虫洞题解
- R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置draw_quantiles参数添加指定分位数横线(例如,50%分位数、中位数)
- Poj3268 shortest path solution
- DXF reading and writing: align the calculation of the position of the dimension text in the middle and above
- DOJNOIP201708奶酪题解
- 【架构】评分较高的三本微服务书籍的阅读笔记
- What is the reason why the words behind word disappear when typing? How to solve it?
- leetcode-深度优先与广度优先遍历
- DXF读写:对齐尺寸标注文字居中、上方的位置计算
- SQL daily practice (Niuke new question bank) - day 4: advanced operators
猜你喜欢

30天刷题计划(三)

word打字时后面的字会消失是什么原因?如何解决?

拒绝服务 DDoS 攻击

安全保障基于软件全生命周期-PSP应用
JWT login authentication + token automatic renewal scheme, well written!

对“Image Denoising Using an Improved Generative Adversarial Network with Wasserstein Distance“的理解

Product Manager: job responsibility table

《机器学习》(周志华) 第6章 支持向量 学习心得 笔记

7. Dependency injection

How to play a data mining game entry Edition
随机推荐
最强分布式锁工具:Redisson
使用 Fail2ban 保护 Web 服务器免受 DDoS 攻击
R语言因子数据的表格和列联表(交叉表)生成:使用summay函数分析列表查看卡方检验结果判断两个因子变量是否独立(使用卡方检验验证独立性)
Product Manager: job responsibility table
R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置draw_quantiles参数添加指定分位数横线(例如,50%分位数、中位数)
Poj3275 ranking the cows
R语言使用dpois函数生成泊松分布密度数据、使用plot函数可视化泊松分布密度数据(Poisson distribution)
Analyzing the principle of DNS resolution in kubernetes cluster
C language: optimized merge sort
记一次COOKIE的伪造登录
Lyscript get previous and next instructions
安全保障基于软件全生命周期-NetworkPolicy应用
算法---不同路径(Kotlin)
C language: random number + quick sort
a标签_文件下载(download属性)
Long closed period private placement products reappearance industry insiders have different views
Denial of service DDoS Attacks
国产API管理工具Eolink太好用了,打造高效的研发利器
POJ3268最短路径题解
拒绝服务 DDoS 攻击