STM32笔记

STM32F103学习笔记 GPIO初始化和读写操作 STM32的GPIO引脚有多种模式使用,在使用前需要进行配置。 LED灯实验 #include "stm32f10x.h" #define LED GPIO_Pin_All void delay(u32 i) { while(i--); } //LED的GPIO初始化程序 void LED_Init() { GPIO_InitTypeDef GPIO_InitStructure; //GPIO时钟初始化 SystemInit(); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE); //配置GPIO模式和端口 GPIO_InitStructure.GPIO_Pin = LED; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽模式 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOC,&GPIO_InitStructure); //初始化...

8 min · 3645 字 · Niuhe

Virtualbox虚拟机连接雷达和UART串口

目前ROS只支持Linux版,如果不方便装Linux主机,可以通过以太网桥接的方式获得雷达的数据帧;对一些串口传感器,也可以通过Serial to USB,然后在virtualbox里选择对应的USB设备进行调试。 本方法适用于通过以太网/WLAN来传送数据包的雷达。 使用Virtualb...

1 min · 203 字 · Niuhe