User Tools

Site Tools


No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s2:aih:lab:gfxonsite

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:edu:zmitac:s2:aih:lab:gfxonsite [2023/11/10 09:56] – pczekalskien:edu:zmitac:s2:aih:lab:gfxonsite [2023/11/10 10:14] (current) – pczekalski
Line 1: Line 1:
-====== Laboratory on the Internet of Things - Advanced IoT Hardware - on-site ======+====== Laboratory on the Internet of Things - Advanced IoT Hardware - on-site edition ======
 Laboratory guide for IoT AIH students on ESP32 graphical display programming: Laboratory guide for IoT AIH students on ESP32 graphical display programming:
   * ESP32 WROVER DEVKIT module - that includes (among others) dot-matrix LCD TFT display   * ESP32 WROVER DEVKIT module - that includes (among others) dot-matrix LCD TFT display
Line 237: Line 237:
   * Bind the controller to the GPIO pin   * Bind the controller to the GPIO pin
   * Write to the controller (not to the PIN!) providing a duty cycle related to the resolution selected above - every call persistently sets the PWM duty cycle until there is the next call to the function setting duty cycle.   * Write to the controller (not to the PIN!) providing a duty cycle related to the resolution selected above - every call persistently sets the PWM duty cycle until there is the next call to the function setting duty cycle.
 +<pagebreak>
 ===== Laboratory scenarios ===== ===== Laboratory scenarios =====
 In general, you will program using the Arduino framework. \\ In general, you will program using the Arduino framework. \\
Line 244: Line 244:
 <note warning>ESP32 framework uses C++ optimiser while compiling the source code. It is common that C++ traces unused code and removes/optimises it to minimise CPU effort. As your tasks to be completed involve integer and floating-point performance evaluation, it is essential to use the result somewhere, i.e. do a dummy display of the final value on the screen. Otherwise, the C++ compiler may remove this section of the code, and you won't be able to obtain reasonable results because your code may be already trunk and not executed at all!</note> <note warning>ESP32 framework uses C++ optimiser while compiling the source code. It is common that C++ traces unused code and removes/optimises it to minimise CPU effort. As your tasks to be completed involve integer and floating-point performance evaluation, it is essential to use the result somewhere, i.e. do a dummy display of the final value on the screen. Otherwise, the C++ compiler may remove this section of the code, and you won't be able to obtain reasonable results because your code may be already trunk and not executed at all!</note>
  
-<note important>FreeRTOS, once the task is created and scheduled for execution, executes the task infinitely! It means your function implementing the task will be executed again and again. If you intended to run a looped task, that is pretty OK. If you intend to run the one-off task, then you need to explicitly call:+<note important>FreeRTOS, once the task is created and scheduled for execution, executes the task infinitely! It means your function implementing the task will be executed again and again. If you intended to run a looped task, that is pretty OK. If you intend to run the one-off task, then you need to call explicitly:
 <code c> <code c>
 ... ...
Line 251: Line 251:
 </code> </code>
  as a last line of your function implementing the task.</note>  as a last line of your function implementing the task.</note>
 +
 +==== Task 0 ====
 +This warm-up lab scenario lets you understand and prepare a code for presenting your data on the display (LCD and e-Paper).\\
 +Implement a program that on the first screen presents, alternatively (each for 5s), your team number and names of the team members then presents a picture of choice. (logo, photo, meme).
 +
 ==== Task 1 ==== ==== Task 1 ====
 Evaluate single-core performance for integer computation. Perform two experiments: with the task bound to the APP core and separately to the PRO core. First, observe if there is a difference in measurements. Then, propose an algorithm that can generate a complexity of integer computation observable and measurable.  Evaluate single-core performance for integer computation. Perform two experiments: with the task bound to the APP core and separately to the PRO core. First, observe if there is a difference in measurements. Then, propose an algorithm that can generate a complexity of integer computation observable and measurable. 
Line 256: Line 261:
  
 ==== Task 2 ==== ==== Task 2 ====
