Arduino 旋转编码器

Arduino 旋转编码器

电位计
Arduino - Rotary Encoder

In this tutorial, we are going to learn how to use the incremental encoder with Arduino. In detail, we will learn:
在本教程中,我们将学习如何将增量编码器与Arduino一起使用。详细来说,我们将学习:

  • How a rotary encoder works
    旋转编码器的工作原理
  • Rotary encoder vs potentiometer
    旋转编码器与电位器区别
  • How to connect the rotary encoder to Arduino
    如何将旋转编码器连接到Arduino
  • How to program Arduino to read the direction and position from the rotary encoder WITHOUT interrupt
    如何对Arduino进行编程,使其不间断地从旋转编码器读取方向和位置
  • How to program Arduino to read the direction and position from the rotary encoder WITH interrupt
    如何对Arduino进行编程,使其从旋转编码器读取方向和位置,并带有中断

About Rotary Encoder 关于旋转编码器

A rotary encoder is an electromechanical device that converts rotational movement into an electrical signal. It measures the rotation and position of a shaft or knob. There are two main types:
旋转编码器是一种将旋转运动转换为电信号的机电设备。它测量轴或旋钮的旋转和位置。主要有两种类型:

  • Incremental encoder: which generates pulses to measure relative change
    增量编码器:产生脉冲以测量相对变化
  • Absolute encoder: which provides a unique digital code for each position, making them ideal for precise positioning even after power loss.
    绝对值编码器:为每个位置提供唯一的数字代码,即使在断电后也能实现精确定位。

This guide is about the incremental encoder.
本指南是关于增量编码器的。

Rotary Encoder Module Pinout 旋转编码器模块引脚排列

请添加图片描述

A rotary encoder module has 4 pins:
旋转编码器模块有 4 个引脚:

  • CLK pin (Output A): is the main pulse that tells us how much rotation has occurred. Whenever you turn the knob by one detent (click) in either direction, the CLK pin outputs a signal that is a completes a full cycle (LOWHIGHLOW).
    CLK 引脚(输出 A):是告诉我们发生了多少旋转的主脉冲。每当您在任一方向上转动旋钮(咔嗒一声)时,CLK 引脚都会输出一个完整的周期(低→高→低)的信号。
  • DT pin (Output B): acts like the CLK pin but outputs a signal lags behind CLK signal by 90 degrees. It helps us figure out the direction of rotation (clockwise or anticlockwise).
    DT 引脚(输出 B):其作用类似于 CLK 引脚,但输出的信号比 CLK 信号滞后 90 度。它可以帮助我们确定旋转方向(顺时针或逆时针)。
  • SW pin: is the output from the pushbutton inside the encoder. It’s normally open. If we use a pull-up resistor in this pin, the SW pin will be HIGH when the knob is not pressed, and LOW when it is pressed.
    SW引脚:是编码器内部按钮的输出。它通常开放。如果我们在此引脚中使用上拉电阻,则未按下旋钮时 SW 引脚将为高电平,按下旋钮时将为低电平。
  • VCC pin (+): needs to be connected to VCC (between 3.3 and 5 volts)
    VCC 引脚 (+):需要连接到 VCC(3.3 到 5 伏之间)
  • GND pin: needs to be connected to GND (0V)
    GND引脚:需要接GND(0V)

Rotary Encoder vs Potentiometer 旋转编码器与电位计区别

You may confuse the rotary encoder with the potentiometer. but they are distinct components. Here’s a comparison between them:
您可能会将旋转编码器与电位计混淆。但它们是不同的组成部分。以下是它们之间的比较:

  • Rotary encoder is like the modern version of potentiometer, but they can do more things.
    旋转编码器就像现代版的电位器,但它们可以做更多的事情。
  • Rotary encoder can spin around in a full circle without stopping, while potentiometer can only turn about three-quarters of the circle.
    旋转编码器可以不停地旋转一整圈,而电位器只能旋转大约四分之三的圆圈。
  • Rotary encoder outputs pulses, while potentiometer outputs the analog voltage.
    旋转编码器输出脉冲,而电位计输出模拟电压。
  • Rotary encoder is handy when you just need to figure out how much the knob has moved, not exactly where it is. Potentiometer is useful when you really need to know exactly where a knob is.
    当您只需要弄清楚旋钮移动了多少,而不是确切地知道它在哪里时,旋转编码器就很方便。当您确实需要确切知道旋钮的位置时,电位计非常有用。

