No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s2:iot:aih
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:edu:zmitac:s2:iot:aih [2021/11/02 12:30] – [ESP32 WROVER DEVKIT] pczekalski | en:edu:zmitac:s2:iot:aih [2022/11/15 15:49] (current) – Pczekalski | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| You can access the distant laboratory (VREL) interface here: [[http:// | You can access the distant laboratory (VREL) interface here: [[http:// | ||
| - | You need to register an account (unless you have one, already). A short video presenting the account creation process and first steps is here: [[https:// | + | You need to register an account (unless you have one already). A short video presenting the account creation process and first steps is here: [[https:// |
| ===== Hardware ===== | ===== Hardware ===== | ||
| Line 14: | Line 14: | ||
| Below we present hardware details on the two modules: | Below we present hardware details on the two modules: | ||
| ==== ESP32 WROVER DEVKIT ==== | ==== ESP32 WROVER DEVKIT ==== | ||
| - | This board is double-sided, on one side you will find an LCD screen (so-called **back**) on the other side (**front**) there are GPIOs connectors you connect sensors and actuators to, TF (microSD) card slot with SPI reader and an RGB LED diode (among others).\\ Please note you can directly observe only the **back** side of the module via VREL node's camera. | + | This board is double-sided; on one side, you will find an LCD screen (so-called **back**) on the other side (**front**) there are GPIOs connectors you connect sensors and actuators to, TF (microSD) card slot with SPI reader and an RGB LED (among others).\\ Please note you can directly observe only the **back** side of the module via the VREL node's camera. |
| <figure ESPWRoverDevKitFront> | <figure ESPWRoverDevKitFront> | ||
| Line 28: | Line 28: | ||
| ESP32 provides a number of GPIOs to the developers, but some of them are hard-bound to their features as connected on the development board. | ESP32 provides a number of GPIOs to the developers, but some of them are hard-bound to their features as connected on the development board. | ||
| - | <note important> | + | <note important> |
| - | Following | + | The following |
| <table tabWROVER> | <table tabWROVER> | ||
| < | < | ||
| Line 49: | Line 49: | ||
| === Configuring VREL - platformio.ini === | === Configuring VREL - platformio.ini === | ||
| Correct configuration is necessary to build and deploy your code.\\ | Correct configuration is necessary to build and deploy your code.\\ | ||
| - | For ESP32 WROVER DEVKIT, a good starting point is the following content for '' | + | For ESP32 WROVER DEVKIT, a good starting point is the following content for the '' |
| < | < | ||
| [env: | [env: | ||
| Line 55: | Line 55: | ||
| board = esp-wrover-kit | board = esp-wrover-kit | ||
| framework = arduino | framework = arduino | ||
| - | upload_port | + | lib_ldf_mode |
| - | lib_deps = | + | lib_deps = |
| - | adafruit/ | + | |
| - | Wire | + | |
| - | espressif/WROVER_KIT_LCD | + | |
| </ | </ | ||
| == Practice: handling LCD display == | == Practice: handling LCD display == | ||
| Write Hello World on the LCD screen. \\ | Write Hello World on the LCD screen. \\ | ||
| - | Using an LCD display | + | Using an LCD and a camera, you can observe it through, are your only interface to the devkit. |
| - | Type textual "Hello World" on the screen. | + | Type textual "Hello World" on the screen. |
| - | To use LCD you must include libraries. The beginning of your '' | + | To use LCD, you must include libraries. The beginning of your '' |
| <code c> | <code c> | ||
| ... | ... | ||
| Line 74: | Line 74: | ||
| #include < | #include < | ||
| #include < | #include < | ||
| - | #include < | ||
| #include < | #include < | ||
| ... | ... | ||
| Line 99: | Line 98: | ||
| tft.setCursor(0, | tft.setCursor(0, | ||
| tft.setTextColor(WROVER_WHITE); | tft.setTextColor(WROVER_WHITE); | ||
| - | tft.setTextSize(1); //Set font size | + | tft.setTextSize(2); //Set font size |
| tft.println(" | tft.println(" | ||
| ... | ... | ||
| Line 106: | Line 105: | ||
| ==== TTGO T5 v.2.2 e-Paper ==== | ==== TTGO T5 v.2.2 e-Paper ==== | ||
| - | TTGO (aka LILYGO) ESP32 module with integrated e-Paper 2.9-inch display is a robust solution for e-Paper development. Here you will learn basics | + | TTGO (aka LILYGO) ESP32 module with integrated e-Paper 2.9-inch display is a robust solution for e-Paper development. Here you will learn the basics |
| The TTGO T5 module also contains a speaker (buzzer), SPI TF card reader, and a limited GPIO. It is advertised as an electronic badge. | The TTGO T5 module also contains a speaker (buzzer), SPI TF card reader, and a limited GPIO. It is advertised as an electronic badge. | ||
| Line 121: | Line 120: | ||
| ESP32 provides a number of GPIOs to the developers, but some of them are hard-bound to their features as connected on the development board. | ESP32 provides a number of GPIOs to the developers, but some of them are hard-bound to their features as connected on the development board. | ||
| - | <note important> | + | <note important> |
| <table tabTTGO> | <table tabTTGO> | ||
| Line 133: | Line 132: | ||
| === Built-in integrated e-Paper display === | === Built-in integrated e-Paper display === | ||
| - | The e-Paper (e-Ink) display is a bi-coloured, | + | The e-Paper (e-Ink) display is a bi-coloured, |
| === Configuring VREL - platformio.ini === | === Configuring VREL - platformio.ini === | ||
| Correct configuration is necessary to build and deploy your code.\\ | Correct configuration is necessary to build and deploy your code.\\ | ||
| - | For ESP32 TTGO T5 v2.2, a good starting point is the following content for '' | + | For ESP32 TTGO T5 v2.2, a good starting point is the following content for the '' |
| < | < | ||
| [env: | [env: | ||
| Line 143: | Line 142: | ||
| board = esp-wrover-kit | board = esp-wrover-kit | ||
| framework = arduino | framework = arduino | ||
| - | lib_deps = | + | lib_deps = adafruit/ |
| - | adafruit/ | + | |
| Wire | Wire | ||
| zinggjm/ | zinggjm/ | ||
| Line 151: | Line 149: | ||
| == Practice: handling e-Paper display == | == Practice: handling e-Paper display == | ||
| Write Hello World on the e-Paper screen. \\ | Write Hello World on the e-Paper screen. \\ | ||
| - | Using e-Paper display and a camera, you can observe it through, are your only interface to the TTGO. Get familiar with handling e-Paper and give it a short practice, as present | + | Using an e-paper display and a camera, you can observe it through, are your only interface to the TTGO. Therefore, please get familiar with handling e-Paper and give it a short practice, as presented |
| - | Type textual "Hello World" on the screen. | + | Type textual "Hello World" on the screen. |
| - | To use e-Paper you must include libraries. | + | To use e-Paper, you must include libraries. |
| <code c> | <code c> | ||
| ... | ... | ||
| #include < | #include < | ||
| - | #include < | + | #include < |
| #include < | #include < | ||
| #include " | #include " | ||
| Line 178: | Line 176: | ||
| </ | </ | ||
| - | Note, by the e-Paper related display drivers there is also a font definition library should be included: | + | Note, by the e-Paper related display drivers; there is also a font definition library |
| <code c> | <code c> | ||
| ... | ... | ||
| Line 217: | Line 215: | ||
| </ | </ | ||
| - | Note, for ease, there are predefined values | + | Note, for ease, predefined values present black and white colour display: '' |
| - | <note tip>You need to use a font to draw on the e-Ink screen. Use one of the definitions provided along with GxEPD library.</ | + | <note tip>You need to use a font to draw on the e-Ink screen. Use one of the definitions provided along with the GxEPD library.</ |
| <note tip>In the laboratory node #25, the e-ink display has been mounted landscape. It means, to keep text horizontal, you need to use: | <note tip>In the laboratory node #25, the e-ink display has been mounted landscape. It means, to keep text horizontal, you need to use: | ||
| Line 228: | Line 226: | ||
| ==== A special notes on PWM in ESP32 ==== | ==== A special notes on PWM in ESP32 ==== | ||
| - | PWM is frequently used to control analogue-style, | + | PWM is frequently used to control analogue-style, |
| - | Classical | + | The classical |
| - | ESP32 has sixteen (0 to 15) PWM channels (controllers) that can be freely bound to any of the regular GPIOs.\\ ESP32 can use various " | + | ESP32 has sixteen (0 to 15) PWM channels (controllers) that can be freely bound to any of the regular GPIOs. |
| - | To use PWM in ESP32 one must perform the following steps: | + | To use PWM in ESP32, one must perform the following steps: |
| * Configure GPIO pin as '' | * Configure GPIO pin as '' | ||
| * Initiate PWM controller with fixing PWM frequency and resolution | * Initiate PWM controller with fixing PWM frequency and resolution | ||
| Line 239: | Line 237: | ||
| ===== Laboratory scenarios ===== | ===== Laboratory scenarios ===== | ||
| - | In general, you will program using the Arduino framework, remotely via a web interface | + | In general, you will program using the Arduino framework, remotely via a web interface |
| - | You will also use FreeRTOS functions to handle multicore parallel programming to perform tasks, as presented | + | As presented during the lecture, you will also use FreeRTOS functions to handle multicore parallel programming to perform tasks, as demonstrated |
| - | <note warning> | + | <note warning> |
| - | <note important> | + | <note important> |
| <code c> | <code c> | ||
| ... | ... | ||
| Line 252: | Line 250: | ||
| as a last line of your function implementing the task.</ | as a last line of your function implementing the task.</ | ||
| ==== Task 1 ==== | ==== Task 1 ==== | ||
| - | Evaluate single-core performance for integer computation. Perform two experiments: | + | Evaluate single-core performance for integer computation. Perform two experiments: |
| - | Perform at least 10 measurements for each experiment. Consider using parts of code for Dhrystone benchmark [[https:// | + | Perform at least 10 measurements for each experiment. Consider using parts of code for the Dhrystone benchmark [[https:// |
| ==== Task 2 ==== | ==== Task 2 ==== | ||
| - | Evaluate | + | Evaluate |
| - | Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using parts of code for Dhrystone benchmark [[https:// | + | Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using parts of code for the Dhrystone benchmark [[https:// |
| ==== Task 3 ==== | ==== Task 3 ==== | ||
| - | Evaluate single-core performance for floating-point computation. Perform two experiments: | + | Evaluate single-core performance for floating-point computation. Perform two experiments: |
| Perform at least 10 measurements for each experiment. Consider using FP parts of code for Whetstone benchmark [[https:// | Perform at least 10 measurements for each experiment. Consider using FP parts of code for Whetstone benchmark [[https:// | ||
| ==== Task 4 ==== | ==== Task 4 ==== | ||
| - | Evaluate | + | Evaluate |
| Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using FP parts of code for Whetstone benchmark [[https:// | Perform at least 20 measurements for each experiment (10 serial + 10 parallel). Consider using FP parts of code for Whetstone benchmark [[https:// | ||
en/edu/zmitac/s2/iot/aih.1635852656.txt.gz · Last modified: by pczekalski
