Difference: ST7735TFTDisplay (1 vs. 12)

Revision 122021-02-06 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 20 to 20
 img_8011.png

The font files are actually executable Python code that you can run on CPython on your laptop. Try to run e.g. courier20.py and sysfont.py. You will see a letter, which in case of the courier font will be upright(hmap() returns true), while in the sysfont case it will be turned clockwise by 90 ° (hmap() returns false). Can you write a piece of code that will transform the sysfont glyph into an upright layout?

Changed:
<
<

Exercise 3: Graphical User Interface (GUI) elements from nanogui

>
>

Exercise 3: Graphical User Interface (GUI) elements from nanogui

  Create 2 meters, one for temperature (0..50) and one for humidity (0..100). Generate dummy temperature and humidity values and display them in the meters.
Line: 32 to 32
 Create a plot of a damped oscillator

img_8020.png

Changed:
<
<

Exercise 5: A new GUI element (bonus point)

>
>

Exercise 5: A new GUI element (bonus point)

 
Changed:
<
<
Create a voltmeter application to measure voltages. You will need a new Scale GUI element similar to the nanogui Dial, but designed by yourself, which displays the voltage read from an ADC. Values to be displayed must range from 0 to 5V. The photo below shows the voltmeter, reading a voltage of 1V.
>
>
Create a voltmeter application to measure voltages. You will need a new Scale GUI element similar to the nanogui Dial, but designed by yourself, which displays the voltage read from an ADC. Values to be displayed must range from 0 to 5V. The photo below shows the voltmeter, reading a voltage of 1V.
  img_8025.png

Exercise 6: Super Mario, a bit of a challenge!

Revision 112020-08-09 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 52 to 52
 This is how it will look like:
img_8026.png img_8024.png

Added:
>
>
The exercise sheet in odt format:

https://afnog.iotworkshop.africa/pub/IoT_Course_English/ST7735TFTDisplay/exercise_10.odt

  -- Uli Raich - 2020-07-26

Comments

Line: 68 to 71
 
META FILEATTACHMENT attachment="img_8024.png" attr="" comment="" date="1596006561" name="img_8024.png" path="img_8024.png" size="174956" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8025.png" attr="" comment="" date="1596026971" name="img_8025.png" path="img_8025.png" size="186133" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8026.png" attr="" comment="" date="1596108883" name="img_8026.png" path="img_8026.png" size="411956" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="exercise_10.odt" attr="" comment="" date="1596963933" name="exercise_10.odt" path="exercise_10.odt" size="1698065" user="UliRaich" version="1"

Revision 102020-07-30 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 50 to 50
 Attenuate the input signal by 11 dB. When reading out the ADC with the joystick in its rest position you will obtain values of around 1830. If the value gets lower than 1000 Mario runs left, for values > 2000 he runs right and for values 1000..2000 he is standing still. Same for up and down on the second ADC channel. The ADC channels are only accessible on the ESP32 CPU card, not on the WeMos D1 bus! have a look at the CPU card pinout shown on the TWiki page The hardware.

This is how it will look like:

Added:
>
>
img_8026.png img_8024.png
 
Deleted:
<
<
img_8024.png
  -- Uli Raich - 2020-07-26

Comments

Line: 67 to 67
 
META FILEATTACHMENT attachment="img_8020.png" attr="" comment="" date="1595946524" name="img_8020.png" path="img_8020.png" size="209010" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8024.png" attr="" comment="" date="1596006561" name="img_8024.png" path="img_8024.png" size="174956" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8025.png" attr="" comment="" date="1596026971" name="img_8025.png" path="img_8025.png" size="186133" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="img_8026.png" attr="" comment="" date="1596108883" name="img_8026.png" path="img_8026.png" size="411956" user="UliRaich" version="1"

Revision 92020-07-29 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 34 to 34
 img_8020.png

Exercise 5: A new GUI element (bonus point)

Changed:
<
<
Create a new "scale" GUI element showing a scale. This should can be used e.g. to create a Voltmeter making use of the ESP32 ADC.
>
>
Create a voltmeter application to measure voltages. You will need a new Scale GUI element similar to the nanogui Dial, but designed by yourself, which displays the voltage read from an ADC. Values to be displayed must range from 0 to 5V. The photo below shows the voltmeter, reading a voltage of 1V.

img_8025.png

 

Exercise 6: Super Mario, a bit of a challenge!

Two simple arcade games come with the SD1351 driver demos. One of them is a Super Mario game, which however is based on hardware we don't have. As far as I can see they use a joystick with BlueTooth connection. You can replace this with an analogue joystick we have in our sensor box. 2 ADC channels are needed to read it out.

Line: 64 to 66
 