-Evaluate multicore performance for integer computation. Perform single-core computation, running your algorithm at least 4 times (any even number works here). Then execute in parallel (2x2). Observe if there is a difference in measurements. Propose an algorithm that can generate a complex, observable, measurable integer computation. +Evaluate multicore performance for integer computation. Perform single-core computation, running your algorithm at least 4 times (any even number works here). Then execute in parallel (2x2). Observe if there is a difference in measurements. Propose an algorithm to generate a complex, observable, measurable integer computation. 
 Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using parts of code for the Dhrystone benchmark [[https://en.wikipedia.org/wiki/Dhrystone|https://en.wikipedia.org/wiki/Dhrystone]]. Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using parts of code for the Dhrystone benchmark [[https://en.wikipedia.org/wiki/Dhrystone|https://en.wikipedia.org/wiki/Dhrystone]].
  
Line 264: Line 269:
  
 ==== Task 4 ==== ==== Task 4 ====
-Evaluate multicore performance for floating-point computation. First, perform single-core computation, running your algorithm at least 4 times (any even number works here) your algorithm. Then execute in parallel (i.e. 2x2). Finally, propose an algorithm that can generate a complex enough floating-point, observable and measurable computation. +Evaluate multicore performance for floating-point computation. First, perform single-core computation, running your algorithm at least 4 times (any even number works here) your algorithm. Then execute in parallel (i.e. 2x2). Finally, propose an algorithm to generate a complex enough floating-point, observable and measurable computation. 
 Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using FP parts of code for the Whetstone benchmark [[https://en.wikipedia.org/wiki/Whetstone_(benchmark)|https://en.wikipedia.org/wiki/Whetstone_(benchmark)]]. Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using FP parts of code for the Whetstone benchmark [[https://en.wikipedia.org/wiki/Whetstone_(benchmark)|https://en.wikipedia.org/wiki/Whetstone_(benchmark)]].
  
  
 ==== Report ==== ==== Report ====
-Include algorithm definition and measurements, statistical analysis of the results (at least average and standard deviation) and a summary. +Task 0: besides the general description, include source code and screenshots. 
 +Tasks 1 and onwards: include algorithm definition and measurements, statistical analysis of the results (at least average and standard deviation) and a summary.
  
 +<pagebreak>
 ===== Resources ===== ===== Resources =====
   - [[https://www.espressif.com/en/products/hardware/esp-wrover-kit/resources|ESP32 WROVER kit starting page]]   - [[https://www.espressif.com/en/products/hardware/esp-wrover-kit/resources|ESP32 WROVER kit starting page]]
-  - [[https://docs.espressif.com/projects/esp-idf/en/latest/hw-reference/get-started-wrover-kit.html|Hardware definition (pinouts, gpios, etc.)]] +  - [[https://docs.espressif.com/projects/esp-idf/en/latest/hw-reference/get-started-wrover-kit.html|Hardware definition (pinouts, GPIOs, etc.)]] 
   - [[https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf|ESP-WROVER-KIT V4.1 schematic]]   - [[https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf|ESP-WROVER-KIT V4.1 schematic]]
   - [[https://docs.m5stack.com/en/core/coreink|M5 Stack Core Ink (e-Paper) module documentation]]   - [[https://docs.m5stack.com/en/core/coreink|M5 Stack Core Ink (e-Paper) module documentation]]
   - [[https://javl.github.io/image2cpp/|On-line bitmap (image) to memory content (cpp) converter]]   - [[https://javl.github.io/image2cpp/|On-line bitmap (image) to memory content (cpp) converter]]
   - [[https://savjee.be/2020/01/multitasking-esp32-arduino-freertos/|FreeRTOS - multitasking with ESP32 explained]]   - [[https://savjee.be/2020/01/multitasking-esp32-arduino-freertos/|FreeRTOS - multitasking with ESP32 explained]]
en/edu/zmitac/s2/aih/lab/gfxonsite.1699606580.txt.gz · Last modified: by pczekalski