File tree Expand file tree Collapse file tree 5 files changed +403
-377
lines changed
Expand file tree Collapse file tree 5 files changed +403
-377
lines changed Original file line number Diff line number Diff line change @@ -96,17 +96,21 @@ Below is a list with cars with which this device works (has been tested) or can
9696
9797The project was to be as uncomplicated as possible, so I was looking for a board with an ESP32 module with the display already built in.
9898
99- I found two solutions for my project:
99+ The code is prepared for the following ready-made modules:
100+
100101* WIFI_kit_32
101- * WeMos Lolin32 OLED
102+ * WeMos Lolin32 OLED.
103+ * Diymore esp32 OLED
102104
103- The program is prepared for both versions.
104105
105106The board selection is made in the ` platformio.ini ` file by leaving one of the options uncommented:
106107
108+ There are 3 ready-made configurations defined in the ` platformio.ini ` file. Each of them sets the corresponding compilation flag:
109+
107110```
108- -DWIFI_KIT_32_BOARD
111+ ; -DWIFI_KIT_32_BOARD
109112;-DWEMOS_BOARD
113+ ;-DDIYMORE_BOARD
110114```
111115
112116Optionally, you can add a buzzer (with a generator) that informs you when:
Original file line number Diff line number Diff line change @@ -96,17 +96,18 @@ Poniżej znajduje się lista z autami z którymi działa (zostało przetestowane
9696
9797Projekt miał być jak najmniej skomplikowany, dlatego szukałem płytki z modułem ESP32 z już wbudowanym wyświetlaczem.
9898
99- Znalazłem dwa rozwiązania do swojego projektu:
99+ Kod jest przygotowany pod następujące gotowe moduły:
100+
100101* WIFI_kit_32
101102* WeMos Lolin32 OLED
103+ * Diymore esp32 OLED
102104
103- Program jest przygotowany pod obie wersje.
104-
105- Wyboru płytki dokonujemy w pliku ` platformio.ini ` pozostawiając odkomentowaną jedną z opcji:
105+ W pliku ` platformio.ini ` zdefiniowne są 3 gotowe konfiguracje. Każda z nich ustawia odpowiednią flagę kompilacji:
106106
107107```
108- -DWIFI_KIT_32_BOARD
108+ ; -DWIFI_KIT_32_BOARD
109109;-DWEMOS_BOARD
110+ ;-DDIYMORE_BOARD
110111```
111112
112113Opcjonalnie można dodać buzzer (z generatorem) który informuje o:
Original file line number Diff line number Diff line change 77#include " oled/SSD1306Wire.h"
88#include < vector>
99#include < sstream>
10- #ifdef ENABLE_WIFI
1110#include < WiFi.h>
1211#include < WiFiAP.h>
1312#include < WiFiServer.h>
1615#include " esp_bt_device.h"
1716#include " esp_gap_bt_api.h"
1817#include " esp_err.h"
19- # endif
18+
2019#include " config.hpp"
2120#include " measurement.hpp"
2221#include " buzzer.hpp"
3130#define SCL_OLED 15
3231#define RST_OLED 16
3332#endif
33+ #ifdef DIYMORE_BOARD
34+ #define SDA_OLED 21
35+ #define SCL_OLED 22
36+ #define RST_OLED -1
37+ #endif
3438
3539#endif
Original file line number Diff line number Diff line change 88; Please visit documentation for the other options and examples
99; https://docs.platformio.org/page/projectconf.html
1010
11- [env:nodemcu-32s]
12- platform = https://github.com/platformio/platform-espressif32.git @ 5.1.0
11+ [env:test]
12+ platform = native
13+
14+ [env:wifi_kit_32]
15+ 1316board = nodemcu-32s
1417framework = arduino
1518platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32 @ 2.0.4
1619monitor_speed = 115200
1720board_build.partitions = huge_app.csv
1821test_ignore = test_measurement
1922build_flags =
20- -DCORE_DEBUG_LEVEL =3
21- -DENABLE_WIFI
22- -DWIFI_KIT_32_BOARD
23- ; -DWEMOS_BOARD
23+ -DCORE_DEBUG_LEVEL =3
24+ -DDEBUG
25+ -DWIFI_KIT_32_BOARD
2426 ; -DRANDOM_DATA
25- -DDEBUG
26- lib_deps =
27- BluetoothSerial @ 2.0.0
28- https://github.com/me-no-dev/ESPAsyncWebServer
27+ lib_deps =
28+ BluetoothSerial @ 2.0.0
29+ https://github.com/me-no-dev/ESPAsyncWebServer
2930
30- [env:test]
31- platform = native
31+ [env:wemos]
32+ 33+ board = nodemcu-32s
34+ framework = arduino
35+ platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32 @ 2.0.4
36+ monitor_speed = 115200
37+ board_build.partitions = huge_app.csv
38+ test_ignore = test_measurement
39+ build_flags =
40+ -DCORE_DEBUG_LEVEL =3
41+ -DWEMOS_BOARD
42+ -DDEBUG
43+ ; -DRANDOM_DATA
44+ lib_deps =
45+ BluetoothSerial @ 2.0.0
46+ https://github.com/me-no-dev/ESPAsyncWebServer
47+
48+ [env:upesy_wrover]
49+ 50+ board = upesy_wrover
51+ framework = arduino
52+ platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32 @ 2.0.4
53+ monitor_speed = 115200
54+ board_build.partitions = huge_app.csv
55+ test_ignore = test_measurement
56+ build_flags =
57+ -DCORE_DEBUG_LEVEL =3
58+ -DDIYMORE_BOARD
59+ -DDEBUG
60+ ; -DRANDOM_DATA
61+ lib_deps =
62+ BluetoothSerial @ 2.0.0
63+ https://github.com/me-no-dev/ESPAsyncWebServer
You can’t perform that action at this time.
0 commit comments