Jetson Nano驱动机器人的左右两路电机

news2024/11/25 5:23:34

基于Jetson Nano板子搭建一个无人车,少不了减速电机驱动轮子滚动,那如何驱动呢?

从Jetson.GPIO库文件来说,里面没有支持产生PWM的引脚,也就意味着Jetson nano没有硬件产生PWM的能力,所以我们不得不使用别的方法产生PWM完成驱动控制,而刚好STM8解决了这一问题并且节约了它有限的GPIO资源,我们借助STM8这款MCU作为协处理器,大大增强了Jetson nano的驱动能力,PWM的周期和占空比(在一个脉冲循环内,通电时间相对于总时间所占的比例)都完全可控。

我们来看下它的参数:

我们使用的是上图所示的QFN20封装的STM8,它主要参数特征如下:

1. I2C接口,支持多路PWM输出
2. 内置16MHz晶振,可不连接外部晶振,也可以连接外部晶振
3. 支持2.95V-5.5V电压,最大耐压值5.5V
4. 具有上电复位,以及软件复位等功能

由上图三极管驱动的有源蜂鸣器电路,而三极管控制引脚接在协处理器可知,开启蜂鸣器只需要通过IIC给协处理器对应的指令即可,下面我们看到通讯协议:

在上一篇文章我们演示的蜂鸣器,我们通过IIC向协处理器(地址0x1B)的寄存器0x06发送1即可打开蜂鸣器,发送0即关闭蜂鸣器

bus.write_byte_data(0x1B,0x06,1或0)

同样的给出两路电机的电路图:

我们来实际驱动电机看下,这里电机控制部分用到了Jetbotmini的库:

from jetbotmini import Robot
import time
robot = Robot()
print(dir(robot))
#['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_add_notifiers', '_config_changed', '_cross_validation_lock', '_find_my_config', '_instance', '_load_config', '_log_default', '_notify_trait', '_register_validator', '_remove_notifiers', '_trait_default_generators', '_trait_notifiers', '_trait_validators', '_trait_values', '_walk_mro', 'add_traits', 'backward', 'class_config_rst_doc', 'class_config_section', 'class_get_help', 'class_get_trait_help', 'class_own_trait_events', 'class_own_traits', 'class_print_help', 'class_trait_names', 'class_traits', 'clear_instance', 'config', 'cross_validation_lock', 'forward', 'has_trait', 'hold_trait_notifications', 'i2c_bus', 'initialized', 'instance', 'left', 'left_motor', 'left_motor_alpha', 'left_motor_channel', 'log', 'motor_driver', 'notify_change', 'observe', 'on_trait_change', 'parent', 'right', 'right_motor', 'right_motor_alpha', 'right_motor_channel', 'section_names', 'set_motors', 'set_trait', 'setup_instance', 'stop', 'trait_events', 'trait_metadata', 'trait_names', 'traits', 'unobserve', 'unobserve_all', 'update_config']
print(dir(robot.left_motor))
#['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_add_notifiers', '_config_changed', '_cross_validation_lock', '_driver', '_find_my_config', '_load_config', '_motor', '_notify_trait', '_observe_value', '_register_validator', '_release', '_remove_notifiers', '_trait_default_generators', '_trait_notifiers', '_trait_validators', '_trait_values', '_write_value', 'add_traits', 'alpha', 'beta', 'class_config_rst_doc', 'class_config_section', 'class_get_help', 'class_get_trait_help', 'class_own_trait_events', 'class_own_traits', 'class_print_help', 'class_trait_names', 'class_traits', 'config', 'cross_validation_lock', 'has_trait', 'hold_trait_notifications', 'notify_change', 'observe', 'on_trait_change', 'parent', 'section_names', 'set_trait', 'setup_instance', 'trait_events', 'trait_metadata', 'trait_names', 'traits', 'unobserve', 'unobserve_all', 'update_config', 'value']
#这个转速的范围是[0,1],不过我设置成0.1也没有转,设置成0.2及以上才转,不知道是不是电量不是很足的原因了。
robot.left_motor.value = 0.8
robot.right_motor.value = 0.8
#这样就可以让电机转动了,很简单,然后做停止电机的操作
robot.left_motor.value = 0
robot.right_motor.value = 0
#或者直接将robot停止也可以
#robot.stop()