How Rotary Encoder Works 旋转编码器的工作原理

请添加图片描述

Inside the encoder, there’s a disc with slots connected to a pin called C, which is like a shared ground. There are two more pins, A and B.
在编码器内部,有一个圆盘,其插槽连接到一个名为 C 的引脚,就像一个共享接地。还有两个引脚,A 和 B。

  • When you twist the knob, pins A and B touch the shared ground pin C, but in a certain order depending on which way you turn the knob (clockwise or counter-clockwise).
    扭动旋钮时,A 针和 B 针会接触到共用接地针 C,但顺序有所不同,这取决于旋钮的旋转方向(顺时针或逆时针)。
  • These touches create two signals. They’re a bit different in timing because one pin touches the ground before the other. Two signals are 90 degrees out of sync with each other. This is called quadrature encoding.
    这些接触会产生两个信号。它们在时间上有点不同,因为一个引脚比另一个引脚先接地。两个信号相互不同步 90 度。这就是正交编码。
  • When you turn the knob in clockwise direction, pin A touches the ground before pin B. When you turn the knob to the counterclockwise direction, pin B touches the ground before pin A.
    当您顺时针方向转动旋钮时,引脚 A 在引脚 B 之前接触GND。当您将旋钮向逆时针方向转动时,引脚 B 在引脚 A 之前接触GND。
  • By monitoring when each pin touches or leaves the ground, we can figure out which way the knob is turning. We do this by checking what happens to pin B when pin A changes.
    通过监测每个引脚触地或离地的时间,我们就能知道旋钮在朝哪个方向转动。为此,我们要检查 A 引脚发生变化时 B 引脚的情况。

请添加图片描述

When A changes states from LOW to HIGH:
当 A 将状态从 LOW 更改为 HIGH 时:

If B is LOW, the knob is turned clockwise.
如果 B 为低电平,则顺时针转动旋钮。

  • If B is HIGH, the knob is turned counter-clockwise.
    如果 B 为 HIGH,则逆时针转动旋钮。

※ NOTE THAT: ※ 注意事项:

Pin A and B are connected to CLK and DT pins. However, depending on the manufacturers, the order may be different. The codes provided below are tested with the rotary encoder from DIYables
引脚 A 和 B 连接到 CLK 和 DT 引脚。但是,根据制造商的不同,顺序可能会有所不同。下面提供的代码是用DIYables的旋转编码器测试的

How To Program For Rotary Encoder 如何对旋转编码器进行编程

  • Check the signal from CLK pin
    检查来自 CLK 引脚的信号
  • If the state changes from LOW to HIGH, check the state of the DT pin.
    如果状态从LOW变为HIGH,请检查DT引脚的状态。
    • If the state of the DT pin is HIGH, the knob is turned in the counter-clockwise direction, increase the counter by 1
      如果 DT 引脚状态为 HIGH,则旋钮逆时针方向转动,将计数器增加 1
    • If the state of the DT pin is LOW, the knob is turned in the clockwise direction, decrease the counter by 1
      如果 DT 引脚的状态为 LOW,则旋钮顺时针方向转动,将计数器减少 1

Wiring Diagram 接线图

请添加图片描述

This image is created using Fritzing. Click to enlarge image
此图像是使用 Fritzing 创建的。点击放大图片

Arduino Code – Rotary Encoder without Interrupt Arduino代码 – 无中断旋转编码器

The below Arduino code does:
下面的Arduino代码可以:

  • Detects the direction and amount of rotation of the encoder.
    检测编码器的旋转方向和旋转量。
    • If detecting the knob turned by one detent (click) in clockwise direction, increase the counter by one.
      如果检测到旋钮按一个止动器(咔嗒声)顺时针方向转动,请将计数器增加一个。
    • If detecting the knob turned by one detent (click) in anticlockwise direction, decrease the counter by one.
      如果检测到旋钮逆时针方向转动一个咔嗒声,请将计数器减小一个。
  • Detects if the button is pressed.
    检测按钮是否被按下。
/*

 * Created by ArduinoGetStarted.com
   *
 * This example code is in the public domain
   *
 * Tutorial page: https://arduinogetstarted.com/tutorials/arduino-rotary-encoder
   */

#include <ezButton.h>  // the library to use for SW pin

#define CLK_PIN 2
#define DT_PIN 3
#define SW_PIN 4

#define DIRECTION_CW 0   // clockwise direction
#define DIRECTION_CCW 1  // counter-clockwise direction

int counter = 0;
int direction = DIRECTION_CW;
int CLK_state;
int prev_CLK_state;

ezButton button(SW_PIN);  // create ezButton object that attach to pin 4

void setup() {
  Serial.begin(9600);

  // configure encoder pins as inputs
  pinMode(CLK_PIN, INPUT);
  pinMode(DT_PIN, INPUT);
  button.setDebounceTime(50);  // set debounce time to 50 milliseconds

  // read the initial state of the rotary encoder's CLK pin
  prev_CLK_state = digitalRead(CLK_PIN);
}

void loop() {
  button.loop();  // MUST call the loop() function first

  // read the current state of the rotary encoder's CLK pin
  CLK_state = digitalRead(CLK_PIN);

  // If the state of CLK is changed, then pulse occurred
  // React to only the rising edge (from LOW to HIGH) to avoid double count
  if (CLK_state != prev_CLK_state && CLK_state == HIGH) {
    // if the DT state is HIGH
    // the encoder is rotating in counter-clockwise direction => decrease the counter
    if (digitalRead(DT_PIN) == HIGH) {
      counter--;
      direction = DIRECTION_CCW;
    } else {
      // the encoder is rotating in clockwise direction => increase the counter
      counter++;
      direction = DIRECTION_CW;
    }

​    Serial.print("DIRECTION: ");
​    if (direction == DIRECTION_CW)
​      Serial.print("Clockwise");
​    else
​      Serial.print("Counter-clockwise");

​    Serial.print(" | COUNTER: ");
​    Serial.println(counter);
  }

  // save last CLK state
  prev_CLK_state = CLK_state;

  if (button.isPressed()) {
    Serial.println("The button is pressed");
  }
}

To simplify the code for button debouncing, the ezButton library is used.
为了简化按钮去抖动的代码,使用了 ezButton 库。

Quick Steps 快速步骤
  • Install ezButton library on Arduino IDE. See How To
    在Arduino IDE上安装ezButton库。了解操作方法
  • Copy the above code and open with Arduino IDE
    复制上面的代码并使用Arduino IDE打开
  • Click Upload button on Arduino IDE to upload code to Arduino
    单击Arduino IDE上的“上传”按钮,将代码上传到Arduino
  • Turn the knob in clockwise, then anticlockwise
    顺时针转动旋钮,然后逆时针转动
  • Press the knob 按下旋钮
  • See the result on Serial Monitor.
    在串行监视器上查看结果。

Arduino Code – Rotary Encoder with Interrupt Arduino代码 – 带中断的旋转编码器

In the previous example code, we use the polling method, which continuously check the pin’s state. This has two disadvantages:
在前面的示例代码中,我们使用轮询方法,该方法持续检查引脚的状态。这有两个缺点:

  • Waste Arduino resource 浪费Arduino资源
  • Some counter may be missed if another code takes long time to excecute.
    如果另一个代码需要很长时间才能完成,则可能会错过某些计数器。

One approach to handle this is by using interrupts. Interrupts eliminate the need for constant checking of a particular event. This allows the Arduino to carry out other tasks without overlooking an event.
处理此问题的一种方法是使用中断。中断消除了对特定事件进行持续检查的需要。这允许Arduino在不忽略事件的情况下执行其他任务。

Here’s an example of how to read a rotary encoder with interrupts.
下面是一个示例,说明如何读取带有中断的旋转编码器。

/*

 * Created by ArduinoGetStarted.com
   *
 * This example code is in the public domain
   *
 * Tutorial page: https://arduinogetstarted.com/tutorials/arduino-rotary-encoder
   */

#include <ezButton.h>  // the library to use for SW pin

#define CLK_PIN 2
#define DT_PIN 3
#define SW_PIN 4

