Professional Documents
Culture Documents
Open
Program serial
Board
to run monitor
Select
serial
port
Bonus: Auto-scroll:
First, let’s revise the basics
1. Open the Blink example and play with the delay
2. Using the copy/move lines (Alt+Up/down | Alt+Shift+Up/down)
duplicate the correct lines to make an SOS in Morse: ... - - - …
3. A bit of coding: Use the for loop to simplify your SOS
1. Just type for and select the for snippet code
2. Use TAB to get to each part of the snippet
• Example: BMP085
1. Get example BMP085test and upload it
2. Connect 3.3v, GND, scl/sda ports (esp32: 22/21; esp8266: D1/D2)
3. Put the value of the sensor in a variable of type float
4. Test the variable if it >28 turn a pin HIGH, and print a line on the serial
5. Plug a relay or a led to test
https://randomnerdtutorials.com/esp32-with-bmp180-
barometric-sensor/
Esp32 ttgo: turn ON the screen!
• Library:
• Open
Comment //
Uncomment
https://github.com/Xinyuan-LilyGO/TTGO-T-Display
#define TFT_WIDTH 135
More info on the library: https://github.com/Bodmer/TFT_eSPI #define TFT_HEIGHT 240
Esp32 ttgo: turn ON the screen!
• Now you can run the examples of the tft_espi library
• Simple example: Colour_test
• Funnier:
• 160 x 128\Pong_v3 (adjust screen size)
• Usefull: tft_meter5
Exercise
• From the sensor example, add the needed functions and library to
print the temperature on the screen
Help!
• Frequent errors:
• Wrong COM port selected Wrong COM port selected