这段赋值左右马达的意思就是,控制电机速度的值的范围是0~1.0,即代表给出的PWM的占空比为0~100%,所以赋值为0,就是把输出给电机的PWM占空比设置为0,这样就关闭了电机

更多的robot实例方法可以自行查阅源码:

Help on Robot in module jetbotmini.robot object:

class Robot(traitlets.config.configurable.SingletonConfigurable)
 |  A configurable that only allows one instance.
 |  
 |  This class is for classes that should only have one instance of itself
 |  or *any* subclass. To create and retrieve such a class use the
 |  :meth:`SingletonConfigurable.instance` method.
 |  
 |  Method resolution order:
 |      Robot
 |      traitlets.config.configurable.SingletonConfigurable
 |      traitlets.config.configurable.LoggingConfigurable
 |      traitlets.config.configurable.Configurable
 |      traitlets.traitlets.HasTraits
 |      traitlets.traitlets.HasDescriptors
 |      builtins.object
 |  
 |  Methods defined here:
 |  
 |  __init__(self, *args, **kwargs)
 |      Create a configurable given a config config.
 |      
 |      Parameters
 |      ----------
 |      config : Config
 |          If this is empty, default values are used. If config is a
 |          :class:`Config` instance, it will be used to configure the
 |          instance.
 |      parent : Configurable instance, optional
 |          The parent Configurable instance of this object.
 |      
 |      Notes
 |      -----
 |      Subclasses of Configurable must call the :meth:`__init__` method of
 |      :class:`Configurable` *before* doing anything else and using
 |      :func:`super`::
 |      
 |          class MyConfigurable(Configurable):
 |              def __init__(self, config=None):
 |                  super(MyConfigurable, self).__init__(config=config)
 |                  # Then any other code you need to finish initialization.
 |      
 |      This ensures that instances will be configured properly.
 |  
 |  backward(self, speed=1.0)
 |  
 |  forward(self, speed=1.0, duration=None)
 |  
 |  left(self, speed=1.0)
 |  
 |  right(self, speed=1.0)
 |  
 |  set_motors(self, left_speed, right_speed)
 |  
 |  stop(self)
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  i2c_bus
 |      An int trait.
 |  
 |  left_motor
 |      A trait whose value must be an instance of a specified class.
 |      
 |      The value can also be an instance of a subclass of the specified class.
 |      
 |      Subclasses can declare default classes by overriding the klass attribute
 |  
 |  left_motor_alpha
 |      A float trait.
 |  
 |  left_motor_channel
 |      An int trait.
 |  
 |  right_motor
 |      A trait whose value must be an instance of a specified class.
 |      
 |      The value can also be an instance of a subclass of the specified class.
 |      
 |      Subclasses can declare default classes by overriding the klass attribute
 |  
 |  right_motor_alpha
 |      A float trait.
 |  
 |  right_motor_channel
 |      An int trait.
 |  
 |  ----------------------------------------------------------------------
 |  Class methods inherited from traitlets.config.configurable.SingletonConfigurable:
 |  
 |  clear_instance() from traitlets.traitlets.MetaHasTraits
 |      unset _instance for this class and singleton parents.
 |  
 |  initialized() from traitlets.traitlets.MetaHasTraits
 |      Has an instance been created?
 |  
 |  instance(*args, **kwargs) from traitlets.traitlets.MetaHasTraits
 |      Returns a global instance of this class.
 |      
 |      This method create a new instance if none have previously been created
 |      and returns a previously created instance is one already exists.
 |      
 |      The arguments and keyword arguments passed to this method are passed
 |      on to the :meth:`__init__` method of the class upon instantiation.
 |      
 |      Examples
 |      --------
 |      
 |      Create a singleton class using instance, and retrieve it::
 |      
 |          >>> from traitlets.config.configurable import SingletonConfigurable
 |          >>> class Foo(SingletonConfigurable): pass
 |          >>> foo = Foo.instance()
 |          >>> foo == Foo.instance()
 |          True
 |      
 |      Create a subclass that is retrived using the base class instance::
 |      
 |          >>> class Bar(SingletonConfigurable): pass
 |          >>> class Bam(Bar): pass
 |          >>> bam = Bam.instance()
 |          >>> bam == Bar.instance()
 |          True
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from traitlets.config.configurable.LoggingConfigurable:
 |  
 |  log
 |      A trait whose value must be an instance of a specified class.
 |      
 |      The value can also be an instance of a subclass of the specified class.
 |      
 |      Subclasses can declare default classes by overriding the klass attribute
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from traitlets.config.configurable.Configurable:
 |  
 |  update_config(self, config)
 |      Update config and load the new values
 |  
 |  ----------------------------------------------------------------------
 |  Class methods inherited from traitlets.config.configurable.Configurable:
 |  
 |  class_config_rst_doc() from traitlets.traitlets.MetaHasTraits
 |      Generate rST documentation for this class' config options.
 |      
 |      Excludes traits defined on parent classes.
 |  
 |  class_config_section() from traitlets.traitlets.MetaHasTraits
 |      Get the config class config section
 |  
 |  class_get_help(inst=None) from traitlets.traitlets.MetaHasTraits
 |      Get the help string for this class in ReST format.
 |      
 |      If `inst` is given, it's current trait values will be used in place of
 |      class defaults.
 |  
 |  class_get_trait_help(trait, inst=None) from traitlets.traitlets.MetaHasTraits
 |      Get the help string for a single trait.
 |      
 |      If `inst` is given, it's current trait values will be used in place of
 |      the class default.
 |  
 |  class_print_help(inst=None) from traitlets.traitlets.MetaHasTraits
 |      Get the help string for a single trait and print it.
 |  
 |  section_names() from traitlets.traitlets.MetaHasTraits
 |      return section names as a list
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from traitlets.config.configurable.Configurable:
 |  
 |  config
 |      A trait whose value must be an instance of a specified class.
 |      
 |      The value can also be an instance of a subclass of the specified class.
 |      
 |      Subclasses can declare default classes by overriding the klass attribute
 |  
 |  parent
 |      A trait whose value must be an instance of a specified class.
 |      
 |      The value can also be an instance of a subclass of the specified class.
 |      
 |      Subclasses can declare default classes by overriding the klass attribute
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from traitlets.traitlets.HasTraits:
 |  
 |  __getstate__(self)
 |  
 |  __setstate__(self, state)
 |  
 |  add_traits(self, **traits)
 |      Dynamically add trait attributes to the HasTraits instance.
 |  
 |  has_trait(self, name)
 |      Returns True if the object has a trait with the specified name.
 |  
 |  hold_trait_notifications(self)
 |      Context manager for bundling trait change notifications and cross
 |      validation.
 |      
 |      Use this when doing multiple trait assignments (init, config), to avoid
 |      race conditions in trait notifiers requesting other trait values.
 |      All trait notifications will fire after all values have been assigned.
 |  
 |  notify_change(self, change)
 |  
 |  observe(self, handler, names=traitlets.All, type='change')
 |      Setup a handler to be called when a trait changes.
 |      
 |      This is used to setup dynamic notifications of trait changes.
 |      
 |      Parameters
 |      ----------
 |      handler : callable
 |          A callable that is called when a trait changes. Its
 |          signature should be ``handler(change)``, where ``change`` is a
 |          dictionary. The change dictionary at least holds a 'type' key.
 |          * ``type``: the type of notification.
 |          Other keys may be passed depending on the value of 'type'. In the
 |          case where type is 'change', we also have the following keys:
 |          * ``owner`` : the HasTraits instance
 |          * ``old`` : the old value of the modified trait attribute
 |          * ``new`` : the new value of the modified trait attribute
 |          * ``name`` : the name of the modified trait attribute.
 |      names : list, str, All
 |          If names is All, the handler will apply to all traits.  If a list
 |          of str, handler will apply to all names in the list.  If a
 |          str, the handler will apply just to that name.
 |      type : str, All (default: 'change')
 |          The type of notification to filter by. If equal to All, then all
 |          notifications are passed to the observe handler.
 |  
 |  on_trait_change(self, handler=None, name=None, remove=False)
 |      DEPRECATED: Setup a handler to be called when a trait changes.
 |      
 |      This is used to setup dynamic notifications of trait changes.
 |      
 |      Static handlers can be created by creating methods on a HasTraits
 |      subclass with the naming convention '_[traitname]_changed'.  Thus,
 |      to create static handler for the trait 'a', create the method
 |      _a_changed(self, name, old, new) (fewer arguments can be used, see
 |      below).
 |      
 |      If `remove` is True and `handler` is not specified, all change
 |      handlers for the specified name are uninstalled.
 |      
 |      Parameters
 |      ----------
 |      handler : callable, None
 |          A callable that is called when a trait changes.  Its
 |          signature can be handler(), handler(name), handler(name, new),
 |          handler(name, old, new), or handler(name, old, new, self).
 |      name : list, str, None
 |          If None, the handler will apply to all traits.  If a list
 |          of str, handler will apply to all names in the list.  If a
 |          str, the handler will apply just to that name.
 |      remove : bool
 |          If False (the default), then install the handler.  If True
 |          then unintall it.
 |  
 |  set_trait(self, name, value)
 |      Forcibly sets trait attribute, including read-only attributes.
 |  
 |  setup_instance(self, *args, **kwargs)
 |      This is called **before** self.__init__ is called.
 |  
 |  trait_metadata(self, traitname, key, default=None)
 |      Get metadata values for trait by key.
 |  
 |  trait_names(self, **metadata)
 |      Get a list of all the names of this class' traits.
 |  
 |  traits(self, **metadata)
 |      Get a ``dict`` of all the traits of this class.  The dictionary
 |      is keyed on the name and the values are the TraitType objects.
 |      
 |      The TraitTypes returned don't know anything about the values
 |      that the various HasTrait's instances are holding.
 |      
 |      The metadata kwargs allow functions to be passed in which
 |      filter traits based on metadata values.  The functions should
 |      take a single value as an argument and return a boolean.  If
 |      any function returns False, then the trait is not included in
 |      the output.  If a metadata key doesn't exist, None will be passed
 |      to the function.
 |  
 |  unobserve(self, handler, names=traitlets.All, type='change')
 |      Remove a trait change handler.
 |      
 |      This is used to unregister handlers to trait change notifications.
 |      
 |      Parameters
 |      ----------
 |      handler : callable
 |          The callable called when a trait attribute changes.
 |      names : list, str, All (default: All)
 |          The names of the traits for which the specified handler should be
 |          uninstalled. If names is All, the specified handler is uninstalled
 |          from the list of notifiers corresponding to all changes.
 |      type : str or All (default: 'change')
 |          The type of notification to filter by. If All, the specified handler
 |          is uninstalled from the list of notifiers corresponding to all types.
 |  
 |  unobserve_all(self, name=traitlets.All)
 |      Remove trait change handlers of any type for the specified name.
 |      If name is not specified, removes all trait notifiers.
 |  
 |  ----------------------------------------------------------------------
 |  Class methods inherited from traitlets.traitlets.HasTraits:
 |  
 |  class_own_trait_events(name) from traitlets.traitlets.MetaHasTraits
 |      Get a dict of all event handlers defined on this class, not a parent.
 |      
 |      Works like ``event_handlers``, except for excluding traits from parents.
 |  
 |  class_own_traits(**metadata) from traitlets.traitlets.MetaHasTraits
 |      Get a dict of all the traitlets defined on this class, not a parent.
 |      
 |      Works like `class_traits`, except for excluding traits from parents.
 |  
 |  class_trait_names(**metadata) from traitlets.traitlets.MetaHasTraits
 |      Get a list of all the names of this class' traits.
 |      
 |      This method is just like the :meth:`trait_names` method,
 |      but is unbound.
 |  
 |  class_traits(**metadata) from traitlets.traitlets.MetaHasTraits
 |      Get a ``dict`` of all the traits of this class.  The dictionary
 |      is keyed on the name and the values are the TraitType objects.
 |      
 |      This method is just like the :meth:`traits` method, but is unbound.
 |      
 |      The TraitTypes returned don't know anything about the values
 |      that the various HasTrait's instances are holding.
 |      
 |      The metadata kwargs allow functions to be passed in which
 |      filter traits based on metadata values.  The functions should
 |      take a single value as an argument and return a boolean.  If
 |      any function returns False, then the trait is not included in
 |      the output.  If a metadata key doesn't exist, None will be passed
 |      to the function.
 |  
 |  trait_events(name=None) from traitlets.traitlets.MetaHasTraits
 |      Get a ``dict`` of all the event handlers of this class.
 |      
 |      Parameters
 |      ----------
 |      name: str (default: None)
 |          The name of a trait of this class. If name is ``None`` then all
 |          the event handlers of this class will be returned instead.
 |      
 |      Returns
 |      -------
 |      The event handlers associated with a trait name, or all event handlers.
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from traitlets.traitlets.HasTraits:
 |  
 |  cross_validation_lock
 |      A contextmanager for running a block with our cross validation lock set
 |      to True.
 |      
 |      At the end of the block, the lock's value is restored to its value
 |      prior to entering the block.
 |  
 |  ----------------------------------------------------------------------
 |  Static methods inherited from traitlets.traitlets.HasDescriptors:
 |  
 |  __new__(cls, *args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from traitlets.traitlets.HasDescriptors:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

容器的崛起——Docker与K8s的相爱相杀

容器的崛起 对于K8s启用docker,作为普通开发者的体感是,k8s不就是docker的集群操作吗?k8s弃用docker就像鱼反对水一样不可思议,那么这两个技术究竟是什么关系,Kubernetes 是如何一步步与 Docker 解耦的,请…

k8s学习-CKS真题-Runtime设置gVisor

目录题目环境搭建解题参考题目 该 cluster 使用 containerd 作为 CRI 运行时。containerd 的默认运行时处理程序是 runc。 containerd 已准备好支持额外的运行时处理程序 runsc (gVisor)。 Task 使用名为 runsc 的现有运行时处理程序,创建一个名为 untrusted 的 Ru…

MIPI D-PHYv2.5笔记(20) -- High-Speed Data-Clock Timing

PHY是在Forward Direction中的源同步接口(source synchronous interface)。无论是处于Forward还是Reverse信号模式,只能有一个时钟源。在Reverve Direction中,时钟是在Forward Direction中被发送的。 图1 Conceptual D-PHY Data a…

本地目录映射到公网访问

1 环境搭建 1.1 nodejs安装 首先是安装nodejs,下载地址:https://nodejs.org/zh-cn/download 选择windows exe版本直接下载。 解压可以得到如下文件: 然后添加环境变量保证在任意终端可以直接使用命令。 当然也可以直接下载msi文件进行安装…

AD8226ARZ-R7-ASEMI代理亚德诺AD8226ARZ-R7车规级芯片

编辑-Z AD8226ARZ-R7芯片参数: 型号:AD8226ARZ-R7 输入电压噪声:22 nV/√Hz 输出电压噪声:120 nV/√Hz 电流噪声:100 fA/√Hz 输入偏移:200μV 输出偏移:1000μV 输入偏置电流&#xff…

得物 API一站式协作平台的一些思考

1.背景 Mooncake是得物API一站式协作平台。从2022年3月份开始负责Mooncake,到现在已经一年了,回顾这一年,Mooncake大的阶段上,总共经历过两个版本: 1、Mooncake 1.0: 面向前端和客户端的mock平台,主要解决接口调用者…

PHP实现以函数的方式计算阶乘,使用函数输入数值逆序输出的两个代码程序

目录 前言 一、实现以函数的方式计算阶乘 1.1运行流程(思想) 1.2代码段 1.3运行截图 二、使用函数输入3个数求和,并以表单形式输出 2.1运行流程(思想) 2.2代码段 2.3运行截图 前言 1.因多重原因,…

项目沟通管理流程的6大规范步骤

1、建立沟通计划 需要对整个项目的沟通对象、沟通内容、沟通频率、沟通方法等各方面,进行计划和安排。尤其需明确沟通机制,建立完整的沟通计划。并根据项目沟通的具体情况,实时添加和修订计划,以保证沟通管理计划的持续适用性。 项…

电脑重装了系统开不了机怎么办?

我们的电脑办公用久后也会出现故障问题,例如卡顿反应慢等等,这时候就要进行重装系统了,但是很多小伙伴重装系统后会出现开不了机的问题,其实我们比较常见的也就是电脑重装系统开不了机的情况。有很多小伙伴反映自己不知道应该怎么…

阿里架构师惨遭“人员优化”,离职只留下一份Java面试进阶手册!!

前几天,一个认识了好几年在大厂工作的程序员朋友,年近30了,却被大厂以“人员优化”的名义无情被辞,据他说,有一个月散伙饭都吃了好几顿…… 在很多企业,都有KPI考核,然后在此基础上还会弄个“末…

【java】深入分析try with resouce的原理 java如何通过方法句柄的方式进行方法调用

这个代码如果是复制用去,非常简单,但是推导过程真的特别艰辛,十几二十行的代码 博主和某T吵了一下午,到最后某T给的写法还是错误的,总之博主能写出这个demo实属不易。推荐看到本博客的同学自己再去深入学习相关的内容&…

用SQL语句操作Oracle数据库--数据查询详解(下篇)

数据查询是数据库的核心操作。上一篇文章我们介绍了单表查询操作,本文将继续介绍另一种重要的查询类型—[ 多表查询 ](涉及多个表的数据查询)。 本文我们将使用以下三个表来进行查询操作: TABLE1: S(学生基本信息表) TABLE2: C(…

Maven环境搭建及配置

文章目录一、系统要求二、安装步骤1.JDK检查2.下载Maven3.配置Maven环境变量4.检查配置一、系统要求 项目要求JDKMaven 3.3 要求 JDK 1.7或以上Maven 3.2 要求 JDK 1.6 或以上 Maven 3.0/3.1 要求 JDK 1.5 或以上磁盘Maven 自身安装需要大约 10 MB 空间。除此之外,…

​破除“内卷”,什么才是高阶智能座舱更优方案?

下一代智能座舱雏形已现。 从多屏互动到舱内全场景交互,从中控娱乐快速延伸到更多元化的车内娱乐平台;越来越多元化功能集中上车,座舱空间的营造(包括氛围灯、香氛等)以及AR技术的应用等等,开始深刻影响着…

活动目录密码策略管理

员工使用的密码可以决定或破坏组织中的数据安全性。但是,知道员工通常不遵循良好的密码卫生习惯也就不足为奇了。从在本机工具(如 Windows Active Directory 组策略)中设置弱密码和通用密码到宽松的密码策略规则,有几个因素对密码…

基于DSP+FPGA的机载雷达伺服控制系统的硬件设计与开发(一)总体设计

2.1 功能要求及性能指标 2.1.1 功能要求 (1)具备方位和俯仰两轴运动的能力; (2)方位轴可实现预置、周扫和扇扫功能; (3)俯仰轴可实现预置功能。 2.1.2 性能指标 (1&#…

【英语】大学英语CET考试,听力题答题技巧笔记(3-4)与技巧总结

文章目录听力技巧课3(长选项关键词)听力技巧课4(所有划关键词的方法,真题带练)听力技巧总结(1-4)听力技巧课1&2:地址 听力技巧课3(长选项关键词) 上课老…

JWT 认证机制

Session 认证机制需要配合 Cookie 才能实现。由于 Cookie 默认不支持跨域访问,所以,当涉及到前端跨域请求后端按口的时候,需要做很多额外的配置,才能实现跨域 Session 认证。 JWT (英文全称: JSON Web Token)是目前最流行的跨域认…

LeetCode算法小抄--二叉搜索树

LeetCode算法小抄--二叉搜索树二叉搜索树(BST)寻找第 K 小的元素[230. 二叉搜索树中第K小的元素](https://leetcode.cn/problems/kth-smallest-element-in-a-bst/)二叉搜索树的转化[538. 把二叉搜索树转换为累加树](https://leetcode.cn/problems/convert-bst-to-greater-tree/…

AI提效工具|借助chatgpt快速读论文,快速总结、归纳、索引相似文章

目前新论文层出不穷,“快速阅读论文”成为研究者们一个必备能力。本文简单记录了近期出现的两个借助chatgpt来帮助我们快速读论文的“神器”,帮助大家快速上手应用,迅速提升论文阅读速度。 此外,本人也会定期更新记录一些类似的“…