1 Star 0 Fork 1

VENTIM / 22.7 esp32cam多功能摄像机

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
esp32cam_TFT1 文字图形ok.txt 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
//配置部分参考
//https://blog.csdn.net/qq_40181592/article/details/119176805
#include <SPI.h> //导入库
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
//
//esp32 cam 可用引脚: io 0、1、2、3、4、12、13、14、15、16、33
//在TFT_eSPI 的 User_Setup.h下设置引脚: 没写的不接io
//#define TFT_MOSI 13
//#define TFT_SCLK 14
//#define TFT_CS 15 // Chip select control pin
//#define TFT_DC 2 // Data Command control pin
//#define TFT_RST 12
void setup() {
Serial.begin(115200);
Serial.println("hello");
// put your setup code here, to run once:
tft.init(); //初始化
tft.fillScreen(TFT_BLACK); //屏幕颜色
tft.setCursor(10, 10, 1); //设置起始坐标(10, 10),2 号字体
tft.setTextColor(TFT_YELLOW); //设置文本颜色为白色
tft.setTextSize(2); //设置文字的大小 (1~7)
tft.println("TFT_Text"); //显示文字
tft.fillCircle(30,30,10,TFT_BLUE); //画圆
tft.drawLine(10,50, 118, 50, TFT_WHITE); //画线
tft.drawPixel(70,70,TFT_RED); //画点
tft.setTextColor(TFT_WHITE,TFT_BLUE); //设置文字颜色和背景颜色
tft.setCursor(10, 80, 1); //设置起始坐标(10, 10),2 号字体
tft.println("TFT_Text"); //显示文字
}
void loop() {
Serial.println("running");
delay(1000);
// put your main code here, to run repeatedly:
}
C++
1
https://gitee.com/ventim/esp32cam-camera.git
git@gitee.com:ventim/esp32cam-camera.git
ventim
esp32cam-camera
22.7 esp32cam多功能摄像机
master

搜索帮助