META FILEATTACHMENT attachment="img_8016.png" attr="" comment="" date="1595941469" name="img_8016.png" path="img_8016.png" size="196208" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8020.png" attr="" comment="" date="1595946524" name="img_8020.png" path="img_8020.png" size="209010" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8024.png" attr="" comment="" date="1596006561" name="img_8024.png" path="img_8024.png" size="174956" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="img_8025.png" attr="" comment="" date="1596026971" name="img_8025.png" path="img_8025.png" size="186133" user="UliRaich" version="1"

Revision 82020-07-29 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 47 to 47
 
VRy GPIO 34 or ADC 10
Attenuate the input signal by 11 dB. When reading out the ADC with the joystick in its rest position you will obtain values of around 1830. If the value gets lower than 1000 Mario runs left, for values > 2000 he runs right and for values 1000..2000 he is standing still. Same for up and down on the second ADC channel. The ADC channels are only accessible on the ESP32 CPU card, not on the WeMos D1 bus! have a look at the CPU card pinout shown on the TWiki page The hardware.
Added:
>
>
This is how it will look like:

img_8024.png

 -- Uli Raich - 2020-07-26

Comments

Line: 59 to 63
 
META FILEATTACHMENT attachment="img_8012.png" attr="" comment="" date="1595937343" name="img_8012.png" path="img_8012.png" size="196662" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8016.png" attr="" comment="" date="1595941469" name="img_8016.png" path="img_8016.png" size="196208" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8020.png" attr="" comment="" date="1595946524" name="img_8020.png" path="img_8020.png" size="209010" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="img_8024.png" attr="" comment="" date="1596006561" name="img_8024.png" path="img_8024.png" size="174956" user="UliRaich" version="1"

Revision 72020-07-28 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 19 to 19
  img_8011.png
Added:
>
>
The font files are actually executable Python code that you can run on CPython on your laptop. Try to run e.g. courier20.py and sysfont.py. You will see a letter, which in case of the courier font will be upright(hmap() returns true), while in the sysfont case it will be turned clockwise by 90 ° (hmap() returns false). Can you write a piece of code that will transform the sysfont glyph into an upright layout?
 

Exercise 3: Graphical User Interface (GUI) elements from nanogui

Create 2 meters, one for temperature (0..50) and one for humidity (0..100). Generate dummy temperature and humidity values and display them in the meters.

Changed:
<
<
img_8012.png
>
>
Once the graphics works replace the dummy measurements by real ones from the SHT30.
img_8012.png img_8016.png
 
Deleted:
<
<
Replace the dummy measurements by real ones from the SHT30.

img_8016.png

 

Exercise 4: Plots

Create a plot of a damped oscillator

Line: 36 to 35
 

Exercise 5: A new GUI element (bonus point)

Create a new "scale" GUI element showing a scale. This should can be used e.g. to create a Voltmeter making use of the ESP32 ADC.

Changed:
<
<

Exercise 6: Mario, a real challenge!

>
>

Exercise 6: Super Mario, a bit of a challenge!

Two simple arcade games come with the SD1351 driver demos. One of them is a Super Mario game, which however is based on hardware we don't have. As far as I can see they use a joystick with BlueTooth connection. You can replace this with an analogue joystick we have in our sensor box. 2 ADC channels are needed to read it out.

 
Changed:
<
<
Two simple arcade games come with the SD1351 driver demos. One of them is a Super Mario game, which however is base on hardware we don't have. Can you modify the code such that you can run the program with the hardware we have (e.g the analogue joystick)?
>
>
Here are the connections:
Joystick ESP32 CPU board
GND GND
5V 3.3V
VRx GPIO 33 or ADC 05
VRy GPIO 34 or ADC 10
Attenuate the input signal by 11 dB. When reading out the ADC with the joystick in its rest position you will obtain values of around 1830. If the value gets lower than 1000 Mario runs left, for values > 2000 he runs right and for values 1000..2000 he is standing still. Same for up and down on the second ADC channel. The ADC channels are only accessible on the ESP32 CPU card, not on the WeMos D1 bus! have a look at the CPU card pinout shown on the TWiki page The hardware.
  -- Uli Raich - 2020-07-26

Comments

Revision 62020-07-28 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 31 to 31
 

Exercise 4: Plots

Create a plot of a damped oscillator

Added:
>
>
img_8020.png
 

Exercise 5: A new GUI element (bonus point)

Create a new "scale" GUI element showing a scale. This should can be used e.g. to create a Voltmeter making use of the ESP32 ADC.

Line: 49 to 51
 
META FILEATTACHMENT attachment="img_8011.png" attr="" comment="" date="1595921348" name="img_8011.png" path="img_8011.png" size="188911" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8012.png" attr="" comment="" date="1595937343" name="img_8012.png" path="img_8012.png" size="196662" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8016.png" attr="" comment="" date="1595941469" name="img_8016.png" path="img_8016.png" size="196208" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="img_8020.png" attr="" comment="" date="1595946524" name="img_8020.png" path="img_8020.png" size="209010" user="UliRaich" version="1"

