当前位置:网站首页>[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
边栏推荐
- a标签_文件下载(download属性)
- DOJP1520星门跳跃题解
- 关于栈的理解以及实际应用场景
- SAP ui5 fileuploader control realizes local file upload, and trial version of cross domain access error encountered when receiving server-side response
- 面经整理,助力秋招,祝你称为offer收割机
- Holes in [apue] files
- Leetcode depth first and breadth first traversal
- 【飞控开发基础教程7】疯壳·开源编队无人机-SPI(气压计数据获取)
- 安全保障基于软件全生命周期-Istio的认证机制
- SQL daily practice (Niuke new question bank) - day 4: advanced operators
猜你喜欢

30 day question brushing plan (IV)
JWT login authentication + token automatic renewal scheme, well written!

Denial of service DDoS Attacks

30天刷题训练(一)

strcmp、strstr、memcpy、memmove的实现

Record a fake login of cookie

7. Dependency injection

安全保障基于软件全生命周期-PSP应用

Operator3 - design an operator

【LVGL事件(Events)】事件在不同组件上的应用(一)
随机推荐
leetcode-深度优先与广度优先遍历
正则表达式
Operator3-设计一个operator
POJ3268最短路径题解
C language: random generated number + merge sort
R语言检验样本比例:使用prop.test函数执行单样本比例检验计算总体中成功样本比例p值的置信区间(设置conf.level参数指定置信水平、置信区间的大小)
掌握闭包,夯实基本功
Socket类关于TCP字符流编程的理解学习
R language uses LM function to build multiple linear regression model, writes regression equation according to model coefficient, and uses conflict function to give 95% confidence interval of regressi
算法---不同路径(Kotlin)
PHP generates random numbers (nickname random generator)
多线程与高并发(三)—— 源码解析 AQS 原理
JWT login authentication + token automatic renewal scheme, well written!
The strongest distributed locking tool: redisson
url相关知识点
C language: quick sorting of sequential storage structure
Analyzing the principle of DNS resolution in kubernetes cluster
面经整理,助力秋招,祝你称为offer收割机
在 Kubernetes 中部署应用交付服务(第 1 部分)
DDoS protection with iptables