#define DIRECTION_CW 0   // clockwise direction
#define DIRECTION_CCW 1  // counter-clockwise direction

volatile int counter = 0;
volatile int direction = DIRECTION_CW;
volatile unsigned long last_time;  // for debouncing
int prev_counter;

ezButton button(SW_PIN);  // create ezButton object that attach to pin 4

void setup() {
  Serial.begin(9600);

  // configure encoder pins as inputs
  pinMode(CLK_PIN, INPUT);
  pinMode(DT_PIN, INPUT);
  button.setDebounceTime(50);  // set debounce time to 50 milliseconds

  // use interrupt for CLK pin is enough
  // call ISR_encoderChange() when CLK pin changes from LOW to HIGH
  attachInterrupt(digitalPinToInterrupt(CLK_PIN), ISR_encoderChange, RISING);
}

void loop() {
  button.loop();  // MUST call the loop() function first

  if (prev_counter != counter) {
    Serial.print("DIRECTION: ");
    if (direction == DIRECTION_CW)
      Serial.print("Clockwise");
    else
      Serial.print("Counter-clockwise");

​    Serial.print(" | COUNTER: ");
​    Serial.println(counter);

​    prev_counter = counter;
  }

  if (button.isPressed()) {
    Serial.println("The button is pressed");
  }

  // TO DO: your other work here
}

void ISR_encoderChange() {
  if ((millis() - last_time) < 50)  // debounce time is 50ms
    return;

  if (digitalRead(DT_PIN) == HIGH) {
    // the encoder is rotating in counter-clockwise direction => decrease the counter
    counter--;
    direction = DIRECTION_CCW;
  } else {
    // the encoder is rotating in clockwise direction => increase the counter
    counter++;
    direction = DIRECTION_CW;
  }

  last_time = millis();
}

Now, As you twist the knob, you’ll notice information appearing on the Serial Monitor, much like what you saw in the earlier code.
现在,当您转动旋钮时,您会注意到串行监视器上出现的信息,与您在前面的代码中看到的非常相似。

※ NOTE THAT: ※ 注意事项:

  • If you use the interrupt, you need to connect the encoder’s CLK pin to an Arduino pin that can handle interrupts. But remember, not all Arduino pins can do this. For example, on the Arduino Uno, only pins 2 and 3 can work with interrupts.
    如果使用中断,则需要将编码器的 CLK 引脚连接到可以处理中断的 Arduino 引脚。但请记住,并非所有Arduino引脚都可以做到这一点。例如,在 Arduino Uno 上,只有引脚 2 和 3 可以使用中断。
  • You might come across tutorials on other websites that use two interrupts for a single encoder, but this is unnecessary and wasteful. Just one interrupt is sufficient.
    您可能会在其他网站上遇到对单个编码器使用两个中断的教程,但这是不必要的和浪费的。只需一次中断就足够了。
  • It’s important to use the volatile keyword for global variables used in the interrupt. Neglecting this could lead to unexpected issues.
    对中断中使用的全局变量使用 volatile 关键字非常重要。忽视这一点可能会导致意想不到的问题
  • Keep the code within the interrupt as straightforward as you can. Avoid using Serial.print() or Serial.println() inside the interrupt.
    在中断中保持代码尽可能简单明了。避免在中断中使用 Serial.print() 或 Serial.println()

Arduino Rotary Encoder Application Arduino旋转编码器应用

With Rotary Encoder, we can do the following applications but not limit:
使用旋转编码器,我们可以执行以下应用,但不限于:

  • Arduino - Rotary Encoder controls Position of Sevo Motor
    Arduino - 旋转编码器控制 Sevo 电机的位置
  • Arduino - Rotary Encoder controls Brightness of LED
    Arduino - 旋转编码器控制 LED 亮度
  • Arduino - Rotary Encoder controls Speed of Stepper Motor
    Arduino - 旋转编码器控制步进电机的速度

示例1

在这里插入图片描述


/*
 * Created by ArduinoGetStarted.com
 *
 * This example code is in the public domain
 *
 * Tutorial page: https://arduinogetstarted.com/tutorials/arduino-rotary-encoder-led
 */

#include <Servo.h>

#define CLK_PIN 2
#define DT_PIN 3
#define SW_PIN 4
#define LED_PIN 9

#define DIRECTION_CW 0   // clockwise direction
#define DIRECTION_CCW 1  // counter-clockwise direction

int counter = 0;
int direction = DIRECTION_CW;
int CLK_state;
int prev_CLK_state;
int brightness = 125;  // middle value

void setup() {
  Serial.begin(9600);

  // configure encoder pins as inputs
  pinMode(CLK_PIN, INPUT);
  pinMode(DT_PIN, INPUT);

  // read the initial state of the rotary encoder's CLK pin
  prev_CLK_state = digitalRead(CLK_PIN);
  pinMode(LED_PIN, OUTPUT);
}

void loop() {

  // read the current state of the rotary encoder's CLK pin
  CLK_state = digitalRead(CLK_PIN);

  // If the state of CLK is changed, then pulse occurred
  // React to only the rising edge (from LOW to HIGH) to avoid double count
  if (CLK_state != prev_CLK_state && CLK_state == HIGH) {
    // if the DT state is HIGH
    // the encoder is rotating in counter-clockwise direction => decrease the counter
    if (digitalRead(DT_PIN) == HIGH) {
      direction = DIRECTION_CCW;
      counter--;
      brightness -= 10;  // you can change this value
    } else {
      // the encoder is rotating in clockwise direction => increase the counter
      direction = DIRECTION_CW;
      counter++;
      brightness += 10;  // you can change this value
    }

    if (brightness < 0)
      brightness = 0;
    else if (brightness > 255)
      brightness = 255;

    // sets the brightness of LED according to the counter
    analogWrite(LED_PIN, brightness);

    Serial.print("COUNTER: ");
    Serial.print(counter);
    Serial.print(" | BRIGHTNESS: ");
    Serial.println(brightness);
  }

  // save last CLK state
  prev_CLK_state = CLK_state;
}

示例2

在这里插入图片描述

/*
 * Created by ArduinoGetStarted.com
 *
 * This example code is in the public domain
 *
 * Tutorial page: https://arduinogetstarted.com/tutorials/arduino-rotary-encoder-servo-motor
 */

#include <Servo.h>

#define CLK_PIN 2
#define DT_PIN 3
#define SW_PIN 4
#define SERVO_PIN 9

#define DIRECTION_CW 0   // clockwise direction
#define DIRECTION_CCW 1  // counter-clockwise direction

int counter = 0;
int direction = DIRECTION_CW;
int CLK_state;
int prev_CLK_state;

Servo servo;  // create servo object to control a servo

void setup() {
  Serial.begin(9600);

  // configure encoder pins as inputs
  pinMode(CLK_PIN, INPUT);
  pinMode(DT_PIN, INPUT);

  // read the initial state of the rotary encoder's CLK pin
  prev_CLK_state = digitalRead(CLK_PIN);
  servo.attach(SERVO_PIN);  // attaches the servo on pin 9 to the servo object
  servo.write(0);
}

void loop() {

  // read the current state of the rotary encoder's CLK pin
  CLK_state = digitalRead(CLK_PIN);

  // If the state of CLK is changed, then pulse occurred
  // React to only the rising edge (from LOW to HIGH) to avoid double count
  if (CLK_state != prev_CLK_state && CLK_state == HIGH) {
    // if the DT state is HIGH
    // the encoder is rotating in counter-clockwise direction => decrease the counter
    if (digitalRead(DT_PIN) == HIGH) {
      counter--;
      direction = DIRECTION_CCW;
    } else {
      // the encoder is rotating in clockwise direction => increase the counter
      counter++;
      direction = DIRECTION_CW;
    }

    Serial.print("DIRECTION: ");
    if (direction == DIRECTION_CW)
      Serial.print("Clockwise");
    else
      Serial.print("Counter-clockwise");

    Serial.print(" | COUNTER: ");
    Serial.println(counter);

    if (counter < 0)
      counter = 0;
    else if (counter > 180)
      counter = 180;

    // sets the servo angle according to the counter
    servo.write(counter);
  }

  // save last CLK state
  prev_CLK_state = CLK_state;
}

Video Tutorial 视频教程

We are considering to make the video tutorials. If you think the video tutorials are essential, please subscribe to our YouTube channel to give us motivation for making the videos.
我们正在考虑制作视频教程。如果您认为视频教程是必不可少的,请订阅我们的 YouTube 频道,为我们制作视频提供动力。

Function References

  • pinMode()

  • digitalRead()

  • Serial

See Also

  • Arduino - Rotary Encoder LED
  • Arduino - Rotary Encoder - Servo Motor

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/742289.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Maven笔记(更新中)

一、Maven简介 Maven是一款为Java项目构建,依赖管理的工具(软件),使用Maven可以自动化构建,测试,打包和发布项目,大大提高了开发效率和质量 Maven主要作用理解 依赖管理 Maven可以管理项目的依赖,包括自动下载所需依赖库,自动下载依赖所需的依赖并且保证版本没有冲突,依赖版…

Golang | Leetcode Golang题解之第173题二叉搜索树迭代器

题目&#xff1a; 题解&#xff1a; type BSTIterator struct {stack []*TreeNodecur *TreeNode }func Constructor(root *TreeNode) BSTIterator {return BSTIterator{cur: root} }func (it *BSTIterator) Next() int {for node : it.cur; node ! nil; node node.Left {it…

2024上海初中生古诗文大会倒计时4个月:单选题真题示例和独家解析

现在距离2024年初中生古诗文大会还有4个多月时间&#xff0c;我们继续来看10道选择题真题和详细解析&#xff0c;以下题目截取自我独家制作的在线真题集&#xff0c;都是来自于历届真题&#xff0c;去重、合并后&#xff0c;每道题都有参考答案和解析。 为帮助孩子自测和练习&…

全自动搭建定制化深度学习模型

EasyDL 服务自动化生成与部署 EasyDL 定制化训练和服务平台基于百度业界领先算法&#xff0c;旨在为用户量身定制业务专属 AI 模型。通过灵活的配置&#xff0c;用户可以将模型发布为公有云 API、设备端离线 SDK、本地服务器部署包、软硬一体方案等多种输出方式的 AI 服务。目…

SHAP中使用shap.summary_plot对多分类任务模型中特征重要性绘图

在文心一言中输入&#xff1a; 使用shap.summary_plot展示各个特征对模型输出类别的重要性 其输出的代码为&#xff08;不正确&#xff09;&#xff1a; from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn import svm import …

Iot解决方案开发的体系结构模式和技术

前言 Foreword 计算机技术起源于20世纪40年代&#xff0c;最初专注于数学问题的基本原理&#xff1b;到了60年代和70年代&#xff0c;它以符号系统为中心&#xff0c;该领域首先开始面临复杂性问题&#xff1b;到80年代&#xff0c;随着个人计算的兴起和人机交互的问题&#x…

利用Java easyExcel库实现高效Excel数据处理

在Java应用程序中&#xff0c;处理Excel文件是一项常见任务&#xff0c;尤其是在需要读取、写入或分析大量数据时。easyExcel是一个基于Java的高性能Excel处理库&#xff0c;它提供了简洁的API和优化的性能&#xff0c;以简化Excel文件的处理。本文将指导您如何使用easyExcel库…

亚马逊卖家为何需要自养账号?揭秘背后的原因

亚马逊是一家极为重视用户体验的国际电商平台&#xff0c;因此用户的评论和星级评价对店铺排名影响深远。平台审核评论非常严格&#xff0c;这些评价直接影响商品在平台上的生存和发展。 在亚马逊上&#xff0c;用户的评分和评论对商品的成功至关重要。好评多的商品通常被认为优…

项目管理的六个核心内容

项目管理是一个系统性和综合性的过程&#xff0c;涉及多个核心内容的协同管理&#xff0c;以确保项目能够按时、按预算、高质量的完成&#xff0c;以下是项目管理的六个核心内容&#xff1a; 一、项目目标与范围 项目目标与范围是项目管理的起点和基础&#xff0c;在项目启动…

【鸿蒙】ArkTS语言

HarmonyOS 应⽤的主要开发语⾔是 ArkTS&#xff0c;它由 TypeScript&#xff08;简称TS&#xff09;扩展⽽来&#xff0c;在继承 TypeScript语法的基础上进⾏了⼀系列优化&#xff0c;使开发者能够以更简洁、更⾃然的⽅式开发应⽤。 值得注意的是&#xff0c;TypeScript 本身也…

SecureCRT使用方法(非常简单)!!!

一、简单了解 SecureCRT是一款功能强大的终端仿真软件&#xff0c;广泛用于远程访问和管理服务器。它提供了丰富的功能和安全性&#xff0c;使得远程连接更加简单、高效和可靠。 SecureFX 可以提供安全文件传输。主要用于Linux操作系统客户端文件传输程序&#xff0c;该客户端…

如果一个云服务提供商没有通过等保2.0认证,客户有哪些风险?

如果一个云服务提供商没有通过等保2.0&#xff08;信息安全等级保护2.0&#xff09;认证&#xff0c;其客户可能会面临以下几类风险&#xff1a; 1. 安全隐患增加&#xff1a;等保2.0是对信息系统安全保护的一种国家标准&#xff0c;未通过认证可能意味着云服务提供商在安全技…

基于PHP+MySQL组合开发的在线客服小程序源码系统 带完整的安装代码包以及搭建教程

系统概述 源码系统是专门为满足企业在线客服需求而设计的&#xff0c;它集成了多种功能&#xff0c;能够帮助企业实现与用户的实时沟通、问题解答、信息反馈等。通过该系统&#xff0c;企业可以更好地了解用户需求&#xff0c;提升用户体验&#xff0c;增强用户对企业的信任感…

ROS动态参数调节

一、原因 在ROS系统中,需要我们经常去修改参数的数值,传统的静态参数传递办法很难满足需求,需要我们进行动态参数调整。 二、步骤 新建ROS工作空间 mkdir turtle_traning/src -pcd src 在src在里面新建一个功能包parameter_set catkin_create_pkg parameter_set roscpp …

2024年6月上半月30篇大语言模型的论文推荐

大语言模型&#xff08;LLMs&#xff09;在近年来取得了快速发展。本文总结了2024年6月上半月发布的一些最重要的LLM论文&#xff0c;可以让你及时了解最新进展。 LLM进展与基准测试 1、WildBench: Benchmarking LLMs with Challenging Tasks from Real Users in the Wild Wi…

C#快速开发OPCUA服务器

为方便演示&#xff0c;此时创建一个控制台应用程序。第三方dll(C编写的库opcsrv.dll&#xff0c;他人实现)。 拷贝dll到运行目录下&#xff1a; 拷贝二次封装后的文件到项目目录下&#xff1a; 第一步&#xff1a;创建OpcUa服务器 //第一步&#xff1a;创建OpcUa服务器 OPCSr…

八、yolov8模型预测和模型导出(目标检测)

模型查看 模型预测 模型导出 模型训练完成后&#xff0c;找到训练文件生成文件夹&#xff0c;里面包含wights、过程图、曲线图。 模型预测 1、在以下文件夹中放入需要预测的图&#xff1b; 2、找到detect文件下的predict.py文件&#xff0c;修改以下内容。 3、右键点击…

外贸独立站应该如何做谷歌SEO外链?

通过高低搭配的外链组合来安全建设外链结构&#xff0c;实现外链建设效果最大化 所谓高低搭配的外链组合&#xff0c;就是GPB&#xff0c;GNB&#xff0c;GMB三种外链的搭配组合&#xff0c;GPB独立站外链&#xff0c;高低搭配组合的最高位外链&#xff0c;这种外链拥有相关的…

STARTRADER星迈:银和铜的未来前景,是否即将迎来历史新高?

随着全球经济的复苏和技术进步的加速&#xff0c;大宗商品市场特别是金属市场近年来表现出强劲的动态。2024年&#xff0c;包括白银和铜在内的大宗商品价格已连续创下多年和历史新高&#xff0c;被分析师誉为可能是大宗商品交易史上赚钱的一年。本文将STARTRADER外汇深入探讨白…

游戏AI的创造思路-技术基础-深度学习(5)

继续深度学习技术的探讨&#xff0c;填坑不断&#xff0c;头秃不断~~~~~ 3.5. 自编码器&#xff08;AE&#xff09; 3.5.1. 定义 自编码器&#xff08;Autoencoder, AE&#xff09;是一种数据的压缩算法&#xff0c;其中压缩和解压缩函数是数据相关的、有损的、从样本中自动学…