当前位置:网站首页>[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
边栏推荐
- 记一次COOKIE的伪造登录
- The strongest distributed locking tool: redisson
- 30天刷题计划(二)
- R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置draw_quantiles参数添加指定分位数横线(例如,50%分位数、中位数)
- 【架构】评分较高的三本微服务书籍的阅读笔记
- Li Kou sword finger offer 51. reverse order pairs in the array
- 记一次使用pdfbox解析pdf,获取pdf的关键数据的工具使用
- Vite configuring path aliases in the project
- Socket class understanding and learning about TCP character stream programming
- 面经整理,助力秋招,祝你称为offer收割机
猜你喜欢

Socket类关于TCP字符流编程的理解学习

Children's programming electronic society graphical programming level examination scratch Level 2 real problem analysis (judgment question) June 2022

DDoS protection with iptables

产品经理:岗位职责表

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

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

30天刷题计划(三)

How to play a data mining game entry Edition

30 day question brushing training (I)

Excellent performance! Oxford, Shanghai, AI Lab, Hong Kong University, Shangtang, and Tsinghua have joined forces to propose a language aware visual transformer for reference image segmentation! Open
随机推荐
Rolling update strategy of deployment.
DOJP1520星门跳跃题解
Poj3275 ranking the cows
Dojnoip201708 cheese solution
Socket class understanding and learning about TCP character stream programming
掌握常见的几种排序-选择排序
DXF读写:对齐尺寸标注文字居中、上方的位置计算
SAP UI5 FileUploader 控件实现本地文件上传,接收服务器端的响应时遇到跨域访问错误的试读版
数据库系统原理与应用教程(062)—— MySQL 练习题:操作题 32-38(六)
了解BFC特性,轻松实现自适应布局
Record a fake login of cookie
C language: random number + quick sort
leetcode-深度优先与广度优先遍历
C language: optimized merge sort
Better and more modern terminal tools than xshell!
Leetcode depth first and breadth first traversal
正则表达式
PHP generates random numbers (nickname random generator)
JWT 登录认证 + Token 自动续期方案,写得太好了!
R language uses LM function to build linear regression model and subset function to specify subset of data set to build regression model (use floor function and length function to select the former pa