diff --git a/docs/integration/framework/arduino.rst b/docs/integration/framework/arduino.rst index 092e05f23..95c86e402 100644 --- a/docs/integration/framework/arduino.rst +++ b/docs/integration/framework/arduino.rst @@ -41,7 +41,6 @@ installed, follow these configuration steps: 2. Go to ``lvgl`` and copy ``lv_conf_template.h`` as ``lv_conf.h`` into the Arduino Libraries directory next to the ``lvgl`` library folder. 3. Open ``lv_conf.h`` and change the first ``#if 0`` to ``#if 1`` to enable the content of the file 4. Set the color depth of you display in :c:macro:`LV_COLOR_DEPTH` -5. Set :c:macro:`LV_TICK_CUSTOM` Finally the layout with ``lv_conf.h`` should look like this: diff --git a/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino b/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino index 54ad04502..03ed8eb90 100644 --- a/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino +++ b/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino @@ -77,6 +77,9 @@ void setup() lv_init(); + /*Set a tick source so that LVGL will know how much time elapsed. */ + lv_tick_set_cb(millis); + /* register print function for debugging */ #if LV_USE_LOG != 0 lv_log_register_print_cb( my_print ); @@ -127,6 +130,5 @@ void setup() void loop() { lv_task_handler(); /* let the GUI do its work */ - lv_tick_inc(5); /* tell LVGL how much time has passed */ delay(5); /* let this time pass */ }