pico-v0.37-esp-bitmap
alanbjohnston 3 years ago committed by GitHub
parent ccfd432eca
commit 17e85c6ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,8 +13,8 @@ static esp_err_t init_camera();
#define FORMAT_SPIFFS_IF_FAILED true #define FORMAT_SPIFFS_IF_FAILED true
camera_fb_t *pic; camera_fb_t *pic;
//File inFile; SSTV_config_t* currentSSTV;
//File outFile; uint8_t* bitmap;
void setup() { void setup() {
// put your setup code here, to run once: // put your setup code here, to run once:
@ -29,6 +29,8 @@ void setup() {
if (init_camera() == ESP_OK) if (init_camera() == ESP_OK)
{ {
bitmap = (uint8_t*) malloc (320 * 256 * 3 + 200);
config_camera(); config_camera();
if (!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)) { if (!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)) {
@ -66,9 +68,19 @@ void loop() {
*/ */
// listDir(SPIFFS, "/", 0); // listDir(SPIFFS, "/", 0);
char filename[] = "/cam.bin"; /// char filename[] = "/cam.bin";
/// save_camera_image(filename);
pic = esp_camera_fb_get();
save_camera_image(filename); if (!pic)
{
Serial.println("Failed to get camera image!");
delay(10000);
return;
}
bitmap = pic->buf;
picosstvpp(); picosstvpp();

Loading…
Cancel
Save

Powered by TurnKey Linux.