内存笔记
/
文章
分类
标签
时间线
Github
/
文章
分类
标签
时间线
Github
web 1python 6人工智能 17c 2数据结构 1线性代数 16esp32 1
[ESP32]点亮LED灯

Date: 2025/3/4Category: c, esp32Tag: c, esp32

实操步骤:

1.将15号pin连接到指定的LED灯的针脚 (硬件准备)

2.复制basic中的blink示例的代码

3.通过宏定义定下输出的端口 #define LED_BUILTIN 15

4.选择开发板:工具->开发板->ESP32 DEV Module

5.再选择对应的端口

6.上传

示例代码

#define LED_BUILTIN 15

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}
[数据结构]顺序表

Date: 2025/2/24Category: c, 数据结构Tag: c语言, 数据结构, 线性表

在顺序表中,每一个元素的内存空间是连续的,可以通过下标与首地址直接计算出对应元素的地址。类似于数组,因此在线性表中,顺序表的效率是极高的。

定义

typedef struct{
	ContentType *content;
	int length;
	
}SList;
蜀ICP备2024116061号-1 川公网安备51140202000488号