- 博客(112)
- 收藏
- 关注
原创 UWB Preamble
Each preamble code is a sequence of pulses representing -1, 0, and +1. The preamble code is spread toconstruct a preamble symbol, and this preamble symbol is then repeated to constitute the SYNC field portionof the SHR as shown in the example in Figure 2
2023-01-05 12:51:22
429
原创 三极管进入饱和区
As VIN increases, the base current increases and therefore so does the collector current. Eventually, the collector resistor RC will drop so much voltage that the BC junction will begin to enter the forward-bias region.When both the BE junction and the BC
2023-01-05 11:32:29
330
原创 Dart可变参数,命名参数
void main() { for (int i = 0; i < 5; i++) { print('hello ${i + 1}'); } show_info("Tom"); show_info("Lucy", 20); show_info2("Cat"); show_info2("Mouse", age:10, sex:'femail');}void show_info(String name, [int? age]) { if (age != null.
2022-05-28 15:45:08
509
原创 Python画轨迹图
import cmathimport reimport numpy as npimport matplotlib.pyplot as pltimport pandas as pdimport mathfrom matplotlib.animation import FuncAnimationdistance = 0azimuth = 0x_axis = []y_axis = []aoa_loc_data = []index = 0def create_csv(file_.
2022-04-29 13:32:52
5617
转载 Arduino Esp32环境搭建(手动下载相关文件)
这段时间想着arduino上面有很多例子和模块,编程很方便,自带编译器,操作方便。于是想用这个东西编译一下esp32,但是在配置环境时候各种碰壁,各种下载,最终也没有安装上,好像网上的教程都是在国外写的一样,github东西随便下,也不见有人讲一下下载失败怎么办,也没有国内镜像的教程,最终我通过自己的方式,不用网上的教程,只是用国内能用的软件和能访问的软件配置到了环境,在这里记录一下,也写下来给那些需要的人。我的版本是在esp32 1.0.6版本的时候做的,如果后期版本升级这个方法同样适用。首先,.
2022-04-12 11:05:56
2479
转载 C++正则表达式 2
C++正则表达式若要判断一个输入的QQ号是否有效,你会如何处呢?首先你得分析一下其对应规则,依次列出:长度大于5,小于等于11; 首位不能为0; 是否为纯数字?规则既列,接着就该尝试实现了,那么用什么来表示字符串呢?在C++中,最容易想到的就是string了,其中提供了许多成员函数可以处理字符串,所以有了如下实现:std::string qq;std::cin >> qq;// 1. 判断位数是否合法if (qq.length() >= 5 &&a.
2022-04-03 15:49:34
736
转载 C++正则表达式
C++正则表达式正则表达式在文本的查找和替换方面十分强大,最近恰巧用到,记录如下。使用的语言是C++,需要包含regex头文件,下面的代码是对linux系统路径的判别,我们假定路径都是下面这样的:./abcd ../abcd /abcd/efg#include <stdio.h>#include <string>#include <regex>#include <exception>#include <iostream&g
2022-04-03 15:38:26
1369
原创 matplotlib subplot
import matplotlib.pyplot as pltimport numpy as npx = np.array([0, 1, 2, 3])y = np.array([3, 8, 1, 10])#plt.subplot(2,3, 1)plt.subplot(231)plt.plot(x,y)x = np.array([0, 1, 2, 3])y = np.array([10, 20, 30, 40])#plt.subplot(2,3,2)plt.subplot(232.
2022-04-01 14:57:00
1017
原创 PyQT5使用Qt Creator创建ui
1、使用Qt Creator创建ui文件2、将ui文件转换为py文件pyuic5 -o mainwindow.py mainwindow.ui3、引用刚才生成的py文件import sysfrom PyQt5.QtWidgets import QApplication, QMainWindowfrom mainwindow import *class MyWindow(QMainWindow, Ui_MainWindow): def __init__(self, pare
2022-03-20 14:31:07
1240
原创 Pyhton中bytearray与string相互转换
#按string来显示,byarray代表接收到的数据readstr = byarray.decode('utf-8')#这样就直接转换成str格式 #强制转换readstr = str(byarray)#用这种方式得到的数据会带有b''字符 #将读取的数据按十六进制字符显示,能让我们直接看到最底层的数据格式readstr = ' '.join(hex(x) for x in byarray)#这句能把byarray里的数据遍历一遍转换成hex格式,而且用空格相连...
2022-03-18 14:42:51
3090
原创 在Python中打印函数名和行号
def gid_uci_core_group_handler(oid, payload_len, payload): print(sys._getframe().f_code.co_name) print(sys._getframe().f_lineno) pass
2022-03-17 23:52:08
2526
原创 Python16进制数组处理
hex_string = "11 22 33 44"hex_data = bytearray.fromhex(hex_string)print(hex_data)print(len(hex_data))def print_hex(bytes): l = [hex(int(i)) for i in bytes] print(" ".join(l))print_hex(hex_data)def print_bytes_hex(data): l = ['%02X' % .
2022-03-17 16:53:43
1901
原创 PyQt QSS实例
from PyQt5.QtWidgets import *import sysclass WindowDemo(QWidget): def __init__(self): super().__init__() btn1 = QPushButton(self) btn1.setText('按钮1') btn2 = QPushButton(self) btn2.setProperty('name', 'myBt.
2022-03-17 14:12:28
304
原创 PyQT信号与槽
import sysfrom PyQt5.QtCore import Qtfrom PyQt5.QtWidgets import (QWidget, QLCDNumber, QSlider,QGridLayout,QLabel,QHBoxLayout, QGroupBox, QVBoxLayout, QApplication,QProgressBar,QPushButton,QMessageBox) class SignalSlot(QWidget): def __init.
2022-03-17 13:27:59
288
原创 PyQt5打包
打包后的程序显示dos console窗口 pyinstaller -F run.py打包后的程序隐藏dos console窗口pyinstaller -Fw run.py
2022-03-16 22:23:36
430
原创 PyQT
from PyQt5.Qt import *import sysclass Window(QWidget): def __init__(self): super().__init__() self.setWindowTitle("QLineEdit..") self.resize(500, 400) self.setup_ui() def setup_ui(self): ql_a = QLineEdit(.
2022-03-14 00:04:14
1145
原创 学习UWB必须弄清楚的地方
1、UWB貌似支持跳频,那它的跳频逻辑是怎样的?2、一个Anchor如何associate多个Tags?3、在Anchor和Tag能够通信前,需要协商的内容有哪些?Channel, Preamble长度,数据速率,SFD,PHR, STS, TRX interval, TRX windwow etc.4、关联成功后,Anchor和Tag之间数据通信方式是怎样的,BLE中是Master发起数据交互,UWB呢?5、一个Anchor对应多个Tags,如何避免相互之间的干扰?如果多个Tags同时
2022-03-05 22:12:09
637
原创 UWB学习 4
AHB(Advanced High-performance Bus), 高速总线,用来接高速外设的。APB (Advanced Peripheral Bus) 低速总线,用来接低速外设的。
2022-03-04 10:14:38
410
原创 Sensor data real time plotting using matlibplot
import matplotlib.pyplot as pltimport numpy as npimport serialfrom matplotlib.animation import FuncAnimationimport reimport datetime as dttry: ser = serial.Serial("COM5", 921600, timeout=0.01) print("Open serial port")except: print("Fai.
2022-03-01 09:43:31
141
原创 gd25wq40e driver
#include "mk_trace.h"#include "spi_flash.h"static gd25wqxxx_base_t gd25wqxxx_base;static gd25wqxxx_base_t *base = &gd25wqxxx_base;static uint8_t gd25wqxxx_wait_busy(){ //read status reg return 0;}static void gd25wqxxx_write_enable(void){.
2022-02-25 10:27:24
413
原创 Read MMC5633 Product ID
/* * Copyright (c) 2019-2021 Mauna Kea Semiconductor Holdings. * All rights reserved. * */#include "mk_i2c.h"#include "mk_trace.h"#include "mk_wdt.h"#include "mk_gpio.h"#include "board.h"#include "pin_mux.h"#include "clock_config.h"/*MMC563.
2022-02-23 19:20:27
323
原创 Multisim: Inverting Amplifier Simulation
关键:利用虚短,虚断从图中我能能看到,输出波形与输入波形相位差180度
2022-02-20 21:29:09
361
转载 UWB – old technology discovered again
Since the first discovery of the Ultra-wideband technology (in short: UWB) it was continuously researched and even used in several specific areas. However, it took about one century for companies to start using it in a commercial products which are accessi
2022-02-19 11:27:56
276
转载 UWB 原理介绍(英文)
Assessing the Advantages of Ultra-wideband Systems Through Impulse RadiosUsing impulse radios as an example, we'll examine the advantages of ultra-wideband (UWB) technology compared to other short-range wireless communication technologies.Ultra-wideban
2022-02-19 11:13:32
687
原创 利用Python画直方图
1 # 2 # 本文以某一批产品的长度为数据集 3 # 在此数据集的基础上绘制直方图和正态分布曲线 4 # 5 6 import pandas as pd # pandas是一个强大的分析结构化数据的工具集 7 import numpy as np # numpy是Python中科学计算的核心库 8 import matplotlib.pyplot as plt # matplotlib数据可视化神器 9 10 # 正态分布的概率密度函数11 # x 数据集中...
2022-02-17 15:24:54
25299
原创 matplotlib polar极坐标
import matplotlib.pyplot as pltimport numpy as npbarSlices = 8theta = np.linspace(0.0, 2*np.pi, barSlices, endpoint=False)#弧度r = [5,5,5,5,5,5,5,5]#半径print(theta)plt.polar(theta, r, linestyle='None', marker='*')plt.show()
2022-02-16 17:27:18
961
原创 UWB测距原理
DWM1000 测距原理简单分析 之 SS-TWR - tuzhuke - 博客园Decawave UWB TWR 测距原理及误差分析 - 知乎
2022-02-15 16:12:23
362
原创 git ssh 登陆失败: no matching host key type found. Their offer: ssh-dss 解决办法
用记事本打开~/.ssh/目录下的config文件。增加以下配置。Host * KexAlgorithms +diffie-hellman-group1-sha1 HostkeyAlgorithms +ssh-dss,ssh-rsa PubkeyAcceptedKeyTypes +ssh-dss,ssh-rsa具体原因可参考如下链接:UsingOpenSSHwith legacy SSH implementations:http://www.openssh.com/l..
2022-02-14 14:26:04
2329
原创 C++ 输入输出流重载实例
#include <iostream>using namespace std;class rectangle { public: int length, width; rectangle(int l, int w) { length = l; width = w; } friend istream &operator>>(istream &.
2022-02-09 10:14:44
411
原创 C++ namespace
#include <iostream>using namespace std;namespace first_space { void func() { cout << "Inside first_space" << endl; }}namespace second_space { void func() { cout << "Inside second_space" << e.
2022-02-07 16:46:20
427
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人