Skip to content
Snippets Groups Projects
Verified Commit 0824b630 authored by Zoe Michaela Dietmar Pfister's avatar Zoe Michaela Dietmar Pfister :gay_pride_flag:
Browse files

WIP: ESP-Cam to client, move include and lib to external libs for easier code deduplication

parent 7dc095ab
No related branches found
No related tags found
4 merge requests!39Merge Develop into Main,!19development into master,!17Inital Host, initial Client,!13Esp cam
Showing
with 330 additions and 77 deletions
This diff is collapsed.
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into executable file.
The source code of each library should be placed in a an own separate directory
("lib/your_library_name/[here are source files]").
For example, see a structure of the following two libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
and a contents of `src/main.c`:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
PlatformIO Library Dependency Finder will find automatically dependent
libraries scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html
......@@ -13,23 +13,26 @@ platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
lib_ldf_mode = deep
lib_extra_dirs =
../libs
; C++17 https://community.platformio.org/t/esp32-c-17-toolchain-missing-std-optional/25850/6
; we use c++17 features (i.e. optionals in ClientDataPackage.hpp)
build_flags =
-I include
-DCORE_DEBUG_LEVEL=5
-std=gnu++17
build_flags =
-I include
-DCORE_DEBUG_LEVEL=5
-std=gnu++17
build_unflags = -std=gnu++11
monitor_port = /dev/ttyUSB0
upload_port = /dev/ttyUSB0
;monitor_port = /dev/ttyUSB0
;upload_port = /dev/ttyUSB0
lib_deps =
sparkfun/SparkFun SCD30 Arduino Library@^1.0.18
Wire
adafruit/Adafruit ADS1X15@^2.4.0
wollewald/INA219_WE@^1.3.1
adafruit/Adafruit BusIO@^1.13.2
Adafruit_I2CDevice
SPI
envirodiy/SDI-12@^2.1.4
fbiego/ESP32Time@^2.0.0
bblanchon/ArduinoJson@^6.19.4
sparkfun/SparkFun SCD30 Arduino Library@^1.0.18
Wire
adafruit/Adafruit ADS1X15@^2.4.0
wollewald/INA219_WE@^1.3.1
adafruit/Adafruit BusIO@^1.13.2
Adafruit_I2CDevice
SPI
envirodiy/SDI-12@^2.1.4
fbiego/ESP32Time@^2.0.0
bblanchon/ArduinoJson@^6.19.4
#include "../lib/dr26_analogue/dr26.hpp"
#include "dr26.hpp"
#include "NoDataAvailableException.hpp"
#include "esp_log.h"
#include "f_deep_sleep.hpp"
......@@ -10,9 +10,10 @@
// #include "esp32-hal-log.h"
static const std::string TAG = "MAIN";
ForteDR26 dr26_channel0;
ForteDR26 dr26_channel1;
ForteDRS26 drs26;
//
//ForteDR26 dr26_channel0;
//ForteDR26 dr26_channel1;
void setup()
{
......@@ -23,26 +24,25 @@ void setup()
ESP_LOGD(TAG.c_str(), "Boot number: %d", DeepSleep::bootCount);
dr26_channel1.setup();
dr26_channel0.setChannel(0);
dr26_channel1.setChannel(1);
// dr26_channel1.setup();
// dr26_channel0.setChannel(0);
// dr26_channel1.setChannel(1);
drs26.setup();
espnow_setup();
// log_e("Setup complete.");
}
void loop()
{
Serial.println("***********************1-DRS26**********************************");
Serial.println(dr26_channel0.readData(),5);
Serial.println("***********************2-DRS26**********************************");
Serial.println(dr26_channel1.readData(),5);
//
//Serial.println("***********************1-DRS26**********************************");
//Serial.println(dr26_channel0.readData(),5);
//Serial.println("***********************2-DRS26**********************************");
//Serial.println(dr26_channel1.readData(),5);
try {
auto messages = dr26_channel0.buildMessages();
messages=dr26_channel1.buildMessages();
auto messages = drs26.buildMessages();
for (const Message &message : messages) {
if(message.send() != ESP_OK){
......
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment