摘要: Linux 定时任务调度 定时执行Linux命令 个人任务调度 $crontab -e 第一次输入后会让你选择编译器,在Ubuntu系统中nano 编译器是比较好用的,然后会打开一个文件 更改配置文件格式 前面有5个站位符后面是需要执行的命令 例 */1 * * * * ls />> /home/n 阅读全文
posted @ 2022-11-09 07:42 ~内个臣呐~ 阅读(203) 评论(0) 推荐(0)
摘要: linux|编写一个shell脚本 编写第一个shell $vim hello.sh #!/bin/bash echo"hello world" $chmod 777 hello.sh $./hello.sh Shell变量 系统变量 用户自定义变量 定义shell变量 变量不可用数字开头 等号两侧 阅读全文
posted @ 2022-11-09 07:42 ~内个臣呐~ 阅读(415) 评论(0) 推荐(0)
摘要: Linux进程管理 linux中每一个运行中的程序叫做进程,每个运行中的进程都会分配一个ID号 大多系统进程运行在后台,常驻在系统中直到关机才会结束 查看Linux的系统进程 ps $ps $ps -ef $ps -aux newland@newland-VirtualBox:~$ ps -aux 阅读全文
posted @ 2022-11-09 07:42 ~内个臣呐~ 阅读(35) 评论(0) 推荐(0)
摘要: 使用esp32连接MQTT服务器 使用Arduino库 PubSubClient.h 修改PubSubClient.h文件 基本初始化 引入头文件 #include "PubSubClient.h" const char*ssid ="XXXX"; //ESP32连接的WiFi账号 const ch 阅读全文
posted @ 2022-11-05 20:54 ~内个臣呐~ 阅读(464) 评论(0) 推荐(0)
摘要: LCD屏幕使用方法 首先引入头文件 #include <TFT_eSPI.h> #include <SPI.h> 创建对象 TFT_eSPI tft = TFT_eSPI(); 初始化TFT屏幕 tft.init();或者tft.begin(); 清屏 void fillScreen(uint32_ 阅读全文
posted @ 2022-11-03 09:33 ~内个臣呐~ 阅读(438) 评论(0) 推荐(1)
摘要: esp32 OLED_mini手表 实际效果 https://www.bilibili.com/video/BV16t4y1M758/ 代码 #include "Wire.h" #include "SSD1306.h" #include <WiFi.h> #include <TimeLib.h> # 阅读全文
posted @ 2022-11-02 15:00 ~内个臣呐~ 阅读(324) 评论(0) 推荐(0)
摘要: esp32 OLED和呼吸灯 代码 #include <Wire.h> #include "SSD1306.h" #include <WiFi.h> #include <TimeLib.h> #include <NtpClientLib.h> //设置时区为东8 int8_t timeZone = 阅读全文
posted @ 2022-10-31 22:30 ~内个臣呐~ 阅读(185) 评论(0) 推荐(0)
摘要: 使用PWM实现LED呼吸灯 esp32开发板的几乎所有引脚支持PWM输出 1、ledcSetup()函数 double ledcSetup(uint8_t chan, double freq, uint8_t bit_num) 功能为设置LEDC通道对应的频率和计数复位(占空比) uint8_t c 阅读全文
posted @ 2022-10-31 22:30 ~内个臣呐~ 阅读(1153) 评论(0) 推荐(0)
摘要: 代码 #include <Wire.h> #include "SSD1306.h" unsigned char image[] = { /*-- 调入了一幅图像:C:\Users\chen\Desktop\未命名绘图.bmp --*/ /*-- 宽度x高度=32x32 --*/ 0x00,0x00, 阅读全文
posted @ 2022-10-31 22:29 ~内个臣呐~ 阅读(135) 评论(0) 推荐(0)
摘要: esp32点亮4pinOLED屏幕 接线方法 屏幕是4pin的使用iic的协议使用SSD1306屏库 测试代码 #include <Wire.h> #include "SSD1306.h" SSD1306 display(0x3c, 21, 18); void setup() { display.i 阅读全文
posted @ 2022-10-31 08:44 ~内个臣呐~ 阅读(1929) 评论(0) 推荐(0)