Revision 52020-07-28 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 26 to 26
 img_8012.png

Replace the dummy measurements by real ones from the SHT30.

Added:
>
>
img_8016.png
 

Exercise 4: Plots

Create a plot of a damped oscillator

Line: 46 to 48
 
META FILEATTACHMENT attachment="img_8010.png" attr="" comment="" date="1595919334" name="img_8010.png" path="img_8010.png" size="240860" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8011.png" attr="" comment="" date="1595921348" name="img_8011.png" path="img_8011.png" size="188911" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8012.png" attr="" comment="" date="1595937343" name="img_8012.png" path="img_8012.png" size="196662" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="img_8016.png" attr="" comment="" date="1595941469" name="img_8016.png" path="img_8016.png" size="196208" user="UliRaich" version="1"

Revision 42020-07-28 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 23 to 23
  Create 2 meters, one for temperature (0..50) and one for humidity (0..100). Generate dummy temperature and humidity values and display them in the meters.
Added:
>
>
img_8012.png
 Replace the dummy measurements by real ones from the SHT30.

Exercise 4: Plots

Line: 43 to 45
 
META FILEATTACHMENT attachment="img_8009.png" attr="" comment="" date="1595919334" name="img_8009.png" path="img_8009.png" size="216259" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8010.png" attr="" comment="" date="1595919334" name="img_8010.png" path="img_8010.png" size="240860" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8011.png" attr="" comment="" date="1595921348" name="img_8011.png" path="img_8011.png" size="188911" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="img_8012.png" attr="" comment="" date="1595937343" name="img_8012.png" path="img_8012.png" size="196662" user="UliRaich" version="1"

Revision 32020-07-28 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Introduction

Line: 11 to 11
 
  • random rectangles
  • random circles
in random colors. These are 3 distinct tests. Draw the lines first, show them for 5s, clear the display and start showing the rectangles ...
Added:
>
>
img_8008.png img_8009.png img_8010.png
Write the above script once using direct drawing primitives (draw_line(...), draw_rectangle(...), draw_circle(...)) and then modify your code to use the primitives (line(...),rect(...),circle(...)) passing through the frame buffer. Where do you have to place the show() calls to get a similar result?

Exercise 2: Text drawing

 
Changed:
<
<
-- Uli Raich - 2020-07-26
>
>
Write a script that prints "DSCIT" in three different fonts (sysfont, courier20 and EspressoDolce18x24) in the colors red, green and blue. Draw the text once in portrait and once in landscape mode

img_8011.png

Exercise 3: Graphical User Interface (GUI) elements from nanogui

Create 2 meters, one for temperature (0..50) and one for humidity (0..100). Generate dummy temperature and humidity values and display them in the meters.

Replace the dummy measurements by real ones from the SHT30.

Exercise 4: Plots

 
Added:
>
>
Create a plot of a damped oscillator

Exercise 5: A new GUI element (bonus point)

Create a new "scale" GUI element showing a scale. This should can be used e.g. to create a Voltmeter making use of the ESP32 ADC.

Exercise 6: Mario, a real challenge!

Two simple arcade games come with the SD1351 driver demos. One of them is a Super Mario game, which however is base on hardware we don't have. Can you modify the code such that you can run the program with the hardware we have (e.g the analogue joystick)?

-- Uli Raich - 2020-07-26

 

Comments

<--/commentPlugin-->
\ No newline at end of file
Added:
>
>
META FILEATTACHMENT attachment="img_8008.png" attr="" comment="" date="1595919334" name="img_8008.png" path="img_8008.png" size="213150" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8009.png" attr="" comment="" date="1595919334" name="img_8009.png" path="img_8009.png" size="216259" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8010.png" attr="" comment="" date="1595919334" name="img_8010.png" path="img_8010.png" size="240860" user="UliRaich" version="1"
META FILEATTACHMENT attachment="img_8011.png" attr="" comment="" date="1595921348" name="img_8011.png" path="img_8011.png" size="188911" user="UliRaich" version="1"

Revision 22020-07-27 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Added:
>
>

Introduction

 
Changed:
<
<
Article text.
>
>
The ST7735 is described in TFT Display on this TWiki. It comes with a big bunch of demo programs showing the functionality of the driver. Please inspect the source code of each of these demos and run them. This should give you a good feeling of the possibilities the driver offers.

Exercise 1: Random lines, rectangles and circles

Write a MicroPython script that draws 50

  • random lines
  • random rectangles
  • random circles
in random colors. These are 3 distinct tests. Draw the lines first, show them for 5s, clear the display and start showing the rectangles ...
  -- Uli Raich - 2020-07-26

Revision 12020-07-26 - UliRaich

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="Exercises"

Exercise 10: A TFT Display and the ST7735 display controller

Article text.

-- Uli Raich - 2020-07-26

Comments

<--/commentPlugin-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback