https://github.com/ct-Open-Source/Basecamp
An Arduino library to ease the use of the ESP32 in IoT projects
https://github.com/ct-Open-Source/Basecamp
arduino-library esp32 iot iot-device iot-framework mqtt smarthome
Last synced: 5 months ago
JSON representation
An Arduino library to ease the use of the ESP32 in IoT projects
- Host: GitHub
- URL: https://github.com/ct-Open-Source/Basecamp
- Owner: ct-Open-Source
- License: gpl-3.0
- Archived: true
- Created: 2017-11-08T13:37:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-10T16:47:56.000Z (over 6 years ago)
- Last Synced: 2023-10-20T19:07:44.878Z (over 2 years ago)
- Topics: arduino-library, esp32, iot, iot-device, iot-framework, mqtt, smarthome
- Language: C++
- Homepage:
- Size: 239 KB
- Stars: 254
- Watchers: 65
- Forks: 46
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mqtt - Basecamp - An Arduino library to ease the use of the ESP32 in IoT projects. See [c't Magazin 2'2018 (German)](https://www.heise.de/select/ct/2018/2/1515452111258448). (Interfaces / Makers)
README
# Basecamp is deprecated now. And only for archival purposes. If you want to take over this project contact me at: mls@ct.de
# There are a lot of alternatives for the ESP32 by now that also work with the ESP8266
Here are alternatives that are in active development:
https://github.com/tzapu/WiFiManager/tree/development
https://github.com/plapointe6/EspMQTTClient
# Basecamp
Basecamp - ESP32 library to simplify the basics of IoT projects
Originally written by Merlin Schumacher [(mls@ct.de)](mailto://mls@ct.de) for [c't magazin für computer technik](https://www.ct.de)
Licensed under GPLv3. See LICENSE for details.
## Attention: Do not use the master-branch for production use! Use only the releases!
## Dependencies
This library has few dependencies:
[ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer)
[ArduinoJSON](https://github.com/bblanchon/ArduinoJson)
[Async MQTT Client](https://github.com/marvinroger/async-mqtt-client)
[AsyncTCP](https://github.com/me-no-dev/AsyncTCP)
## Documentation
Exhaustive documentation will provided in the next few weeks. An example can be found inside the example folder.
### First Setup:
At the first start - when you initially flash the device, the ESP32 will generate an
unique password which is displayed at the debug console upon every start. In setup mode (when the ESP32 is acting as
an access point for setup), the password for the "ESP_$macOfEsp32" wifi network will be set to this value. It will never change,
except the configuration gets broken - then a new password will be generated.
## Basic example
```cpp
#include
Basecamp iot;
void setup() {
iot.begin();
//The mqtt object is an instance of Async MQTT Client. See it's documentation for details.
iot.mqtt.subscribe("test/lol",2);
//Use the web object to add elements to the interface
iot.web.addInterfaceElement("color", "input", "", "#configform", "LampColor");
iot.web.setInterfaceElementAttribute("color", "type", "text");
}
void loop() {
//your code
}
```