-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from rubnium/dev
v1.0.0 First public release!
- Loading branch information
Showing
75 changed files
with
2,503 additions
and
1,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Doxygen GitHub Pages Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "true" | ||
|
||
- name: Install Doxygen and Graphviz | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install graphviz -y | ||
wget https://www.doxygen.nl/files/doxygen-1.11.0.linux.bin.tar.gz | ||
tar -xf doxygen-1.11.0.linux.bin.tar.gz | ||
cd doxygen-1.11.0 | ||
sudo make | ||
sudo make install | ||
- name: Mover a la carpeta y ejecutar Doxygen | ||
run: | | ||
cd doxygen_files | ||
doxygen Doxyfile | ||
touch html/.nojekyll | ||
shell: bash | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4.6.3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: "gh-pages" | ||
folder: "doxygen_files/html" | ||
target_folder: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish PlatformIO Library | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install PlatformIO CLI | ||
run: pip install platformio | ||
|
||
- name: Verify PlatformIO project | ||
run: platformio check | ||
working-directory: library | ||
|
||
- name: Publish Library | ||
env: | ||
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} | ||
run: platformio package publish --non-interactive | ||
working-directory: library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* LoboMQ Broker Example | ||
* This broker example has both topic and subscriber persistence and | ||
* whitelist access control enabled. The log messages are stored on the SD card. | ||
* | ||
* https://github.com/rubnium/LoboMQ | ||
*/ | ||
|
||
#include <LoboMQ/Broker.h> | ||
|
||
void setup() { | ||
Serial.begin(9600); | ||
|
||
//Create whitelist of the devices allowed to connect to the broker | ||
MACAddrList *whitelist = new MACAddrList(); | ||
whitelist->addToList({0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}); //add 1 by 1 | ||
whitelist->addArrayToList((std::vector<String>){ //or multiple at once | ||
"08:B6:1F:BA:04:F8", | ||
"C0:49:EF:CB:99:10" | ||
}); | ||
|
||
//Choose logger: | ||
//a. Serial monitor logger | ||
//Elog *logger = initializeSerialLogger(BROKER, DEBUG); | ||
//b. SD logger. In this case, pins are: | ||
// - CD/Chip Detect: 22 (not used) | ||
// - DO/MISO: 19 | ||
// - SCK/CLK: 18 | ||
// - DI/MOSI: 23 | ||
// - CS: 5 | ||
// - VCC: 3.3V | ||
// - GND: GND | ||
Elog *logger = initializeSDLogger(BROKER, 5, 18, 19, 23, DEBUG); | ||
//c. No logger | ||
//Elog *logger = disableLogger(); | ||
|
||
//Initialize broker | ||
initBroker(whitelist, logger, true, 5); | ||
//Default values are available: | ||
//initBroker(BRO_DEFAULT_WHITELIST, BRO_DEFAULT_LOGGER, BRO_DEFAULT_PERSISTENCE, BRO_DEFAULT_CS_SD_PIN); | ||
} | ||
|
||
void loop() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* LoboMQ Publisher Example | ||
* This publisher example publishes a random number every 2 seconds. | ||
* | ||
* https://github.com/rubnium/LoboMQ | ||
*/ | ||
|
||
#include <LoboMQ/PubSub.h> | ||
|
||
uint8_t brokerAddr[] = {0x24, 0xDC, 0xC3, 0x9C, 0x7E, 0x40}; //Broker MAC destination | ||
|
||
Elog *_logger; | ||
|
||
void setup() { | ||
Serial.begin(9600); | ||
randomSeed(analogRead(0)); //to generate random numbers | ||
|
||
//Choose logger: | ||
_logger = initializeSerialLogger(PUBLISHER, DEBUG); | ||
//_logger = initializeSDLogger(...); | ||
//_logger = disableLogger(); | ||
|
||
_logger->log(INFO, "Started publisher board on %s!", WiFi.macAddress().c_str()); | ||
} | ||
|
||
void loop() { | ||
int numberExample = random(101); //generates random number | ||
publish(brokerAddr, "topic1", &numberExample, sizeof(numberExample), _logger); | ||
sleep(2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[platformio] | ||
src_dir = . | ||
|
||
[env:run_test] | ||
platform = espressif32 | ||
board = esp32doit-devkit-v1 | ||
framework = arduino | ||
|
||
lib_ldf_mode = deep | ||
lib_deps = | ||
adafruit/Adafruit Unified Sensor@^1.1.14 | ||
adafruit/DHT sensor library@^1.4.6 | ||
symlink://../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* LoboMQ Sensor Demo - Broker | ||
* This example broker has topic and subscriber persistence enabled and | ||
* whitelist access control disabled. The log messages are printed on the serial | ||
* monitor. | ||
* | ||
* SD module pins: | ||
* - CD/Chip Detect: 22 (not used) | ||
* - DO/MISO: 19 | ||
* - SCK/CLK: 18 | ||
* - DI/MOSI: 23 | ||
* - CS: 5 | ||
* - VCC: 3.3V | ||
* - GND: GND | ||
* | ||
* https://github.com/rubnium/LoboMQ | ||
*/ | ||
|
||
#include <LoboMQ/Broker.h> | ||
|
||
void setup() { | ||
Serial.begin(9600); | ||
Elog *logger = initializeSerialLogger(BROKER, DEBUG); | ||
|
||
initBroker(BRO_DEFAULT_WHITELIST, logger, true, 5); | ||
} | ||
|
||
void loop() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[platformio] | ||
src_dir = . | ||
|
||
[env:sensordemo_bro] | ||
platform = espressif32 | ||
board = esp32doit-devkit-v1 | ||
framework = arduino | ||
|
||
lib_ldf_mode = deep | ||
lib_deps = | ||
symlink://../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
Oops, something went wrong.