Arduino Guide
#include "M5TimerCAM.h"
void setup() {
TimerCAM.begin();
if (!TimerCAM.Camera.begin()) {
Serial.println("Camera Init Fail");
return;
}
Serial.println("Camera Init Success");
TimerCAM.Camera.sensor->set_pixformat(TimerCAM.Camera.sensor,
PIXFORMAT_JPEG);
TimerCAM.Camera.sensor->set_framesize(TimerCAM.Camera.sensor,
FRAMESIZE_QVGA);
TimerCAM.Camera.sensor->set_vflip(TimerCAM.Camera.sensor, 1);
TimerCAM.Camera.sensor->set_hmirror(TimerCAM.Camera.sensor, 0);
}
void loop() {
if (TimerCAM.Camera.get()) {
Serial.printf("pic size: %d\n", TimerCAM.Camera.fb->len);
TimerCAM.Camera.free();
}
}
函数原型:
bool begin();
功能说明:
传入参数:
返回值:
函数原型:
bool get();
功能说明:
传入参数:
返回值:
函数原型:
bool free();
功能说明:
传入参数:
返回值: