-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
117 additions
and
22 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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# Arduino / ESP-IDF client library for mdash.net | ||
|
||
See [Documentation](https://mdash.net/docs/) for the quick start guide. | ||
|
||
NOTE: for Arduino 1.8.10 and later, please make the following changes: | ||
|
||
- Change `platform.txt` as in [this PR](https://github.com/espressif/arduino-esp32/pull/4209/commits/183964aa93b7039d11813fd60aba7e8170caa4b8) | ||
- Change `library.properties` by commenting out the `ldflags=-lmDash` line |
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,42 @@ | ||
// This Arduino sketch demonstrates how to use Serial CLI to configure your | ||
// device. Devices that are configured via CLI (or via WiFi Access Point) | ||
// store their credentials in the config file, rather than hardcoding them | ||
// into firmware code. That allows to have a fleet of devices, and OTA them | ||
// using the same firmware. | ||
// | ||
// - Install mDash library: | ||
// - Select "Sketch" → "Include Library" → "Manage Libraries" | ||
// - In the search field, type "mDash" and press Enter | ||
// - Click on "Install" to install the library | ||
// - Select "Tools" → "Board" → "ESP32 Dev Module" | ||
// - Select "Tools" → "Partitioning Scheme" → "Minimal SPIFFS" | ||
// - Select "Tools" → "Port" → your serial port | ||
// - Click on "Upload" button to build and flash the firmware | ||
// | ||
// Start Serial monitor, enter the following commands: | ||
// set wifi.sta.ssid YOUR_WIFI_NETWORK | ||
// set wifi.sta.pass YOUR_WIFI_PASSWORD | ||
// set device.pass MDASH_DEVICE_PASSWORD | ||
// reboot | ||
// | ||
// When done, your device should become online on mdash.net. | ||
// See https://mdash.net/docs/ for more. | ||
|
||
#define MDASH_APP_NAME "CliApp" | ||
#include <mDash.h> | ||
|
||
#include <WiFi.h> | ||
|
||
static void initWiFi(const char *ssid, const char *pass) { | ||
if (ssid != NULL) WiFi.begin(ssid, pass); // WiFi is configured, join | ||
if (ssid == NULL) WiFi.softAP("CliAP"); // Not configured, start AP | ||
} | ||
|
||
void setup() { | ||
Serial.begin(115200); | ||
mDashBeginWithWifi(initWiFi, NULL, NULL, NULL); | ||
} | ||
|
||
void loop() { | ||
if (Serial.available() > 0) mDashCLI(Serial.read()); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=mDash | ||
version=1.2.10 | ||
version=1.2.11 | ||
author=Cesanta Software Limited <[email protected]> | ||
maintainer=Cesanta Software Limited <[email protected]> | ||
sentence=Remote control and OTA for ESP32 via mdash.net IoT backend | ||
|
@@ -9,4 +9,4 @@ url=https://github.com/cesanta/mDash | |
architectures=esp32,esp8266 | ||
includes=mDash.h | ||
precompiled=true | ||
ldflags=-lmDash | ||
#ldflags=-lmDash |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Binary file not shown.