当前位置:网站首页>[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
边栏推荐
- R language Visual scatter diagram, geom using ggrep package_ text_ The repl function avoids overlapping labels between data points (add labels to specific areas of the visual image using the parameter
- 30天刷题计划(二)
- 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
- 第六章 支持向量机
- Is azvudine, a domestic oral new coronal drug, safe? Expert authority interpretation
- strcmp、strstr、memcpy、memmove的实现
- 【LVGL事件(Events)】事件在不同组件上的应用(一)
- 正则表达式
- Dojnoip201708 cheese solution
- Customized template in wechat applet
猜你喜欢

Use non recursive method to realize layer traversal, preorder traversal, middle order traversal and post order traversal in binary tree

不用Swagger,那我用啥?

DXF读写:对齐尺寸标注文字居中、上方的位置计算

The strongest distributed locking tool: redisson

Customized template in wechat applet

30天刷题计划(三)

最强分布式锁工具:Redisson

30天刷题训练(一)

Chapter 6 support vector machine

Operator3 - design an operator
随机推荐
How to play a data mining game entry Edition
Socket类关于TCP字符流编程的理解学习
浅谈WebSocket
C language: quick sorting of sequential storage structure
a标签_文件下载(download属性)
在 Kubernetes 中部署应用交付服务(第 1 部分)
算法---不同路径(Kotlin)
TS扫盲大法-基础篇
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
What if the server cannot be connected (the original server cannot find the target resource)
数据库系统原理与应用教程(062)—— MySQL 练习题:操作题 32-38(六)
Facial expression recognition based on pytorch convolution - graduation project "suggestions collection"
R语言使用lm函数构建线性回归模型、使用subset函数指定对于数据集的子集构建回归模型(使用floor函数和length函数选择数据前部分构建回归模型)
Debezium series: major changes and new features of 2.0.0.beta1
Socket class understanding and learning about TCP character stream programming
Li Kou sword finger offer 51. reverse order pairs in the array
Better and more modern terminal tools than xshell!
[security] read rfc6749 and understand the authorization code mode under oauth2.0
A label_ File download (download attribute)
Merge table rows - three levels of for loop traversal data