Skip to content

Camera Usage in Seeed Studio XIAO ESP32S3 Sense | Seeed Studio Wiki #260

Answered by Mjrovai
giscus[bot] bot asked this question in Q&A
Discussion options

You must be logged in to vote

Some observations about the camera code on "Project I: Making a handheld camera":

  1. If you want to use the SD card reader available on the XIAO ESP32S Sense, you should change the SD.begin(D2) to SD.begin(21), so it is not necessary to cut off J3.

  2. The file saved on the SD card is not JPEG. It is raw data. It is necessary to convert the raw image to jpeg before saving. This is the code:
    if(display_is_pressed()){
    Serial.println("display is touched");
    char filename[32];
    sprintf(filename, "/image%d.jpg", imageCount);

    // Save photo to file
    size_t out_len = 0;
    uint8_t* out_buf = NULL;
    esp_err_t ret = frame2jpg(fb, 12, &out_buf, &out_len);
    if (ret == false) {
    Serial.printf("JPEG conversion fai…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@MatthewJeffson
Comment options

Answer selected by MatthewJeffson
Comment options

You must be logged in to vote
1 reply
@MatthewJeffson
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@MatthewJeffson
Comment options

@Peterhj05
Comment options

@MatthewJeffson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants