Skip to content

Commit

Permalink
Simulating the screen on Wokwi.
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Dec 22, 2023
1 parent 3537c5c commit 2fb67e4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
16 changes: 8 additions & 8 deletions samples/ScreenTFT_ST7735/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
* DC (DC) GPIO0
* CS (CS) GPIO2
*/
#define TFT_SCLK 14
#define TFT_MOSI 13
#define TFT_RST 16
#define TFT_DC 0
#define TFT_CS 2

//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
#define TFT_SCLK 18
#define TFT_MOSI 23
#define TFT_RST 32
#define TFT_DC 33
#define TFT_CS 5

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

Timer DemoScreenTimer;
float p = 3.1415926;
Expand Down
30 changes: 30 additions & 0 deletions samples/ScreenTFT_ST7735/diagram.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": 1,
"author": "Pedro Malo",
"editor": "wokwi",
"parts": [
{ "type": "wokwi-esp32-devkit-v1", "id": "esp", "top": 224.1, "left": 103.57, "attrs": {} },
{
"type": "wokwi-ili9341",
"id": "lcd1",
"top": 178.2,
"left": 356.9,
"rotate": 90,
"attrs": {}
}
],
"connections": [
[ "esp:TX0", "$serialMonitor:RX", "", [] ],
[ "esp:RX0", "$serialMonitor:TX", "", [] ],
[ "lcd1:SCK", "esp:D18", "green", [ "v-0.01", "h-86.4", "v-39.8" ] ],
[ "lcd1:MOSI", "esp:D23", "green", [ "h-57.6", "v-87.91" ] ],
[ "lcd1:RST", "esp:D32", "green", [ "h-38.4", "v-124.8", "h-172.8", "v104.3" ] ],
[ "lcd1:D/C", "esp:D33", "green", [ "h-19.2", "v-124.8", "h-220.8", "v104.2" ] ],
[ "lcd1:CS", "esp:D5", "green", [ "h-57.6", "v9.6", "h-44.73" ] ],
[ "lcd1:MISO", "esp:D19", "green", [ "h-67.2", "v-48", "h9.61", "v-20.51" ] ],
[ "lcd1:GND", "esp:GND.1", "black", [ "h-48", "v75.5" ] ],
[ "lcd1:LED", "esp:VIN", "red", [ "h-28.8", "v-134.41", "h-201.6", "v161.8" ] ],
[ "lcd1:VCC", "esp:VIN", "red", [ "h-9.6", "v-76.8", "h-220.8", "v171.4" ] ]
],
"dependencies": {}
}
5 changes: 5 additions & 0 deletions samples/ScreenTFT_ST7735/wokwi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[wokwi]
version=1
firmware='out/Esp32/esp32/debug/firmware/app-merged.bin'
elf='out/Esp32/esp32/debug/build/app.out'
gdbServerPort=3333

0 comments on commit 2fb67e4

Please sign in to comment.