【教程】Digispark实现串口通信
转载请注明出处:小锋学长生活大爆炸[xfxuezhagn.cn]
如果本文帮助到了你,欢迎[点赞、收藏、关注]哦~
没想到这么老,很多代码都不能用,修了好久。。。
TinySoftwareSerial.cpp
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>#include "Arduino.h"
#include "wiring_private.h"#if USE_SOFTWARE_SERIAL
#include "TinySoftwareSerial.h"extern "C"{
uint8_t getch() {uint8_t ch = 0;__asm__ __volatile__ (" rcall uartDelay\n" // Get to 0.25 of start bit (our baud is too fast, so give room to correct)"1: rcall uartDelay\n" // Wait 0.25 bit period" rcall uartDelay\n" // Wait 0.25 bit period" rcall uartDelay\n" // Wait 0.25 bit period" rcall uartDelay\n" // Wait 0.25 bit period" clc\n"" in r23,%[pin]\n"" and r23, %[mask]\n"" breq 2f\n"" sec\n""2: ror %0\n"" dec %[count]\n"" breq 3f\n"" rjmp 1b\n""3: rcall uartDelay\n" // Wait 0.25 bit period" rcall uartDelay\n" // Wait 0.25 bit period:"=r" (ch):"0" ((uint8_t)0),[count] "r" ((uint8_t)8),[pin] "I" (_SFR_IO_ADDR(ANALOG_COMP_PIN)),[mask] "r" (Serial._rxmask):"r23","r24","r25");return ch;
}void uartDelay() {__asm__ __volatile__ ("mov r25,%[count]\n""1:dec r25\n""brne 1b\n""ret\n"::[count] "r" ((uint8_t)Serial._delayCount));
}#if !defined (ANALOG_COMP_vect) && defined(ANA_COMP_vect)
//rename the vector so we can use it.#define ANALOG_COMP_vect ANA_COMP_vect
#elif !defined (ANALOG_COMP_vect)#error Tiny Software Serial cannot find the Analog comparator interrupt vector!
#endif
ISR(ANALOG_COMP_vect){char ch = getch(); //read in the character softwarily - I know its not a word, but it sounded cool, so you know what: #define softwarily 1store_char(ch, Serial._rx_buffer);sbi(ACSR,ACI); //clear the flag.
}}
soft_ring_buffer rx_buffer = { { 0 }, 0, 0 };// Constructor TinySoftwareSerial::TinySoftwareSerial(soft_ring_buffer *rx_buffer, uint8_t txBit, uint8_t rxBit)
{_rx_buffer = rx_buffer;_rxmask = _BV(rxBit);_txmask = _BV(txBit);_txunmask = ~_txmask;_delayCount = 0;
}// Public Methods //
void TinySoftwareSerial::setTxBit(uint8_t txbit)
{_txmask=_BV(txbit);_txunmask=~txbit;
}void TinySoftwareSerial::begin(long baud)
{long tempDelay = (((F_CPU/baud)-39)/12);if ((tempDelay > 255) || (tempDelay <= 0)){end(); //Cannot start as it would screw up uartDelay().}_delayCount = (uint8_t)tempDelay;cbi(ACSR,ACIE); //turn off the comparator interrupt to allow change of ACD
#ifdef ACBGsbi(ACSR,ACBG); //enable the internal bandgap reference - used instead of AIN0 to allow it to be used for TX.
#endifcbi(ACSR,ACD); //turn on the comparator for RX
#ifdef ACICcbi(ACSR,ACIC); //prevent the comparator from affecting timer1 - just to be safe.
#endifsbi(ACSR,ACIS1); //interrupt on rising edge (this means RX has gone from Mark state to Start bit state).sbi(ACSR,ACIS0);//Setup the pins in case someone messed with them.ANALOG_COMP_DDR &= ~_rxmask; //set RX to an inputANALOG_COMP_PORT |= _rxmask; //enable pullup on RX pin - to prevent accidental interrupt triggers.ANALOG_COMP_DDR |= _txmask; //set TX to an output.ANALOG_COMP_PORT |= _txmask; //set TX pin highsbi(ACSR,ACI); //clear the flag.sbi(ACSR,ACIE); //turn on the comparator interrupt to allow us to use it for RX
#ifdef ACSRBACSRB = 0; //Use AIN0 as +, AIN1 as -, no hysteresis - just like ones without this register.
#endif
}void TinySoftwareSerial::end()
{sbi(ACSR,ACI); //clear the flag.cbi(ACSR,ACIE); //turn off the comparator interrupt to allow change of ACD, and because it needs to be turned off now too!
#ifdef ACBGcbi(ACSR,ACBG); //disable the bandgap reference
#endifsbi(ACSR,ACD); //turn off the comparator to save power_delayCount = 0;_rx_buffer->head = _rx_buffer->tail;
}int TinySoftwareSerial::available(void)
{return (unsigned int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE;
}void store_char(unsigned char c, soft_ring_buffer *buffer)
{int i = (unsigned int)(buffer->head + 1) % SERIAL_BUFFER_SIZE;// if we should be storing the received character into the location// just before the tail (meaning that the head would advance to the// current location of the tail), we're about to overflow the buffer// and so we don't write the character or advance the head.if (i != buffer->tail) {buffer->buffer[buffer->head] = c;buffer->head = i;}
}int TinySoftwareSerial::peek(void)
{if (_rx_buffer->head == _rx_buffer->tail) {return -1;} else {return _rx_buffer->buffer[_rx_buffer->tail];}
}int TinySoftwareSerial::read(void)
{// if the head isn't ahead of the tail, we don't have any charactersif (_rx_buffer->head == _rx_buffer->tail) {return -1;} else {unsigned char c = _rx_buffer->buffer[_rx_buffer->tail];_rx_buffer->tail = (unsigned int)(_rx_buffer->tail + 1) % SERIAL_BUFFER_SIZE;return c;}
}size_t TinySoftwareSerial::write(uint8_t ch)
{uint8_t oldSREG = SREG;cli(); //Prevent interrupts from breaking the transmission. Note: TinySoftwareSerial is half duplex.//it can either receive or send, not both (because receiving requires an interrupt and would stall transmission__asm__ __volatile__ (" com %[ch] \n" // ones complement, carry set" sec \n""1: brcc 2f \n"" in r23,%[uartPort] \n"" and r23,%[uartUnmask] \n"" out %[uartPort],r23 \n"" rjmp 3f \n""2: in r23,%[uartPort] \n"" or r23,%[uartMask] \n"" out %[uartPort],r23 \n"" nop \n""3: rcall uartDelay \n"" rcall uartDelay \n"" rcall uartDelay \n"" rcall uartDelay \n"" lsr %[ch] \n"" dec %[count] \n"" brne 1b \n"::[ch] "r" (ch),[count] "r" ((uint8_t)10),[uartPort] "I" (_SFR_IO_ADDR(ANALOG_COMP_PORT)),[uartMask] "r" (_txmask),[uartUnmask] "r" (_txunmask): "r23","r24","r25");SREG = oldSREG;return 1;
}void TinySoftwareSerial::flush()
{}TinySoftwareSerial::operator bool() {return true;
}// Preinstantiate Objects //
#ifndef ANALOG_COMP_DDR
#error Please define ANALOG_COMP_DDR in the pins_arduino.h file!
#endif#ifndef ANALOG_COMP_PORT
#error Please define ANALOG_COMP_PORT in the pins_arduino.h file!
#endif#ifndef ANALOG_COMP_PIN
#error Please define ANALOG_COMP_PIN in the pins_arduino.h file!
#endif#ifndef ANALOG_COMP_AIN0_BIT
#error Please define ANALOG_COMP_AIN0_BIT in the pins_arduino.h file!
#endif#ifndef ANALOG_COMP_AIN1_BIT
#error Please define ANALOG_COMP_AIN1_BIT in the pins_arduino.h file!
#endifTinySoftwareSerial Serial(&rx_buffer, ANALOG_COMP_AIN0_BIT, ANALOG_COMP_AIN1_BIT);#endif // whole file
TinySoftwareSerial.h
#if USE_SOFTWARE_SERIAL
#ifndef TinySoftwareSerial_h
#define TinySoftwareSerial_h
#include <inttypes.h>
#include "Stream.h"#if !defined(ACSR) && defined(ACSRA)
#define ACSR ACSRA
#endif#if (RAMEND < 250)#define SERIAL_BUFFER_SIZE 8
#elif (RAMEND < 500)#define SERIAL_BUFFER_SIZE 16
#elif (RAMEND < 1000)#define SERIAL_BUFFER_SIZE 32
#else#define SERIAL_BUFFER_SIZE 128
#endif
struct soft_ring_buffer
{volatile unsigned char buffer[SERIAL_BUFFER_SIZE];volatile int head;volatile int tail;
};extern "C"{void uartDelay() __attribute__ ((naked,used)); //used attribute needed to prevent LTO from throwing it out.uint8_t getch();void store_char(unsigned char c, soft_ring_buffer *buffer);
}class TinySoftwareSerial : public Stream
{public: //should be private but needed by extern "C" {} functions.uint8_t _rxmask;uint8_t _txmask;uint8_t _txunmask;soft_ring_buffer *_rx_buffer;uint8_t _delayCount;public:TinySoftwareSerial(soft_ring_buffer *rx_buffer, uint8_t txBit, uint8_t rxBit);void begin(long);void setTxBit(uint8_t);void end();virtual int available(void);virtual int peek(void);virtual int read(void);virtual void flush(void);virtual size_t write(uint8_t);using Print::write; // pull in write(str) and write(buf, size) from Printoperator bool();
};#if (!defined(UBRRH) && !defined(UBRR0H)) || USE_SOFTWARE_SERIALextern TinySoftwareSerial Serial;
#endif//extern void putch(uint8_t);
#endif
#endif
pins_arduino.h
#ifndef Pins_Arduino_h
#define Pins_Arduino_h#include <avr/pgmspace.h>#include "core_build_options.h"//WARNING, if using software, TX is on AIN0, RX is on AIN1. Comparator is favoured to use its interrupt for the RX pin.
#define USE_SOFTWARE_SERIAL 1
//Please define the port on which the analog comparator is found.
#define ANALOG_COMP_DDR DDRB
#define ANALOG_COMP_PORT PORTB
#define ANALOG_COMP_PIN PINB
#define ANALOG_COMP_AIN0_BIT 0
#define ANALOG_COMP_AIN1_BIT 1#if defined( __AVR_ATtinyX313__ )
#define PORT_A_ID 1
#define PORT_B_ID 2
#define PORT_D_ID 4
#endif#if defined( __AVR_ATtinyX4__ )
#define PORT_A_ID 1
#define PORT_B_ID 2
#endif#if defined( __AVR_ATtinyX5__ )
#define PORT_B_ID 1
#endif#define NOT_A_PIN 0
#define NOT_A_PORT 0#define NOT_ON_TIMER 0
#define TIMER0A 1
#define TIMER0B 2
#define TIMER1A 3
#define TIMER1B 4//changed it to uint16_t to uint8_t
extern const uint8_t PROGMEM port_to_mode_PGM[];
extern const uint8_t PROGMEM port_to_input_PGM[];
extern const uint8_t PROGMEM port_to_output_PGM[];
extern const uint8_t PROGMEM port_to_pcmask_PGM[];extern const uint8_t PROGMEM digital_pin_to_port_PGM[];
// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[];
extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];
extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];// Get the bit location within the hardware port of the given virtual pin.
// This comes from the pins_*.c file for the active board configuration.
//
// These perform slightly better as macros compared to inline functions
//
#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) )
#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
#define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
#define analogInPinToBit(P) (P)
// in the following lines modified pgm_read_word in pgm_read_byte, word doesn't work on attiny45
#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_output_PGM + (P))) )
#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_input_PGM + (P))) )
#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_mode_PGM + (P))) )
#define portPcMaskRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_pcmask_PGM + (P))) )#if defined(__AVR_ATtinyX5__)
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 5) ? (&GIMSK) : ((uint8_t *)NULL))
#define digitalPinToPCICRbit(p) (PCIE)
#define digitalPinToPCMSK(p) (((p) >= 0 && (p) <= 5) ? (&PCMSK) : ((uint8_t *)NULL))
#define digitalPinToPCMSKbit(p) (p)
#endif#if defined(__AVR_ATtinyX4__)
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 10) ? (&GIMSK) : ((uint8_t *)NULL))
#define digitalPinToPCICRbit(p) (((p) <= 2) ? PCIE1 : PCIE0)
#define digitalPinToPCMSK(p) (((p) <= 2) ? (&PCMSK1) : (((p) <= 10) ? (&PCMSK0) : ((uint8_t *)NULL)))
#define digitalPinToPCMSKbit(p) (((p) <= 2) ? (p) : (10 - (p)))
#endif#if defined(__AVR_ATtiny4313__)
#define digitalPinToPCX(p,s1,s2,s3,s4,s5) \(((p) >= 0) \? (((p) <= 1) ? (s1) /* 0 - 1 ==> D0 - D1 */ \: (((p) <= 3) ? (s2) /* 2 - 3 ==> A1 - A0 */ \: (((p) <= 8) ? (s3) /* 4 - 8 ==> D2 - D6 */ \: (((p) <= 16) ? (s4) /* 9 - 16 ==> B0 - B7 */ \: (s5))))) \: (s5))
// s1 D s2 A s3 D s4 B
#define digitalPinToPCICR(p) digitalPinToPCX( p, &GIMSK, &GIMSK, &GIMSK, &GIMSK, NULL )
#define digitalPinToPCICRbit(p) digitalPinToPCX( p, PCIE2, PCIE1, PCIE2, PCIE0, 0 )
#define digitalPinToPCMSK(p) digitalPinToPCX( p, &PCMSK2, &PCMSK1, &PCMSK2, &PCMSK0, NULL )
#define digitalPinToPCMSKbit(p) digitalPinToPCX( p, p, 3-p, p-2, p-9, 0 )
#endif#endif
实测效果
相关文章:
【教程】Digispark实现串口通信
转载请注明出处:小锋学长生活大爆炸[xfxuezhagn.cn] 如果本文帮助到了你,欢迎[点赞、收藏、关注]哦~ 没想到这么老,很多代码都不能用,修了好久。。。 TinySoftwareSerial.cpp #include <stdlib.h> #include <stdio.h&g…...
GPT-4.1 开启智能时代新纪元
GPT-4.1 全解析:开启智能时代新纪元(含费用详解) 2025年4月,OpenAI 正式推出全新一代语言模型——GPT-4.1 系列,包括 GPT-4.1、GPT-4.1 Mini 和 GPT-4.1 Nano。相比以往模型,它在代码生成、指令理解、长文本…...
4.21 spark和hadoop的区别与联系
一、Hadoop 1. 定义 Hadoop是一个由Apache基金会开发的分布式系统基础架构。它最初是为了解决大规模数据存储和处理的问题而设计的。Hadoop的核心组件包括HDFS(Hadoop Distributed File System)和MapReduce。 2. HDFS(Hadoop Distributed Fi…...
Nacos 客户端 SDK 的核心功能是什么?是如何与服务端通信的?
Nacos 客户端 SDK 的核心功能 Nacos 客户端 SDK 是应用程序集成 Nacos 能力的桥梁,它封装了与 Nacos 服务端交互的复杂性,为开发者提供了简单易用的 API。其核心功能主要围绕两大方面:服务发现 和 配置管理。 服务发现 (Service Discovery) …...
servlet-保存作用域
保存作用域 保存作用域:原始情况下,保存作用域我们有四个:page(一般不用了) 、request(一般请求响应范围)、session(一次会话范围)、application(整个应用程序范围)1)request:一般请求响应范围…...
从规则到大模型:知识图谱信息抽取实体NER与关系RE任务近10年演进发展详解
摘要: 本文回顾了关系抽取与实体抽取领域的经典与新兴模型,清晰地梳理了它们的出现时间与核心创新,并给出在 2025 年不同资源与场景下的最佳实践推荐。文章引用了 BiLSTM‑CRF、BiLSTM‑CNN‑CRF、SpanBERT、LUKE、KnowBERT、CasRel、REBEL、…...
【自然语言处理与大模型】模型压缩技术之蒸馏
知识蒸馏是一种模型压缩技术,主要用于将大型模型(教师模型)的知识转移到更小的模型(学生模型)中。在大语言模型领域,这一技术特别重要。 知识蒸馏的核心思想是利用教师模型的输出作为软标签(sof…...
yum如果备份已经安装的软件?
在 CentOS 系统中,你可以通过以下步骤将 yum 下载的组件打包备份到本地: 方法 1:使用 yumdownloader 直接下载 RPM 包 1. 安装 yum-utils 工具 yum install -y yum-utils2. 下载指定软件包及其依赖 yumdownloader --resolve <package-n…...
室外摄像头异常自检指南+视频监控系统EasyCVR视频质量诊断黑科技
室外监控摄像头在安防监控系统运行中,常出现连接不畅、设备互认失败等问题。今天我们来介绍两类安防监控摄像头的典型问题及排查步骤。 问题1:同品牌新摄像头无法被老录像机识别 排查步骤: 1)供电检查 确认摄像头供电线路连接正…...
从本地存档到协作开发的Git简单使用
概念 工作区 : 在本地实际进行文件操作的目录 .暂存区 : 类似于缓冲区 , 用于记录准备进行下一次提交的内容 .本地仓库 : 储存在本地的完整版本库 , 包含项目的提交历史 , 分支信息和标签等 .远程仓库 : 部署在远程服务器的版本库 , 通常用于协作开发 . 文件状态 Untracked …...
在 Android 中实现通话录音
在 Android 中实现通话录音需要处理系统权限、通话状态监听和音频录制等关键步骤。以下是详细实现代码及注释,注意不同 Android 版本和厂商设备的兼容性问题: 1. 添加权限声明(AndroidManifest.xml) <!-- 录制音频权限 -->…...
系统分析师知识点:访问控制模型OBAC、RBAC、TBAC与ABAC的对比与应用
在信息安全领域,访问控制是确保数据和资源安全的关键技术。随着信息系统复杂度的提高,访问控制技术也在不断演进,从早期简单的访问控制列表(ACL)发展到如今多种精细化的控制模型。本文将深入剖析四种主流的访问控制模型:基于对象的…...
网络原理(TCP协议—协议格式,性质(上),状态)
目录 1.TCP协议段格式。 2.TCP协议传输时候的性质。 2.1确认应答。 2.2超时重传。 2.3连接管理。 2.3.1 三次握手。 2.3.2四次挥手。 3.TCP常见的状态。 1.TCP协议段格式。 TCP协议段是由首部和数据两部分构成的。首部包含了TCP通信所需要的各种控制信息,而…...
用全新发布的ChatGPT-o3搜文献写综述、专业审稿、降重润色,四个步骤轻松搞定全部论文难题!
今天和大家聊聊OpenAI近期发布的o系列模型中的两个大成果:o3和o4-mini,这个系列的模型最大特点是经过训练,会在响应之前进行更长时间的思考,给出更深入的回答。 下面文章七哥会为大家深度讲解o3模型在学术研究和论文写作方面的四大优势,并附上实用有效的使用技巧和步骤供…...
多路由器通过RIP动态路由实现通讯(单臂路由)
多路由器通过RIP动态路由实现通讯(单臂路由) R1(开启端口并配置IP) Router>en Router#conf t Router(config)#int g0/0 Router(config-if)#no shu Router(config-if)#no shutdown Router(config-if)#ip add 192.168.10.254 255.255.255.0 Router(c…...
分数线降低,25西电马克思主义学院(考研录取情况)
1、马克思主义学院各个方向 2、马克思主义学院近三年复试分数线对比 学长、学姐分析 由表可看出: 1、马克思主义理论25年相较于24年下降10分,为355分 3、25vs24推免/统招人数对比 学长、学姐分析 由表可看出: 1、 马克思主义学院25年共接…...
反转字符串
344. 反转字符串 题目 思路 双指针 设 s 长度为 n。反转可以看成是交换 s[0] 和 s[n−1],交换 s[1] 和 s[n−2],交换 s[2] 和 s[n−3],依此类推。 代码 class Solution:def reverseString(self, s: List[str]) -> None:""&q…...
乾元通渠道商中标舟山市自然灾害应急能力提升工程基层防灾项目
近日,乾元通渠道商中标舟山市自然灾害应急能力提升工程基层防灾项目(结余资金)装备采购项目,乾元通作为设备厂家,为项目提供通信指挥类装备(多链路聚合设备)QYT-X1。 青岛乾元通数码科技有限公司…...
信号调制与解调技术基础解析
调制解调技术是通信系统中实现基带信号与高频载波信号相互转换的主要技术,通过调整信号特性使其适应不同信道环境,保障信息传输的效率和可靠性。 调制与解调的基本概念 调制(Modulation) 将低频基带信号(如语音或数…...
多源异构网络安全数据(CAPEC、CPE、CVE、CVSS、CWE)的作用、数据内容及其相互联系的详细分析
1. CWE(Common Weakness Enumeration) 作用:CWE 是常见软件和硬件安全弱点的分类列表,用于描述漏洞的根本原因(如代码缺陷、逻辑错误等),为漏洞的根源分析提供框架。数据内容: 弱点…...
02_Flask是什么?
一、视频教程 02_Flask是什么 二、Flask简介 Flask 框架诞生于2010 年,是由 Armin 使用 Python 语言基于 Werkzeug 工具箱编写的轻量级Web开发框架。Armin 是 Python 编程语言的核心开发者之一,同时也是 Flask 项目的主要贡献者。 Flask主要依赖于两个核…...
突破网页数据集获取难题:Web Unlocker API 助力 AI 训练与微调数据集全方位解决方案
突破网页数据集获取难题:Web Unlocker API 助力 AI 训练与微调数据集全方位解决方案 背景 随着AI技术的飞速发展,诸如DeepSeek R1、千问QWQ32、文小言、元宝等AI大模型迅速崛起。在AI大模型训练和微调、AI知识库建设中,数据集的获取已成为不…...
Spark-SQL与Hive集成及数据分析实践
一、Spark-SQL连接Hive的配置 Spark-SQL支持与Hive无缝集成,可通过以下方式操作Hive: 1. 内嵌Hive:无需额外配置,直接使用,但生产环境不推荐。 2. 外部Hive: 将hive-site.xml、core-site.xml、hdfs-site…...
CI/CD
CI/CD 是一种用于软件开发和交付的实践方法,由持续集成(Continuous Integration)、持续交付(Continuous Delivery)和持续部署(Continuous Deployment)三个关键环节组成,以下是具体介…...
【橘子大模型】Tools/Function call
一、简介 截止目前,我们对大模型的使用模式仅仅是简单的你问他答。即便是拥有rag,也只是让大模型的回答更加丰富。但是大模型目前为止并没有对外操作的能力,他只是局限于他自己的知识库。 举个例子,到今天4.21为止,你…...
解决Mac 安装 PyICU 依赖失败
失败日志: 解决办法 1、使用 homebrew 安装相关依赖 brew install icu4c 安装完成后,设置环境变量 echo export PATH"/opt/homebrew/opt/icu4c77/bin:$PATH" >> ~/.zshrcecho export PATH"/opt/homebrew/opt/icu4c77/sbin:$PATH…...
Kafka 生产者的幂等性与事务特性详解
在分布式消息系统中,消息的可靠性传输是一个核心问题。Kafka 通过幂等性(Idempotence)和事务(Transaction)两个重要特性来保证消息传输的可靠性。幂等性确保在生产者重试发送消息的情况下,不会在 Broker 端…...
ubuntu--汉字、中文输入
两种输入框架的安装 ibus 链接 (这种方式安装的中文输入法不是很智能,不好用)。 Fcitx 链接这种输入法要好用些。 简体中文检查 fcitx下载和配置 注意:第一次打开fcitx-config-qt或者fcitx configuration可能没有“简体中文”,需要把勾…...
LabVIEW 开发中数据滤波方式的选择
在 LabVIEW 数据处理开发中,滤波是去除噪声、提取有效信号的关键环节。不同的信号特性和应用场景需要匹配特定的滤波方法。本文结合典型工程案例,详细解析常用滤波方式的技术特点、适用场景及选型策略,为开发者提供系统性参考。 一、常用…...
【图像轮廓特征查找】图像处理(OpenCV) -part8
17 图像轮廓特征查找 图像轮廓特征查找其实就是他的外接轮廓。 应用: 图像分割 形状分析 物体检测与识别 根据轮廓点进行,所以要先找到轮廓。 先灰度化、二值化。目标物体白色,非目标物体黑色,选择合适的儿值化方式。 有了轮…...
丝杆升降机蜗轮蜗杆加工工艺深度解析:从选材到制造的全流程技术要点
在机械传动领域,丝杆升降机凭借其高精度、大负载等优势,广泛应用于自动化设备、精密仪器等众多场景。而蜗轮蜗杆作为丝杆升降机的核心传动部件,其加工工艺的优劣直接决定了设备的传动效率、使用寿命及稳定性。本文将深入剖析丝杆升降机蜗轮蜗…...
git远程分支重命名(纯代码操作)
目录 步骤 1:重命名本地分支 步骤 2:推送新分支到远程 简单讲讲: 2.1.-u 和 --set-upstream 的区别 2.2. 为什么需要设置上游(upstream)? 示例对比: 2.3. 如何验证是否设置成功ÿ…...
《AI大模型应知应会100篇》第31篇:大模型重塑教育:从智能助教到学习革命的实践探索
第31篇:大模型重塑教育:从智能助教到学习革命的实践探索 摘要 当北京大学的AI助教在凌晨三点解答学生微积分难题,当Khan Academy的AI导师为每个学生定制专属学习路径,我们正见证教育史上最具颠覆性的技术变革。本文通过真实教育…...
安装Github软件详细流程,win10系统从配置git到安装软件详解,以及github软件整合包制作方法(
win10系统部署安装开源ai必备 一、安装git应用程序(用来下来github软件) 官网下载git的exe可执行文件,Git - Downloads 或者这里下夸克网盘分享 运行git应用程序,一路’Next’到底即可。 配置安装路径 此时如果直接运行git命…...
重构・协同・共生:传统代理渠道数字化融合全链路解决方案
当 90 后经销商开始用直播卖家电,当药品流向数据在区块链上实时流转,传统代理渠道正在经历一场「数字觉醒」。面对流量碎片化、运营低效化的行业痛点,如何让扎根线下数十年的渠道网络,在数字化平台上焕发新生?蚓链提炼…...
智驱未来:AI大模型重构数据治理新范式
第一章 数据治理的进化之路 1.1 传统数据治理的困境 在制造业巨头西门子的案例中,其全球200个工厂每天产生1.2PB工业数据,传统人工清洗需要300名工程师耗时72小时完成,错误率高达15%。数据孤岛问题导致供应链决策延迟平均达48小时。 1.2 A…...
信息收集之hack用的网络空间搜索引擎
目录 1. Shodan 2. Censys 3. ZoomEye 4. BinaryEdge 5. Onyphe 6. LeakIX 7. GreyNoise 8. PulseDive 9. Spyse 10. Intrigue 11. FOFA (Finger Of Find Anything) 12. 🔍 钟馗之眼 (ZoomEye) 总结 对于黑客、网络安全专家和白帽子工程师来说…...
青少年编程与数学 02-018 C++数据结构与算法 01课题、算法
青少年编程与数学 02-018 C数据结构与算法 01课题、算法 一、算法的定义二、算法的设计方法1. 分治法2. 动态规划法3. 贪心算法4. 回溯法5. 迭代法6. 递归法7. 枚举法8. 分支定界法 三、算法的描述方法1. **自然语言描述**2. **流程图描述**3. **伪代码描述**4. **程序设计语言…...
LangChain、LlamaIndex 和 ChatGPT 的详细对比分析及总结表格
以下是 LangChain、LlamaIndex 和 ChatGPT 的详细对比分析及总结表格: 1. 核心功能对比 工具核心功能LangChain框架,用于构建端到端的 LLM 应用程序,支持 prompt 工程、模型调用、数据集成、工具链开发。LlamaIndex文档处理工具,…...
基于单片机的BMS热管理功能设计
标题:基于单片机的BMS热管理功能设计 内容:1.摘要 摘要:在电动汽车和储能系统中,电池管理系统(BMS)的热管理功能至关重要,它直接影响电池的性能、寿命和安全性。本文的目的是设计一种基于单片机的BMS热管理功能。采用…...
数字虹膜:无网时代的视觉密语 | 讨论
引言:当网络成为枷锁 在断网即失联的当下,我们是否过度依赖脆弱的网络线缆?当两台孤立设备急需交换数据,传统方案或受限于物理介质,或暴露于无线信号被劫持的风险。有没有可能绕过所有中间节点,让数据像光线…...
Kubernetes相关的名词解释Container(16)
什么是Container? 在 Kubernetes 中,Container(容器) 是一个核心概念,你可以将镜像(Image)类比为程序的“源代码”,而容器是这段“代码”运行时的进程。例如,一个 nginx…...
腾讯云×数语科技:Datablau DDM (AI智能版)上架云应用!
在数据爆炸式增长的时代,传统的数据建模方式已难以满足企业对敏捷性、智能化、自动化的需求。数语科技联合腾讯云推出的 Datablau DDM 数据建模平台(AI智能版),基于AI语义建模技术,深度融合腾讯混元大模型能力…...
可穿戴设备待机功耗需降至μA级但需保持实时响应(2万字长文深度解析)
可穿戴设备的功耗与响应需求之矛盾 在过去十年中,可穿戴设备以惊人的速度融入我们的日常生活,成为现代科技与个人健康管理的重要交汇点。从智能手表到健身手环,从医疗监测设备到增强现实眼镜,这些设备不仅仅是科技产品的延伸&…...
【身份证扫描件识别表格】如何识别大量身份证扫描件将内容导出保存到Excel表格,一次性处理多张身份证图片导出Excel表格,基于WPF和腾讯云的实现方案
基于WPF和腾讯云的身份证扫描件批量处理方案 适用场景 本方案适用于需要批量处理大量身份证扫描件的场景,例如: 企业人事部门批量录入新员工身份信息银行或金融机构办理批量开户业务教育机构收集学生身份信息政府部门进行人口信息统计酒店、医院等需要实名登记的场所这些场景…...
数字化补贴:企业转型的 “政策东风” 如何借力?
在数字经济浪潮席卷全球的当下,数字化转型已从企业的 “选修课” 变为 “生存必修课”。面对技术迭代加速与市场竞争加剧的双重压力,如何低成本、高效率完成转型?各级政府推出的数字化补贴政策,正成为企业借势突围的关键抓手。 政…...
动态LOD策略细节层级控制:根据视角距离动态简化远距量子态渲染
动态LOD策略在量子计算可视化中的优化实现 1. 细节层级控制:动态简化远距量子态渲染 在量子计算的可视化中,量子态通常表现为高维数据(如布洛赫球面或多量子比特纠缠态)。动态LOD(Level of Detail)策略通过以下方式优化渲染性能: 距离驱动的几何简化: 远距离渲染:当…...
IP精准检测“ipinfo”
目录 核心功能与特点 使用方法 应用场景 数据隐私与限制 扩展工具与服务 核心功能与特点 IP地址查询 支持输入任意IP地址查询详细信息,包括基础IP、主机名、网络归属等,且无需注册即可使用基础功能。 地理位置识别 提供国家、城市、邮政编码、经纬…...
【Linux】调试工具gdb的认识和使用指令介绍(图文详解)
目录 1、debug和release的知识 2、gdb的使用和常用指令介绍: (1)、windows下调试的功能: (2)、进入和退出: (3)、调试过程中的相关指令: 3、调试究竟是在…...
C++ STL:从零开始模拟实现 list 容器
文章目录 引言1. 疑难点解析1.1 迭代器类为什么设置三个模版参数? 2. 完整源码3. 完整测试代码 引言 C 标准模板库(STL)中的 list 是一个双向链表容器,它提供了高效的插入和删除操作。本文将带领你一步步实现一个简化版的 list 容器,帮助你深…...