ESP32- 4.3inch Display configuration

2

Comments

  • Thanks for verifying the code, it seems like both my displays are faulty. Both 4.3inch displays. I ordered a 50inch and it work well.

  • @jdebruyn said:
    Thanks for verifying the code, it seems like both my displays are faulty. Both 4.3inch displays. I ordered a 50inch and it work well.

    Hello,
    May I kindly ask will the 4.3-inch display work if you upload the firmware according to this instruction: https://forum.elecrow.com/index.php?p=/discussion/510/how-to-install-the-factory-demo-firmware-with-flash-download-tool/p1?new=1?

  • I will upload the firmware this afternoon.

  • I am having another question, hope somebody can assist. On my 50inch display I am running a Squareline screen configuration where I sent two analog signals (Potentiometers) data and 12 digital signals to a receiver via ESP_NOW. I do get the analog signals but no matter what settings I configure it, I fail to get the digital signal. The problem is with the transmitter 50inch as it does not change state there. I copied the youtube settings for the lamp ON OFF and try to see the state on serial print but it remains unchanged.
    Any suggestion on how the Squareline and display setup should look like?

  • @jdebruyn said:
    I am having another question, hope somebody can assist. On my 50inch display I am running a Squareline screen configuration where I sent two analog signals (Potentiometers) data and 12 digital signals to a receiver via ESP_NOW. I do get the analog signals but no matter what settings I configure it, I fail to get the digital signal. The problem is with the transmitter 50inch as it does not change state there. I copied the youtube settings for the lamp ON OFF and try to see the state on serial print but it remains unchanged.
    Any suggestion on how the Squareline and display setup should look like?

    Hi,
    Could you please send us the program so we can check the problem?

  • Squareline file. Or do you need the file I loaded on display.

  • Attach the code I loaded onto my display.
    On Screen1 I still needs to complete the temperature and add a clock to show time. There are a couple more screens to add, but when I know how to sent one analog signal I will know how to do the rest.

  • I uploaded the firmware and the screen don't show anything. Do I need to upload all files or one at a time as I did. After loading it show AP: 84FCE66B3331 STA: 84FCE66B3330
    BT: 84FCE66B3332 ETHERNET:
    and blue Finish show but bottom bar do not show loading.

  • Hello @jdebruyn ,
    I noticed that you used the delay function here, but this delay function affects the execution of the lv_timer_handler function, which is the function that ensures that LVGL is running properly, and it needs to be executed every 5ms, so you may find that there is a delay in updating the screen while your project is running or even stuck.

    I suggest you remove the delay function and use a timer to execute this part of the code. If you must delay, I would suggest you use non-blocking delay code.

    example:
    ` ... //more code from setup function

    ui_init(); // UI function that comes from ui.c
    
    lv_timer_create(my_timer, 100, NULL); //add this line to create a timer
    
    Serial.println("Setup done");
    

    }

    void my_timer(lv_timer_t * timer)
    {
    myData2.Slider1 = lv_slider_get_value(ui_Slider1);
    myData2.Slider2 = lv_slider_get_value(ui_Slider2);
    myData2.BTN_Cut_Left2 = lv_obj_has_state(ui_BTN_Cut_Left2, LV_STATE_CHECKED) ? 1 : 0;
    myData2.BTN_Cut_Left2 =lv_event_get_code(ui_BTN_Cut_Left2);
    // Send message via ESP-NOW
    esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &myData2, sizeof(myData2));

    if (result == ESP_OK) {
        Serial.println("Sent with success");
    } else {
        Serial.println("Error sending the data");
    }
    
    Serial.print("BTN_Cut_Left2 State: ");//test
    Serial.println(myData2.BTN_Cut_Left2);//test
    Serial.print(" Ear: ");
    Serial.println(lv_slider_get_value(ui_Slider1));//working
    Serial.println();
    Serial.print(" Main: ");
    Serial.println(lv_slider_get_value(ui_Slider2));//working
    Serial.println();
    Serial.print(" AdjustUP: ");//test
    Serial.print("Select1: ");//test
    //Serial.println(Select1);//test
    

    }

    void loop() {

    lv_timer_handler();
    delay(5);
    

    }
    `

    Then, noticed that in your events, you call the selectX() functions, I found those functions in the ui_events.c file, but none of them have added code, only the AdjustUP, and AdjustDOWN functions do have added code, which I'm guessing are the two analogs you said you described? And the 12 select functions that have no code added to them are the ones you need to use to send digital quantities? But as of now, there is no code in the functions, is that the reason why they are not receiving the digital quantities you are describing? Or is it that you can't provide that part of the code for some reason? I need more detailed information to be able to pinpoint the problem for you.


  • Nice to hear that it seems jdebruyn received two fautly screens from @Elecrow . @Elecrow Could you examine my example from frist page and tell me if my board is also faulty?

Sign In or Register to comment.