Commit 6db31581 authored by Eric Duminil's avatar Eric Duminil
Browse files

Removed everything. S8 not recognized

parent 2fe7a4e7
Pipeline #6018 failed with stage
in 21 seconds
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
# Adafruit NeoPixel Library [![Build Status](https://github.com/adafruit/Adafruit_NeoPixel/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/adafruit/Adafruit_NeoPixel/actions)[![Documentation](https://github.com/adafruit/ci-arduino/blob/master/assets/doxygen_badge.svg)](http://adafruit.github.io/Adafruit_NeoPixel/html/index.html)
Arduino library for controlling single-wire-based LED pixels and strip such as the [Adafruit 60 LED/meter Digital LED strip][strip], the [Adafruit FLORA RGB Smart Pixel][flora], the [Adafruit Breadboard-friendly RGB Smart Pixel][pixel], the [Adafruit NeoPixel Stick][stick], and the [Adafruit NeoPixel Shield][shield].
After downloading, rename folder to 'Adafruit_NeoPixel' and install in Arduino Libraries folder. Restart Arduino IDE, then open File->Sketchbook->Library->Adafruit_NeoPixel->strandtest sketch.
Compatibility notes: Port A is not supported on any AVR processors at this time
[flora]: http://adafruit.com/products/1060
[strip]: http://adafruit.com/products/1138
[pixel]: http://adafruit.com/products/1312
[stick]: http://adafruit.com/products/1426
[shield]: http://adafruit.com/products/1430
---
## Installation
### First Method
![image](https://user-images.githubusercontent.com/36513474/68967967-3e37f480-0803-11ea-91d9-601848c306ee.png)
1. In the Arduino IDE, navigate to Sketch > Include Library > Manage Libraries
1. Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation.
1. Then search for Neopixel strip using the search bar.
1. Click on the text area and then select the specific version and install it.
### Second Method
1. Navigate to the [Releases page](https://github.com/adafruit/Adafruit_NeoPixel/releases).
1. Download the latest release.
1. Extract the zip file
1. In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library
## Features
- ### Simple to use
Controlling NeoPixels “from scratch” is quite a challenge, so we provide a library letting you focus on the fun and interesting bits.
- ### Give back
The library is free; you don’t have to pay for anything. Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
- ### Supported Chipsets
We have included code for the following chips - sometimes these break for exciting reasons that we can't control in which case please open an issue!
- AVR ATmega and ATtiny (any 8-bit) - 8 MHz, 12 MHz and 16 MHz
- Teensy 3.x and LC
- Arduino Due
- Arduino 101
- ATSAMD21 (Arduino Zero/M0 and other SAMD21 boards) @ 48 MHz
- ATSAMD51 @ 120 MHz
- Adafruit STM32 Feather @ 120 MHz
- ESP8266 any speed
- ESP32 any speed
- Nordic nRF52 (Adafruit Feather nRF52), nRF51 (micro:bit)
- Infineon XMC1100 BootKit @ 32 MHz
- Infineon XMC1100 2Go @ 32 MHz
- Infineon XMC1300 BootKit @ 32 MHz
- Infineon XMC4700 RelaxKit, XMC4800 RelaxKit, XMC4800 IoT Amazon FreeRTOS Kit @ 144 MHz
Check forks for other architectures not listed here!
- ### GNU Lesser General Public License
Adafruit_NeoPixel is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
## Functions
- begin()
- updateLength()
- updateType()
- show()
- delay_ns()
- setPin()
- setPixelColor()
- fill()
- ColorHSV()
- getPixelColor()
- setBrightness()
- getBrightness()
- clear()
- gamma32()
## Examples
There are many examples implemented in this library. One of the examples is below. You can find other examples [here](https://github.com/adafruit/Adafruit_NeoPixel/tree/master/examples)
### Simple
```Cpp
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
#define NUMPIXELS 16
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500
void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
pixels.begin();
}
void loop() {
pixels.clear();
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(0, 150, 0));
pixels.show();
delay(DELAYVAL);
}
}
```
## Contributing
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell others about this library
- Contribute new protocols
Please read [CONTRIBUTING.md](https://github.com/adafruit/Adafruit_NeoPixel/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
### Roadmap
The PRIME DIRECTIVE is to maintain backward compatibility with existing Arduino sketches -- many are hosted elsewhere and don't track changes here, some are in print and can never be changed!
Please don't reformat code for the sake of reformatting code. The resulting large "visual diff" makes it impossible to untangle actual bug fixes from merely rearranged lines. (Exception for first item in wishlist below.)
Things I'd Like To Do But There's No Official Timeline So Please Don't Count On Any Of This Ever Being Canonical:
- For the show() function (with all the delicate pixel timing stuff), break out each architecture into separate source files rather than the current unmaintainable tangle of #ifdef statements!
- Please don't use updateLength() or updateType() in new code. They should not have been implemented this way (use the C++ 'new' operator with the regular constructor instead) and are only sticking around because of the Prime Directive. setPin() is OK for now though, it's a trick we can use to 'recycle' pixel memory across multiple strips.
- In the M0 and M4 code, use the hardware systick counter for bit timing rather than hand-tweaked NOPs (a temporary kludge at the time because I wasn't reading systick correctly). (As of 1.4.2, systick is used on M4 devices and it appears to be overclock-compatible. Not for M0 yet, which is why this item is still here.)
- As currently written, brightness scaling is still a "destructive" operation -- pixel values are altered in RAM and the original value as set can't be accurately read back, only approximated, which has been confusing and frustrating to users. It was done this way at the time because NeoPixel timing is strict, AVR microcontrollers (all we had at the time) are limited, and assembly language is hard. All the 32-bit architectures should have no problem handling nondestructive brightness scaling -- calculating each byte immediately before it's sent out the wire, maintaining the original set value in RAM -- the work just hasn't been done. There's a fair chance even the AVR code could manage it with some intense focus. (The DotStar library achieves nondestructive brightness scaling because it doesn't have to manage data timing so carefully...every architecture, even ATtiny, just takes whatever cycles it needs for the multiply/shift operations.)
## Credits
This library is written by Phil "Paint Your Dragon" Burgess for Adafruit Industries, with contributions by PJRC, Michael Miller and other members of the open source community.
## License
Adafruit_NeoPixel is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Adafruit_NeoPixel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.en.html) for more details.
You should have received a copy of the GNU Lesser General Public License along with NeoPixel. If not, see [this](https://www.gnu.org/licenses/)
// Implements the RMT peripheral on Espressif SoCs
// Copyright (c) 2020 Lucian Copeland for Adafruit Industries
/* Uses code from Espressif RGB LED Strip demo and drivers
* Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(ESP32)
#include <Arduino.h>
#include "driver/rmt.h"
#if defined(ESP_IDF_VERSION)
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
#define HAS_ESP_IDF_4
#endif
#endif
// This code is adapted from the ESP-IDF v3.4 RMT "led_strip" example, altered
// to work with the Arduino version of the ESP-IDF (3.2)
#define WS2812_T0H_NS (400)
#define WS2812_T0L_NS (850)
#define WS2812_T1H_NS (800)
#define WS2812_T1L_NS (450)
#define WS2811_T0H_NS (500)
#define WS2811_T0L_NS (2000)
#define WS2811_T1H_NS (1200)
#define WS2811_T1L_NS (1300)
static uint32_t t0h_ticks = 0;
static uint32_t t1h_ticks = 0;
static uint32_t t0l_ticks = 0;
static uint32_t t1l_ticks = 0;
// Limit the number of RMT channels available for the Neopixels. Defaults to all
// channels (8 on ESP32, 4 on ESP32-S2 and S3). Redefining this value will free
// any channels with a higher number for other uses, such as IR send-and-recieve
// libraries. Redefine as 1 to restrict Neopixels to only a single channel.
#define ADAFRUIT_RMT_CHANNEL_MAX RMT_CHANNEL_MAX
#define RMT_LL_HW_BASE (&RMT)
bool rmt_reserved_channels[ADAFRUIT_RMT_CHANNEL_MAX];
static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, size_t src_size,
size_t wanted_num, size_t *translated_size, size_t *item_num)
{
if (src == NULL || dest == NULL) {
*translated_size = 0;
*item_num = 0;
return;
}
const rmt_item32_t bit0 = {{{ t0h_ticks, 1, t0l_ticks, 0 }}}; //Logical 0
const rmt_item32_t bit1 = {{{ t1h_ticks, 1, t1l_ticks, 0 }}}; //Logical 1
size_t size = 0;
size_t num = 0;
uint8_t *psrc = (uint8_t *)src;
rmt_item32_t *pdest = dest;
while (size < src_size && num < wanted_num) {
for (int i = 0; i < 8; i++) {
// MSB first
if (*psrc & (1 << (7 - i))) {
pdest->val = bit1.val;
} else {
pdest->val = bit0.val;
}
num++;
pdest++;
}
size++;
psrc++;
}
*translated_size = size;
*item_num = num;
}
void espShow(uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
// Reserve channel
rmt_channel_t channel = ADAFRUIT_RMT_CHANNEL_MAX;
for (size_t i = 0; i < ADAFRUIT_RMT_CHANNEL_MAX; i++) {
if (!rmt_reserved_channels[i]) {
rmt_reserved_channels[i] = true;
channel = i;
break;
}
}
if (channel == ADAFRUIT_RMT_CHANNEL_MAX) {
// Ran out of channels!
return;
}
#if defined(HAS_ESP_IDF_4)
rmt_config_t config = RMT_DEFAULT_CONFIG_TX(pin, channel);
config.clk_div = 2;
#else
// Match default TX config from ESP-IDF version 3.4
rmt_config_t config = {
.rmt_mode = RMT_MODE_TX,
.channel = channel,
.gpio_num = pin,
.clk_div = 2,
.mem_block_num = 1,
.tx_config = {
.carrier_freq_hz = 38000,
.carrier_level = RMT_CARRIER_LEVEL_HIGH,
.idle_level = RMT_IDLE_LEVEL_LOW,
.carrier_duty_percent = 33,
.carrier_en = false,
.loop_en = false,
.idle_output_en = true,
}
};
#endif
rmt_config(&config);
rmt_driver_install(config.channel, 0, 0);
// Convert NS timings to ticks
uint32_t counter_clk_hz = 0;
#if defined(HAS_ESP_IDF_4)
rmt_get_counter_clock(channel, &counter_clk_hz);
#else
// this emulates the rmt_get_counter_clock() function from ESP-IDF 3.4
if (RMT_LL_HW_BASE->conf_ch[config.channel].conf1.ref_always_on == RMT_BASECLK_REF) {
uint32_t div_cnt = RMT_LL_HW_BASE->conf_ch[config.channel].conf0.div_cnt;
uint32_t div = div_cnt == 0 ? 256 : div_cnt;
counter_clk_hz = REF_CLK_FREQ / (div);
} else {
uint32_t div_cnt = RMT_LL_HW_BASE->conf_ch[config.channel].conf0.div_cnt;
uint32_t div = div_cnt == 0 ? 256 : div_cnt;
counter_clk_hz = APB_CLK_FREQ / (div);
}
#endif
// NS to tick converter
float ratio = (float)counter_clk_hz / 1e9;
if (is800KHz) {
t0h_ticks = (uint32_t)(ratio * WS2812_T0H_NS);
t0l_ticks = (uint32_t)(ratio * WS2812_T0L_NS);
t1h_ticks = (uint32_t)(ratio * WS2812_T1H_NS);
t1l_ticks = (uint32_t)(ratio * WS2812_T1L_NS);
} else {
t0h_ticks = (uint32_t)(ratio * WS2811_T0H_NS);
t0l_ticks = (uint32_t)(ratio * WS2811_T0L_NS);
t1h_ticks = (uint32_t)(ratio * WS2811_T1H_NS);
t1l_ticks = (uint32_t)(ratio * WS2811_T1L_NS);
}
// Initialize automatic timing translator
rmt_translator_init(config.channel, ws2812_rmt_adapter);
// Write and wait to finish
rmt_write_sample(config.channel, pixels, (size_t)numBytes, true);
rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100));
// Free channel again
rmt_driver_uninstall(config.channel);
rmt_reserved_channels[channel] = false;
gpio_set_direction(pin, GPIO_MODE_OUTPUT);
}
#endif
// This is a mash-up of the Due show() code + insights from Michael Miller's
// ESP8266 work for the NeoPixelBus library: github.com/Makuna/NeoPixelBus
// Needs to be a separate .c file to enforce ICACHE_RAM_ATTR execution.
#if defined(ESP8266)
#include <Arduino.h>
#ifdef ESP8266
#include <eagle_soc.h>
#endif
static uint32_t _getCycleCount(void) __attribute__((always_inline));
static inline uint32_t _getCycleCount(void) {
uint32_t ccount;
__asm__ __volatile__("rsr %0,ccount":"=a" (ccount));
return ccount;
}
#ifdef ESP8266
IRAM_ATTR void espShow(
uint8_t pin, uint8_t *pixels, uint32_t numBytes, __attribute__((unused)) boolean is800KHz) {
#else
void espShow(
uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
#endif
#define CYCLES_800_T0H (F_CPU / 2500001) // 0.4us
#define CYCLES_800_T1H (F_CPU / 1250001) // 0.8us
#define CYCLES_800 (F_CPU / 800001) // 1.25us per bit
#define CYCLES_400_T0H (F_CPU / 2000000) // 0.5uS
#define CYCLES_400_T1H (F_CPU / 833333) // 1.2us
#define CYCLES_400 (F_CPU / 400000) // 2.5us per bit
uint8_t *p, *end, pix, mask;
uint32_t t, time0, time1, period, c, startTime;
#ifdef ESP8266
uint32_t pinMask;
pinMask = _BV(pin);
#endif
p = pixels;
end = p + numBytes;
pix = *p++;
mask = 0x80;
startTime = 0;
#ifdef NEO_KHZ400
if(is800KHz) {
#endif
time0 = CYCLES_800_T0H;
time1 = CYCLES_800_T1H;
period = CYCLES_800;
#ifdef NEO_KHZ400
} else { // 400 KHz bitstream
time0 = CYCLES_400_T0H;
time1 = CYCLES_400_T1H;
period = CYCLES_400;
}
#endif
for(t = time0;; t = time0) {
if(pix & mask) t = time1; // Bit high duration
while(((c = _getCycleCount()) - startTime) < period); // Wait for bit start
#ifdef ESP8266
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pinMask); // Set high
#else
gpio_set_level(pin, HIGH);
#endif
startTime = c; // Save start time
while(((c = _getCycleCount()) - startTime) < t); // Wait high duration
#ifdef ESP8266
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pinMask); // Set low
#else
gpio_set_level(pin, LOW);
#endif
if(!(mask >>= 1)) { // Next bit/byte
if(p >= end) break;
pix = *p++;
mask = 0x80;
}
}
while((_getCycleCount() - startTime) < period); // Wait for last bit
}
#endif // ESP8266
// This is a mash-up of the Due show() code + insights from Michael Miller's
// ESP8266 work for the NeoPixelBus library: github.com/Makuna/NeoPixelBus
// Needs to be a separate .c file to enforce ICACHE_RAM_ATTR execution.
#if defined(K210)
#define KENDRYTE_K210 1
#endif
#if defined(KENDRYTE_K210)
#include <Arduino.h>
#include "sysctl.h"
void k210Show(
uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz)
{
#define CYCLES_800_T0H (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 2500000) // 0.4us
#define CYCLES_800_T1H (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 1250000) // 0.8us
#define CYCLES_800 (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 800000) // 1.25us per bit
#define CYCLES_400_T0H (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 2000000) // 0.5uS
#define CYCLES_400_T1H (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 833333) // 1.2us
#define CYCLES_400 (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 400000) // 2.5us per bit
uint8_t *p, *end, pix, mask;
uint32_t t, time0, time1, period, c, startTime;
p = pixels;
end = p + numBytes;
pix = *p++;
mask = 0x80;
startTime = 0;
#ifdef NEO_KHZ400
if (is800KHz)
{
#endif
time0 = CYCLES_800_T0H;
time1 = CYCLES_800_T1H;
period = CYCLES_800;
#ifdef NEO_KHZ400
}
else
{ // 400 KHz bitstream
time0 = CYCLES_400_T0H;
time1 = CYCLES_400_T1H;
period = CYCLES_400;
}
#endif
for (t = time0;; t = time0)
{
if (pix & mask)
t = time1; // Bit high duration
while (((c = read_cycle()) - startTime) < period)
; // Wait for bit start
digitalWrite(pin, HIGH);
startTime = c; // Save start time
while (((c = read_cycle()) - startTime) < t)
; // Wait high duration
digitalWrite(pin, LOW);
if (!(mask >>= 1))
{ // Next bit/byte
if (p >= end)
break;
pix = *p++;
mask = 0x80;
}
}
while ((read_cycle() - startTime) < period)
; // Wait for last bit
}
#endif // KENDRYTE_K210
#######################################
# Syntax Coloring Map For Adafruit_NeoPixel
#######################################
# Class
#######################################
Adafruit_NeoPixel KEYWORD1
#######################################
# Methods and Functions
#######################################
begin KEYWORD2
show KEYWORD2
setPin KEYWORD2
setPixelColor KEYWORD2
fill KEYWORD2
setBrightness KEYWORD2
clear KEYWORD2
updateLength KEYWORD2
updateType KEYWORD2
canShow KEYWORD2
getPixels KEYWORD2
getBrightness KEYWORD2
getPin KEYWORD2
numPixels KEYWORD2
getPixelColor KEYWORD2
sine8 KEYWORD2
gamma8 KEYWORD2
Color KEYWORD2
ColorHSV KEYWORD2
gamma32 KEYWORD2
#######################################
# Constants
#######################################
NEO_COLMASK LITERAL1
NEO_SPDMASK LITERAL1
NEO_KHZ800 LITERAL1
NEO_KHZ400 LITERAL1
NEO_RGB LITERAL1
NEO_RBG LITERAL1
NEO_GRB LITERAL1
NEO_GBR LITERAL1
NEO_BRG LITERAL1
NEO_BGR LITERAL1
NEO_WRGB LITERAL1
NEO_WRBG LITERAL1
NEO_WGRB LITERAL1
NEO_WGBR LITERAL1
NEO_WBRG LITERAL1
NEO_WBGR LITERAL1
NEO_RWGB LITERAL1
NEO_RWBG LITERAL1
NEO_RGWB LITERAL1
NEO_RGBW LITERAL1
NEO_RBWG LITERAL1
NEO_RBGW LITERAL1
NEO_GWRB LITERAL1
NEO_GWBR LITERAL1
NEO_GRWB LITERAL1
NEO_GRBW LITERAL1
NEO_GBWR LITERAL1
NEO_GBRW LITERAL1
NEO_BWRG LITERAL1
NEO_BWGR LITERAL1
NEO_BRWG LITERAL1
NEO_BRGW LITERAL1
NEO_BGWR LITERAL1
NEO_BGRW LITERAL1
name=Adafruit NeoPixel
version=1.10.4
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=Arduino library for controlling single-wire-based LED pixels and strip.
paragraph=Arduino library for controlling single-wire-based LED pixels and strip.
category=Display
url=https://github.com/adafruit/Adafruit_NeoPixel
architectures=*
// -------------------------------------------------- //
// This file is autogenerated by pioasm; do not edit! //
// -------------------------------------------------- //
// Unless you know what you are doing...
// Lines 47 and 52 have been edited to set transmit bit count
#if !PICO_NO_HARDWARE
#include "hardware/pio.h"
#endif
// ------ //
// ws2812 //
// ------ //
#define ws2812_wrap_target 0
#define ws2812_wrap 3
#define ws2812_T1 2
#define ws2812_T2 5
#define ws2812_T3 3
static const uint16_t ws2812_program_instructions[] = {
// .wrap_target
0x6221, // 0: out x, 1 side 0 [2]
0x1123, // 1: jmp !x, 3 side 1 [1]
0x1400, // 2: jmp 0 side 1 [4]
0xa442, // 3: nop side 0 [4]
// .wrap
};
#if !PICO_NO_HARDWARE
static const struct pio_program ws2812_program = {
.instructions = ws2812_program_instructions,
.length = 4,
.origin = -1,
};
static inline pio_sm_config ws2812_program_get_default_config(uint offset) {
pio_sm_config c = pio_get_default_sm_config();
sm_config_set_wrap(&c, offset + ws2812_wrap_target, offset + ws2812_wrap);
sm_config_set_sideset(&c, 1, false, false);
return c;
}
#include "hardware/clocks.h"
static inline void ws2812_program_init(PIO pio, uint sm, uint offset, uint pin,
float freq, uint bits) {
pio_gpio_init(pio, pin);
pio_sm_set_consecutive_pindirs(pio, sm, pin, 1, true);
pio_sm_config c = ws2812_program_get_default_config(offset);
sm_config_set_sideset_pins(&c, pin);
sm_config_set_out_shift(&c, false, true,
bits); // <----<<< Length changed to "bits"
sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_TX);
int cycles_per_bit = ws2812_T1 + ws2812_T2 + ws2812_T3;
float div = clock_get_hz(clk_sys) / (freq * cycles_per_bit);
sm_config_set_clkdiv(&c, div);
pio_sm_init(pio, sm, offset, &c);
pio_sm_set_enabled(pio, sm, true);
}
#endif
set(COMPONENT_SRCS
src/IotWebConf.cpp
src/IotWebConfMultipleWifi.cpp
src/IotWebConfOptionalGroup.cpp
src/IotWebConfParameter.cpp
src/IotWebConfESP32HTTPUpdateServer.cpp
)
set(COMPONENT_ADD_INCLUDEDIRS
src/
)
list(APPEND COMPONENT_REQUIRES "arduino")
register_component()
#ADD_DEFINITIONS(-DESP32)
list(APPEND DEFINITIONS "ESP32")
{
"folders": [
{
"path": "."
},
{
"path": "../IotWebConf-examples/IotWebConf01Minimal"
},
{
"path": "../IotWebConf-examples/IotWebConf02StatusAndReset"
},
{
"path": "../IotWebConf-examples/IotWebConf03CustomParameters"
},
{
"path": "../IotWebConf-examples/IotWebConf03TypedParameters"
},
{
"path": "../IotWebConf-examples/IotWebConf04UpdateServer"
},
{
"path": "../IotWebConf-examples/IotWebConf05Callbacks"
},
{
"path": "../IotWebConf-examples/IotWebConf06MqttApp"
},
{
"path": "../IotWebConf-examples/IotWebConf07MqttRelay"
},
{
"path": "../IotWebConf-examples/IotWebConf08WebRelay"
},
{
"path": "../IotWebConf-examples/IotWebConf09CustomConnection"
},
{
"path": "../IotWebConf-examples/IotWebConf10CustomHtml"
},
{
"path": "../IotWebConf-examples/IotWebConf11AdvancedRuntime"
},
{
"path": "../IotWebConf-examples/IotWebConf12CustomParameterType"
},
{
"path": "../IotWebConf-examples/IotWebConf13OptionalGroup"
},
{
"path": "../IotWebConf-examples/IotWebConf14GroupChain"
},
{
"path": "../IotWebConf-examples/IotWebConf15MultipleWifi"
},
{
"path": "../IotWebConf-examples/IotWebConf16OffLineMode"
},
{
"path": "../IotWebConf-examples/IotWebConf17JsonConfig"
}
],
"settings": {
"workbench.tree.indent": 16
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module">
<option name="configuration">
<map />
</option>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="sonarModuleSettings">
<option name="alternativeWorkingDirPath" value="" />
<option name="localAnalysisScripName" value="&lt;PROJECT&gt;" />
<option name="serverName" value="&lt;PROJECT&gt;" />
<option name="useAlternativeWorkingDir" value="false" />
<option name="workingDirSelection" value="&lt;MODULE&gt;" />
</component>
</module>
\ No newline at end of file
The MIT License (MIT)
Copyright 2018 Balazs Kelemen <prampec+arduino@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# IotWebConf [![Build Status](https://github.com/prampec/IotWebConf/workflows/PlatformIO%20CI/badge.svg?branch=master)](https://github.com/prampec/IotWebConf/actions/workflows/test.platformio.yml)
## Upgrading to v3.0.0
Lately version 3.0.0 is released. This release is not backward compatible with
older versions, and some modification have to be done on existing codes.
**Please visit [Migration Guide](doc/MigrationGuide-v3.0.0.md) for
details!**
## Summary
IotWebConf is an Arduino library for ESP8266/ESP32 to provide a non-blocking standalone WiFi/AP web configuration portal.
**For ESP8266, IotWebConf requires the esp8266 board package version 2.4.2 or later!**
Please subscribe to the [discussion forum](https://groups.google.com/forum/#!forum/iotwebconf), if you want to be informed on the latest news.
Also visit experimental [Discord server](https://discord.gg/GR3uQeD).
**HELP WANTED!** If you are testing any GIT branches, please give me feedback to provide stable releases for the public.
## Highlights
- Manages WiFi connection settings,
- Provides a config portal user interface,
- You can extend the configuration with your own sophisticated propery structure, that is stored automatically,
- Option to configure multiple WiFi connections. (Try next when the
last used one is just not available.)
- HTML customization,
- Validation support for the configuration property items,
- User code will be notified of status changes with callback methods,
- Configuration (including your custom items) stored in the EEPROM,
- Firmware OTA update support,
- Config portal remains available even after WiFi is connected,
- Automatic "Sign in to network" pop up in your browser (captive portal),
- Non-blocking - Your custom code will not be blocked in the whole process.
- Well documented header file, and examples from simple to complex levels.
![Screenshot](https://sharedinventions.com/wp-content/uploads/2018/11/Screenshot_20181105-191748a.png)
![Screenshot](https://sharedinventions.com/wp-content/uploads/2019/02/Screenshot-from-2019-02-03-22-16-51b.png)
## How it works
The idea is that the Thing will provide a web interface to allow modifying its configuration. E.g. for connecting to a local WiFi network, it needs the SSID and the password.
When no WiFi is configured, or the configured network is unavailable it creates its own AP (access point), and lets clients connect to it directly to make the configuration.
Furthermore there is a button (or let's say a Pin), that when pressed on startup will cause a default password to be used instead of the configured (forgotten) one.
You can find the default password in the sources. :)
IotWebConf saves configuration in the "EEPROM". You can extend the config portal with your custom configuration items. Those items will be also maintained by IotWebConf.
Visit [Users Manual](doc/UsersManual.md) for detailed description!
## Use cases
1. **You turn on your IoT the first time** - It turns into AP (access point) mode, and waits for you on the 192.168.4.1 address with a web interface to set up your local network (and other configurations). For the first time a default password is used when you connect to the AP. When you connect to the AP, your device will likely automatically pop up the portal page. (We call this a Captive Portal.) When configuration is done, you must leave the AP. The device detects that no one is connected, and continues with normal operation.
1. **WiFi configuration is changed, e.g. the Thing is moved to another location** - When the Thing cannot connect to the configured WiFi, it falls back to AP mode, and waits for you to change the network configuration. When no configuration was made, then it keeps trying to connect with the already configured settings. The Thing will not switch off the AP while anyone is connected to it, so you must leave the AP when finished with the configuration.
1. **You want to connect to the AP, but have forgotten the configured AP WiFi password you set up previously** - Connect the appropriate pin on the Arduino to ground with a push button. Holding the button pressed while powering up the device causes the Thing to start the AP mode with the default password. (See Case 1. The pin is configured in the code.)
1. **You want to change the configuration before the Thing connects to the Internet** - Fine! The Thing always starts up in AP mode and provides you a time frame to connect to it and make any modification to the configuration. Any time one is connected to the AP (provided by the device) the AP will stay on until the connection is closed. So take your time for the changes, the Thing will wait for you while you are connected to it.
1. **You want to change the configuration at runtime** - No problem. IotWebConf keeps the config portal up and running even after the WiFi connection is finished. In this scenario you must enter username "admin" and password (already configured) to enter the config portal. Note, that the password provided for the authentication is not hidden from devices connected to the same WiFi network. You might want to force rebooting of the Thing to apply your changes.
## User notes
- In the config portal you can double-tap on a password to reveal what
you have typed in. (Double-tap again to hide revealed text.)
- When accessing the config portal via connected WiFi network a dialog
with user-name and password will pop up. The password is the one you
have configured for "AP password". The user name is "admin".
- Consult [Users Manual](doc/UsersManual.md) for more details!
## IotWebConf vs. WiFiManager
tzapu's WiFiManager is a great library. The features of IotWebConf may appear very similar to WiFiManager. However, IotWebConf tries to be different.
- WiFiManager does not allow you to configure **mutiple WiFi** connections. In IotWebConf there is a way to define more connections: if one is not available, the next is tried automatically.
- ~~WiFiManager does not manage your **custom properties**.~~ IotWebConf stores your configuration in "EEPROM".
- WiFiManager does not do **validation**. IotWebConf allow you to validate your property changes made in the config portal.
- ~~WiFiManager does not support ESP32.~~
- ~~With WiFiManager you cannot use both startup and **on-demand configuration**.~~ With IotWebConf the config portal remains available via the connected local WiFi.
- WiFiManager provides list of available networks, and an information page, while these features are cool, IotWebConf tries to keep the code simple. So these features are not (yet) provided by IotWebConf.
- IotWebConf is fitted for more advanced users. You can keep control of the web server setup, configuration item input field behavior, and validation.
## Security aspects
- The initial system password must be modified by the user, so there is no build-in password.
- When connecting in AP mode, the WiFi provides an encryption layer (WPA/WPA2), so all your communication here is known to be safe. (The exact wifi encryption depends on the used board/chipset and implementation in the related esp/arduino framework.)
- When connecting through a WiFi router (WiFi mode), the Thing will ask for authentication when someone requests the config portal. This is required as the Thing will be visible for all devices sharing the same network. But be warned by the following note...
- NOTE: **When connecting through a WiFi router (WiFi mode), your communication is not hidden from devices connecting to the same network.** It communicates over unencrypted HTTP. So either: Do not allow ambiguous devices connecting to your WiFi router, or configure your Thing only in AP mode!
- However IotWebConf has a detailed debug output, passwords are not shown in this log by default. You have
to enable password visibility manually in the IotWebConf.h with the IOTWEBCONF_DEBUG_PWD_TO_SERIAL
if it is needed.
## Compatibility
IotWebConf is primary built for ESP8266. But meanwhile it was discovered, that the code can be adopted
to ESP32. There are two major problems.
- ESP8266 uses specific naming for it's classes (e.g. ESP8266WebServer). However, ESP32 uses a more generic naming (e.g. WebServer). The idea here is to use the generic naming hoping that ESP8266 will adopt these "standards" sooner or later.
- ESP32 does not provide an HTTPUpdateServer implementation. So in this project we have implemented one. Whenever ESP32 provides an official HTTPUpdateServer, this local implementation will be removed.
## Customizing and extending functionality
IotWebConf is ment to be developer friendly by providing lots
of customization options. See [HackingGuide](doc/HackingGuide.md) for
details.
## TODO / Feature requests
- We might want to add a "verify password" field.
- Provide an option, where IotWebConf renders HTML-response,
handles HTTP-request for a specific branch of groups.
- Separate WiFi management from the code, so config portal can also
be a standalone solution without any WiFi.
## Known issues
- It is reported, that there might be unstable working with different lwIP variants. If you experiment serious problems, try to select another lwIP variant for your board in the Tools menu! (Tested with "v2 Lower Memory" version.)
## Credits
Although IotWebConf started without being influenced by any other solutions, in the final code you can find some segments borrowed from the WiFiManager library.
- https://github.com/tzapu/WiFiManager
Thanks to [all contributors](https://github.com/prampec/IotWebConf/graphs/contributors) providing patches for the library!
# IotWebConf hacking guide
IotWebConf comes with a lot of examples. These examples are intended
to be easy to use, with clear goals. While IotWebConf is also ment to be
developer friendly, providing lots of customization options.
This documentation will try to explain features where you can customize
IotWebConf on your need, or where a feature explanation might be out of the
scope of regular examples.
Please note, that header files are full of
documentation, so please heavily consult ```IotWebConf.h``` header file
while/beside reading this documentation.
__Contents__:
- [PlatformIO](#using-iotwebconf-with-platformio)
- [Compile time configuration](#compile-time-configuration)
- [Groups and Parameters](#groups-and-parameters)
- [Optional and chained groups](#optional-and-chained-groups)
- [Using System parameter-group](#using-system-parameter-group)
- [Alternative WiFi connection](#alternative-wifi-connection)
- [Accessing system properties](#accessing-system-properties)
- [Use custom style](#use-custom-style)
- [Create your property class](#create-your-property-class)
- [Typed parameters](#typed-parameters-experimental)
- [Control on WiFi connection status change](#control-on-wifi-connection-status-change)
- [Use alternative WebServer](#use-alternative-webserver)
## Using IotWebConf with PlatformIO
It is recommended to use PlatformIO instead of the Arduino environment.
With v3.0.0, a folder ```pio``` is provided with scripts that transforms
examples to PlatformIO compatible format. You can use these as templates
for your project. (On the other hand, these scripts creating soft-link
loops, and having soft link loops in these folders might cause Arduino
and other environment to fail. Just keep in mind, if something goes
wrong with your IDE, then examples-pio is likely the corporate.)
## Compile time configuration
IotWebConf includes a configuration file named IotWebConfSettings.h.
This configuration file works on C pre-compiler mechanism. This means
you cannot use it in Arduino environment, so I encourage everyone to
switch to PlatformIO.
In the PlatformIO you can do configuration changes by adding lines to
platformio.ini like this:
```
build_flags =
-DIOTWEBCONF_DEFAULT_WIFI_CONNECTION_TIMEOUT_MS="60000"
-DIOTWEBCONF_DEBUG_DISABLED
```
**Note:** You must not use ```#define IOTWEBCONF_CONFIG_START 20```, or
similar defines in your .ino file (e.g. before the includes). It will eventually
just not work, as all .cpp files are compiled separately for each other.
Thus, you must use the ```-D``` compiler flag for the job.
## Groups and Parameters
With version 3.0.0 IotWebConf introduces individual parameter classes for
each type, and you can organize your parameters into groups.
You can also free to add groups into groups to make a tree hierarchy.
## Optional and chained groups
With ```OptionalParameterGroup```, the group you have defined will have
a special appearance in the config portal, as the fieldset in which the
group items are shown can be hidden (inactive) / shown (active).
E.g you want to create a group with property items, that are not mandatory,
so you can hide these options in the config portal by default, and
only reveal the contents, when it is strictly requested.
There is a specific example covering this very feature under
```IotWebConf13OptionalGroup```.
```ChainedParameterGroup```s can be linked. One after another. The
property sets will reveal on after another, when user requests is. The
difference between ```OptionalParameterGroup``` and ```ChainedParameterGroup```
is that second group item in a chained list can only be added, when
the first item is already visible.
There is a specific example covering this very feature under
```IotWebConf14GroupChain```.
## Using system parameter-group
By default, you should add your own parameter group, that will appear as
a new field-set on the Config Portal. However, there is a special group
maintained by IotWebConf called the System group, where you are also
allowed to add your own custom properties.
Example:
```
iotWebConf.addSystemParameter(&stringParam);
```
You can directly access system-parameter group by calling
```getSystemParameterGroup()```.
Example:
```
ParameterGroup* systemParameters = iotWebConf.getSystemParameterGroup();
systemParameters.label = "My Custom Label";
```
There is another group "WiFi parameters" managed by IotWebConf, that
can be retrieved by getWifiParameterGroup().
## Alternative WiFi connection
With v3.0.0 you can set up multiple WiFi connection by utilizing the
MultipleWifiAddition class can be found in IotWebConfMultipleWifi.h .
This class basically set up some handlers in iotWebConf to
1. display optional WiFi settings in admin GUI,
2. use these alternative settings in case previous WiFi connection
attempts fails.
The maximal number of connection settings are determined compile-time,
as we want to avoid any dynamic memory allocations in Arduino.
There is a complete example covering this topic, please visit example
```IotWebConf15MultipleWifi```!
## Accessing system properties
IotWebConf comes with some parameters, that are required for the basic
functionality. You can retrieve these parameter by getters, e.g.
```getThingNameParameter()```. You can directly modify these items as
seen in the code block below.
There is a dedicated example covering this topic, so please visit
example ```IotWebConf11AdvancedRuntime```!
```
// -- Update Thing name
strncpy(
iotWebConf.getThingNameParameter()->valueBuffer,
"My changed name",
iotWebConf.getThingNameParameter()->getLength());
iotWebConf.saveConfig();
```
Here is list of some of the system parameter-acccessors, please consult
IotWebConf.h for further details.
- getSystemParameterGroup()
- getThingNameParameter()
- getApPasswordParameter()
- getWifiParameterGroup()
- getWifiSsidParameter()
- getWifiPasswordParameter()
- getApTimeoutParameter()
## Use custom style
You can provide your own custom HTML template by updating default
HTML format provider. For this you should utilize the
```setHtmlFormatProvider()``` method.
There is a complete example about this topic, so please visit example
```IotWebConf10CustomHtml```!
## Create your property class
With version 3.0.0 you are free to create your own property class.
It is done by inheriting the iotwebconf::Parameter C++ class. You can use
other property types e.g. PasswordProperty as a template for this.
Now, custom properties are mainly handy, when you would like to create
some special HTML form item. But eventually you can change the whole
behaviour of your parameter handling. E.g. by overriding ```storeValue()```
and ```loadValue()``` you can basically convert your internal data format
to whatever you like. The [Typed parameters](#typed-parameters-experimental)
approach is just an excellent example for this option.
You can also override ParameterGroup class in case you need some special
group appearance.
There is a complete example about this topic, so please visit example
```IotWebConf12CustomParameterType```!
## Typed parameters (experimental)
A new parameter structure is introduced, where the parameters does not
require a "valueBuffer" anymore. Storing the parameter is done in a
native format, e.g. a 8-bit integers are stored in one byte of EEPROM.
This was achieved by utilizing the ```template``` technology of C++.
While the result is spectacular, the ```template``` makes thing very
complicated under the hood.
Builder pattern is also introduced for the typed parameters. See example
```IotWebConf03TypedParameters``` for details. Please compare example
IotWebConf03TypedParameters and IotWebConf03TypedParameters for the
difference in the usage of the two different approach.
**Please note, that Typed Parameters are very experimental, and the
interface might be a subject of change in the future.**
![UML diagram of the Typed Parameters approach.](TParameter.png)
(This image was created by PlantUML, the source file is generate with command
```hpp2plantuml -i src/IotWebConfTParameter.h -o doc/TParameter.plantuml```)
## Control on WiFi connection status change
IotWebConf provides a feature to control WiFi connection events by defining
your custom handler event handler.
With ```setWifiConnectionFailedHandler()``` you can set up a handler, that
will be called, when a connection to a WiFi network failed (most likely
timed out). Now, when you return with a new valid connection-info from
your callback, IotWebConf will not fall back to AP mode, but try the
connection you have just provided. With this method you can theoretically
set up multiple WiFi networks for IotWebConf to try connect to after
one-by-one if the previous one fails. Some days IotWebConf might also
provide this feature out of the box.
There is a second method, where you can define a specific handler, this
is the ```setWifiConnectionHandler()```. Your method will be called when
IotWebConf trying to establish connection to a WiFi network.
For details please consult ```IotWebConf.h``` header file!
## Use alternative WebServer
There was an expressed need from your side for supporting specific types of
Web servers. (E.g https
web server or async web server.) So, with v3.0.0 there is an option to
use web server of your choice. To achieve this, you will call IotWebConf
constructor, that accepts a ```WebServerWrapper``` pointer.
In the WebServerWrapper you have the implement all expected web server
functionalities (as seen in the header file). You can use
the ```StandardWebServerWrapper``` as a template for that.
Further more, you also need to provide your custom ```WebRequestWrapper```
instances when calling ```handleCaptivePortal()```, ```handleConfig()``` and
```handleNotFound()```.
Unfortunately I currently do not have the time to implement solutions
for Async Web Server os Secure Web Server. If you can do that with the
instruction above, please provide me the pull request!
# Migration guide to v3.0.0
In v3.0.0 some changes were introduced, that are not backward
compatible with v2.x.x versions.
This guide contains all modifications that should be done in existing
codes, to reflect the changes.
For better understanding some code examples are also shown here, but
I would recommend comparing git changes in the examples.
## Changes introduced in v3.0.0
- [Namespaces](#namespaces)
- [Parameter classes](#parameter-classes)
- [Parameter grouping](#grouping-parameters)
- [Default value handling](#default-value-handling)
- [Hidden parameters](#hidden-parameters)
- [UpdateServer changes](#updateserver-changes)
- [configSave](#configsave)
- [formValidator](#formvalidator)
## Namespaces
With v3.0.0, IotWebConf library started to use namespaces. Namespace
is a C++ technique, where to goal is to avoid name collision over
different libraries.
The namespace for IotWebConf become ```iotwebconf::```. From now on
you should use this prefix for each type defined by the library
except for the IotWebConf class itself.
There are more ways to update your code. Let's see some variations!
### Migration steps: easy way
For easy migration IotWebConf has provided a header file prepared
with predefined aliases to hide namespaces, so you can still use
the legacy types.
Include helper header file as follows.
Code before:
```C++
#include <IotWebConf.h>
```
Code after:
```C++
#include <IotWebConf.h>
#include <IotWebConfUsing.h>
```
### Migration steps: proper way
Use namespace prefixes before every type name.
Code before:
```C++
IotWebConfParameter mqttServerParam =
IotWebConfParameter("MQTT server", "mqttServer", mqttServerValue, STRING_LEN);
```
Code after:
```C++
iotwebconf::Parameter mqttServerParam =
iotwebconf::Parameter("MQTT server", "mqttServer", mqttServerValue, STRING_LEN);
```
### Migration steps: optimist way
Define namespaces at the beginning of the code and use simple type name.
Everywhere later on. This works only until name-collision with other
library occur.
Code after:
```C++
using namespace iotwebconf;
...
Parameter mqttServerParam =
Parameter("MQTT server", "mqttServer", mqttServerValue, STRING_LEN);
```
## Parameter classes
Previously there was just the ```IotWebConfParameter``` and the
actual type was provided as an argument of this one-and-only type.
Now it turned out, that it is a better idea to use specific classes
for each individual types. So from now on you must specify the type
of the parameter by creating that very type e.g. using
```IotWebConfTextParameter```.
For compatibility reasons the signature is the same before, except
the type string should not be provided anymore.
New parameter types are also introduced (e.g.
```IotWebConfSelectParameter```),
and it is very likely that with newer versions, more and more types will
arrive.
Creating your custom parameter is now become much more easy as well.
### Migrations steps
Replace IotWebConfParameter types with specific parameter type.
Code before:
```C++
IotWebConfParameter mqttServerParam =
IotWebConfParameter("MQTT server", "mqttServer", mqttServerValue , STRING_LEN);
IotWebConfParameter mqttUserPasswordParam =
IotWebConfParameter("MQTT password", "mqttPass", mqttUserPasswordValue , STRING_LEN, "password");
```
Code after:
```C++
IotWebConfTextParameter mqttServerParam =
IotWebConfTextParameter("MQTT server", "mqttServer", mqttServerValue , STRING_LEN);
IotWebConfPasswordParameter mqttUserPasswordParam =
IotWebConfPasswordParameter("MQTT password", "mqttPass ", mqttUserPasswordValue, STRING_LEN);
```
Note, that ```IotWebConfTextParameter``` and
```IotWebConfPasswordParameter``` words are just aliases and eventually you
should use ```iotwebconf::TextParameter```,
```iotwebconf::PasswordParameter```, etc.
_Note, that with version 3.0.0 a new typed parameter approach is introduced,
you might want to immediately migrate to this parameter types, but
typed-parameters are still in testing phase and might be a subject of
change._
## Grouping parameters
With v3.0.0 "separator" disappears. Separators were used to create
field sets in the rendered HTML. Now you must directly define connected
items by adding them to specific parameter groups.
(It is also possible to add a group within a group.)
You need to add prepared groups to IotWebConf instead of individual
parameters. (However there is a specific group created by IotWebConf for
storing system parameters, you can also add your
properties into the system group.)
Code before:
```C++
IotWebConfSeparator separator1 =
IotWebConfSeparator();
IotWebConfParameter intParam =
IotWebConfParameter("Int param", "intParam", intParamValue, NUMBER_LEN, "number",
"1..100", nullptr, "min='1' max='100' step='1'");
...
void setup()
{
...
iotWebConf.addParameter(&separator1);
iotWebConf.addParameter(&intParam);
...
```
Code after:
```C++
IotWebConfParameterGroup group1 =
IotWebConfParameterGroup("group1", "");
IotWebConfNumberParameter intParam =
IotWebConfNumberParameter("Int param", "intParam", intParamValue, NUMBER_LEN,
"20", "1..100", "min='1' max='100' step='1'");
...
void setup()
{
...
group1.addItem(&intParam);
...
iotWebConf.addParameterGroup(&group1);
...
```
Also note, that ```IotWebConfParameterGroup``` and
```IotWebConfNumberParameter``` words are just aliases and eventually you
should use ```iotwebconf::ParameterGroup```,
```iotwebconf::NumberParameter```, etc.
## Default value handling
For the Parameters you could always specify "defaultValue". In v2.x
.x this value was intended to be appeared in the config portal, if no
values are specified. Now with v3.0.0, defaultValue has a different
meaning. Now it is
automatically assigned to the parameter, when this is the **first
time** configuration is loading.
This means you do not have to set these values manually.
In the example below, the body of the ```if``` is done by IotWebConf
automatically.
```
// -- Initializing the configuration.
bool validConfig = iotWebConf.init();
if (!validConfig)
{
// DO NOT DO THIS! Use default values instead.
strncpy(mqttServerValue, "192.168.1.10", STRING_LEN);
}
```
## Hidden parameters
IotWebConf can save and load parameters, that are not populated to the
web interface. To mark an item as hidden, you should have set the last
parameter of the constructor to visible=false.
From v3.0.0, you will need to add hidden items to a specific group managed
by IotWebConf.
```
iotWebConf.addHiddenParameter(&myHiddenParameter);
```
## UpdateServer changes
In prior versions, IotWebConf activated HTTP Update server automatically.
With version 3.0.0, IotWebConf dropped the dependency to UpdateServer. The
activation will still be triggered, but the actual switching action
should be provided externally (at your code).
A quite complicated code needs to introduced because of this change, and
you need to manually include UpdateServer to your code. See example:
```IotWebConf04UpdateServer``` for details!
Changed lines:
```
// Include Update server
#ifdef ESP8266
# include <ESP8266HTTPUpdateServer.h>
#elif defined(ESP32)
# include <IotWebConfESP32HTTPUpdateServer.h>
#endif
// Create Update Server
#ifdef ESP8266
ESP8266HTTPUpdateServer httpUpdater;
#elif defined(ESP32)
HTTPUpdateServer httpUpdater;
#endif
// In setup register callbacks performing Update Server hooks.
iotWebConf.setupUpdateServer(
[](const char* updatePath) { httpUpdater.setup(&server, updatePath); },
[](const char* userName, char* password) { httpUpdater.updateCredentials(userName, password); });
```
Note, that ESP32 still doesn't provide Update Server solution out of the
box. IotWebConf still provides an implementation for that, but it is now
completely independent of the core codes.
## configSave
Method configSave is renamed to saveConfig.
## formValidator
The formValidator() methods from now on will have a
```webRequestWrapper``` parameter.
```
bool formValidator(iotwebconf::WebRequestWrapper* webRequestWrapper);
```
\ No newline at end of file
@startuml
/' Objects '/
namespace iotwebconf {
class BoolDataType {
+BoolDataType()
#fromString() : bool
}
class CharArrayDataType <len> {
+CharArrayDataType()
#update() : bool
#getInputLength() : int
#applyDefaultValue() : void
#loadValue() : void
#storeValue() : void
}
class CheckboxTParameter {
+CheckboxTParameter()
#renderHtml() : String
+isChecked() : bool
#getInputType() : char*
-_checkedStr : const char*
#update() : void
}
abstract class ConfigItemBridge {
#ConfigItemBridge()
#{abstract} toString() : String
#{abstract} update() : bool
#getInputLength() : int
+debugTo() : void
+update() : void
}
abstract class DataType <ValueType, (_DefaultValueType)> {
+DataType()
#toString() : String
#_value : ValueType
+getValue() : ValueType&
+operator*() : ValueType&
#_defaultValue : _DefaultValueType
#{abstract} update() : bool
#validate() : bool
#getStorageSize() : int
}
class DoubleDataType {
+DoubleDataType()
#fromString() : double
}
class FloatDataType {
+FloatDataType()
#fromString() : float
}
class FloatTParameter {
+FloatTParameter()
+isMaxDefined() : bool
+isMinDefined() : bool
#getInputType() : char*
+getMax() : float
+getMin() : float
}
abstract class InputParameter {
+InputParameter()
+getCustomHtml() : String
#getHtmlTemplate() : String
#renderHtml() : String
#{abstract} getInputType() : char*
+customHtml : const char*
+errorMessage : const char*
+label : const char*
+placeholder : const char*
#clearErrorMessage() : void
+renderHtml() : void
+setPlaceholder() : void
}
class IntTParameter <ValueType, (base)> {
+IntTParameter()
+getMax() : ValueType
+getMin() : ValueType
+isMaxDefined() : bool
+isMinDefined() : bool
#getInputType() : char*
}
class IpDataType {
#toString() : String
#update() : bool
}
class OptionsTParameter <len> {
+OptionsTParameter()
#OptionsTParameter()
#_optionNames : const char*
#_optionValues : const char*
#_nameLength : size_t
#_optionCount : size_t
+setNameLength() : void
+setOptionCount() : void
+setOptionNames() : void
+setOptionValues() : void
}
class PasswordTParameter <len> {
+PasswordTParameter()
#renderHtml() : String
+update() : bool
#getInputType() : char*
-_customHtmlPwd : const char*
+debugTo() : void
}
abstract class PrimitiveDataType <ValueType> {
+PrimitiveDataType()
-_max : ValueType
-_min : ValueType
#{abstract} fromString() : ValueType
#getMax() : ValueType
#getMin() : ValueType
#isMaxDefined() : ValueType
#isMinDefined() : ValueType
-_maxDefined : bool
-_minDefined : bool
#update() : bool
#applyDefaultValue() : void
#loadValue() : void
+setMax() : void
+setMin() : void
#storeValue() : void
}
abstract class PrimitiveInputParameter <ValueType> {
+PrimitiveInputParameter()
+getCustomHtml() : String
+{abstract} getMax() : ValueType
+{abstract} getMin() : ValueType
+step : ValueType
+{abstract} isMaxDefined() : bool
+{abstract} isMinDefined() : bool
+setStep() : void
}
class SelectTParameter <len> {
+SelectTParameter()
+SelectTParameter()
#renderHtml() : String
}
class SignedIntDataType <ValueType, (base)> {
+SignedIntDataType()
#fromString() : ValueType
}
class StringDataType {
#toString() : String
#update() : bool
}
class TextTParameter <len> {
+TextTParameter()
#getInputType() : char*
}
class UnsignedIntDataType <ValueType, (base)> {
+UnsignedIntDataType()
#fromString() : ValueType
}
}
/' Inheritance relationships '/
iotwebconf.BoolDataType <|-- iotwebconf.CheckboxTParameter
iotwebconf.CharArrayDataType <|-- iotwebconf.PasswordTParameter
iotwebconf.CharArrayDataType <|-- iotwebconf.TextTParameter
iotwebconf.ConfigItemBridge <|-- iotwebconf.DataType
iotwebconf.ConfigItemBridge <|-- iotwebconf.InputParameter
iotwebconf.DataType <|-- iotwebconf.CharArrayDataType
iotwebconf.DataType <|-- iotwebconf.IpDataType
iotwebconf.DataType <|-- iotwebconf.PrimitiveDataType
iotwebconf.DataType <|-- iotwebconf.StringDataType
iotwebconf.FloatDataType <|-- iotwebconf.FloatTParameter
iotwebconf.InputParameter <|-- iotwebconf.CheckboxTParameter
iotwebconf.InputParameter <|-- iotwebconf.PasswordTParameter
iotwebconf.InputParameter <|-- iotwebconf.PrimitiveInputParameter
iotwebconf.InputParameter <|-- iotwebconf.TextTParameter
iotwebconf.OptionsTParameter <|-- iotwebconf.SelectTParameter
iotwebconf.PrimitiveDataType <|-- iotwebconf.BoolDataType
iotwebconf.PrimitiveDataType <|-- iotwebconf.DoubleDataType
iotwebconf.PrimitiveDataType <|-- iotwebconf.FloatDataType
iotwebconf.PrimitiveDataType <|-- iotwebconf.SignedIntDataType
iotwebconf.PrimitiveDataType <|-- iotwebconf.UnsignedIntDataType
iotwebconf.PrimitiveInputParameter <|-- iotwebconf.FloatTParameter
iotwebconf.PrimitiveInputParameter <|-- iotwebconf.IntTParameter
iotwebconf.SignedIntDataType <|-- iotwebconf.IntTParameter
iotwebconf.TextTParameter <|-- iotwebconf.OptionsTParameter
/' Aggregation relationships '/
/' Nested objects '/
@enduml
# IotWebConf users manual template
This documentation is mainly for makers are about to came out with their
own product, and prepare for that with a Users manual.
Or for ones who are want to understand the basic functionality of
IotWebConf.
This document can be used as a template, modify it with the actual
product specific details. We will only cover the basic functionality
(including status and reset), but will __not__ talk about options like:
- Firmware update (OTA),
- Static IP option,
- Multiply WiFi option,
- Offline mode option,
- Skip AP-mode option.
#### Hardware setup
The document assumes, that the device is equipped with
the indicator LED and the "reset" button, just as it can be seen
in example `IotWebConf02StatusAndReset`.
As mentioned above a "default" options-set is assumed as well.
## Starting up the device at the first time
When you are starting up the device for the first time, the device
will create its own WiFi Access Point with SSID _testThing_.
The status indicator rapidly flashes (it is mostly on).
Use your smartphone (or tablet, or computer) to detect the created
WiFi network, and connect to it by using the default password
_smrtThng8266_. After a successful WiFi connection a configuration
page is popped up in your smartphone's web browser.
Note, that at this point even if the network is not configured,
the device is already ready to use with the factory defaults in
an off-line manner.
## Configuration page (Config portal)
After you have connected to the access point created by the
device (as described above), you need to enter the configuration
page on the web-browser of your smartphone.
On the configuration page you will see some fields you can
set.
Except for the password fields, you will see the item values
previously set. (Or for first time setup, the factory default.)
For the password fields you will never see any previously set
values, and typed values are also hidden. You can __reveal the
password__ text you have typed by double-clicking (double-tapping) on
the password field. You can then double-click (double-tap)
a second time to hide the text again. It is recommended to
hide the passwords before submitting the configuration form,
as browsers are likely to save non-password form values to
use them as recommendation.
_TODO: you can provide some more description on specific
fields you are about to use._
When you are finished providing all the values of your need,
please press the Apply button.
Some fields are protected with constraints, and a validation is
performed. In case there is an error in the validation of
any field none of them are saved. You even need to re-type values
for filled-out passwords in this case.
## Configuration options
After the first boot, there are some values needs to be set up.
These items are maked with __*__ (star) in the list below.
You can set up the following values in the configuration page:
- __Thing name__ - Please change the name of the device to
a name you think describes it the most. It is advised to
incorporate a location here in case you are planning to
set up multiple devices in the same area. You should only use
english letters, and the "_" underscore character. Thus, must not
use Space, dots, etc. E.g. `lamp_livingroom` __*__
- __AP password__ - This password is used, when you want to
access the device later on. You must provide a password with at least 8,
at most 32 characters.
You are free to use any characters, further more you are
encouraged to pick a password at least 12 characters long containing
at least 3 character classes. __*__
- __WiFi SSID__ - The name of the WiFi network you want the device
to connect to. __*__
- __WiFi password__ - The password of the network above. Note, that
unsecured passwords are not supported in your protection. __*__
_TODO: add your own configuration here_
Note, that in "First boot" mode you are free to save any
partial data, but on-line mode will not enter until you have
provided all mandatory data.
## Connecting to a WiFi network
When you have successfully applied the mandatory configurations,
the device will try to connect to the required WiFi network. While
connecting, the indicator LED will alter between On/Off in a moderated
speed.
If the WiFi connection is successfull, the indicator LED will turn off,
and performes rapid blinks with long delays.
If the WiFi connection fails, the device will __fall back to Access Point
mode__. This means, that the device will form its own WiFi network, on
what you can connect to, and correct network connection setup.
This time you will see the `Thing Name` value as the access point name
(SSID),
and you need to use the `AP password` you have configured previously.
This also means, that if the configured WiFi network is not available,
the device will fall back to Access Point mode, stays there for some
seconds (so that you can perform changes if needed), and after some
seconds it will __retry connecting to the WiFi network__.
The Access Point mode is indicated with rapid blinks, where the indicator
LED is mostly on.
Access Point mode will kept as long as any connection is alive to it.
Thus, you need to disconnect from the Access Point for the device to
continue its operation.
## Second startup and rescue mode
In case you have already set up a WiFi network in the config portal,
the device will automatically tries to (re)connect to it. However,
when the device boots up it will __always starts the Access Point
mode__ as described in previous section.
In case you have __lost the password__ you have configured, you need to
enter the rescue mode. To __enter the rescue mode__, you need to press
and hold the button on the device while powering it up. This time you
can enter the Access Point provided by the device with the factory-default
password, that is _smrtThng8266_. The rescue mode will not be release
until you have connected to the access point, it will be
released after you have disconnected from it.
## Configuration in connected mode
After the device successfully connected to the configured WiFi network
the temporary Access Point is terminated, but you can still connect
to the device using its IP address. To determine the IP address of the
device, you might want to consult with your WiFi router. (Devices
are intented to be access by name as well, but this option is not
reliable, thus, it cannot be recommended.)
When you want to access the Config Portal of the device __via a WiFi
network__ from your Web Browser, a login page will be displayed, where
you need to enter:
- User name: `admin`
- Password: the password you have set up previously as __AP Password__.
#### Security notes connecting from WiFi network
While WiFi networks are known to be relatively safe by hiding its trafic
from the public, it is not safe between parties connected to the network.
And our device does not support secure Web connection.
This means, when enter the configuration page via WiFi network, other
parties can monitor your traffic.
Recommendations to avoid compromisation:
- Try to make your configurations in Access Point mode,
- Set up a dedicated WiFi network to your IOT devices, where uncertain
parties are not allowed to connect.
## Blinking codes
Prevoius chapters were mentioned blinking patterns, now here is a
table summarize the menaning of the blink codes.
- __Rapid blinking__ (mostly on, interrupted by short off periods) -
Entered Access Point mode. This means the device create an own WiFi
network around it. You can connect to the device with your smartphone
(or WiFi capable computer).
- __Alternating on/off blinking__ - Trying to connect the configured
WiFi network.
- __Mostly off with occasional short flash__ - The device is online.
## Troubleshooting
>I have turned on my device, but it blinks like crazy. What should I do?
- Diagnose: Your device is not configured.
- Solution:
You need to turn on your smartphone, search for WiFi networks, and connect
to `testThing`. Follow the instruction at
[Starting up the device at the first time](#starting-up-the-device-at-the-first-time)
>After I start up the device, the device just blinks as crazy and
>later chills. But while it is blinking I cannot connect to it. Is this
>intended?
- Diagnose: This is an expected behaviour. At startup time you are able
connect directly
to the device directly via a temporary created access point to perform some
configuration changes. (The idea here, is that you can change WiFi
setting in case it was changed before trying to connect to it.)
>My device is either blinks like crazy, or with an alternating pattern,
>but eventually it does not stop that. Why is that?
- Diagnose: Your device cannot connect to the configured WiFi
network.
Your network setup was changed, you have miss-typed the settings, or
the device is out of the network range.
- Solution: At the time the device rapidly blinks, connect to it with
your smartphone and alter the WiFi configuration (SSID and password).
If this doesn't help try to provide stronger WiFi signal for the device.
> I have forgot the password I have set. What should I do?
- Solution: Turn off your device. Press and hold the button on the
device while powering it up. The device will start up in Access Pont
mode, you can connect to this temporary WiFi network with your
smartphone using the initial password, that is _smrtThng8266_, and
set up a new password for the device.
\ No newline at end of file
# Datatypes (KEYWORD1)
# Methods and Functions (KEYWORD2)
# Constants (LITERAL1)
# IotWebConf.h
WifiAuthInfo KEYWORD1
HtmlFormatProvider KEYWORD1
getHead KEYWORD2
getStyle KEYWORD2
getScript KEYWORD2
getHeadExtension KEYWORD2
getHeadEnd KEYWORD2
getFormStart KEYWORD2
getFormEnd KEYWORD2
getFormSaved KEYWORD2
getEnd KEYWORD2
getUpdate KEYWORD2
getConfigVer KEYWORD2
StandardWebRequestWrapper KEYWORD1
StandardWebServerWrapper KEYWORD1
WifiParameterGroup KEYWORD1
IotWebConf KEYWORD1
setConfigPin KEYWORD2
setStatusPin KEYWORD2
setupUpdateServer KEYWORD2
init KEYWORD2
doLoop KEYWORD2
handleCaptivePortal KEYWORD2
handleConfig KEYWORD2
handleNotFound KEYWORD2
setWifiConnectionCallback KEYWORD2
setConfigSavingCallback KEYWORD2
setConfigSavedCallback KEYWORD2
setFormValidator KEYWORD2
setApConnectionHandler KEYWORD2
setWifiConnectionHandler KEYWORD2
setWifiConnectionFailedHandler KEYWORD2
addParameterGroup KEYWORD2
addHiddenParameter KEYWORD2
addSystemParameter KEYWORD2
getThingName KEYWORD2
delay KEYWORD2
setWifiConnectionTimeoutMs KEYWORD2
blink KEYWORD2
fineBlink KEYWORD2
stopCustomBlink KEYWORD2
disableBlink KEYWORD2
enableBlink KEYWORD2
isBlinkEnabled KEYWORD2
getState KEYWORD2
setApTimeoutMs KEYWORD2
getApTimeoutMs KEYWORD2
resetWifiAuthInfo KEYWORD2
skipApStartup KEYWORD2
forceApMode KEYWORD2
getSystemParameterGroup KEYWORD2
getThingNameParameter KEYWORD2
getApPasswordParameter KEYWORD2
getWifiParameterGroup KEYWORD2
getWifiSsidParameter KEYWORD2
getWifiPasswordParameter KEYWORD2
getApTimeoutParameter KEYWORD2
saveConfig KEYWORD2
setHtmlFormatProvider KEYWORD2
getHtmlFormatProvider KEYWORD2
#IotWebConfParameter.h
SerializationData KEYWORD1
ConfigItem KEYWORD1
visible KEYWORD2
getId KEYWORD2
IotWebConfParameterGroup KEYWORD1
ParameterGroup KEYWORD1
addItem KEYWORD2
label KEYWORD2
IotWebConfParameter KEYWORD1
Parameter KEYWORD1
label KEYWORD2
valueBuffer KEYWORD2
defaultValue KEYWORD2
errorMessage KEYWORD2
getLength KEYWORD2
IotWebConfTextParameter KEYWORD1
TextParameter KEYWORD1
placeholder KEYWORD2
customHtml KEYWORD2
IotWebConfPasswordParameter KEYWORD1
PasswordParameter KEYWORD1
IotWebConfNumberParameter KEYWORD1
NumberParameter KEYWORD1
IotWebConfCheckboxParameter KEYWORD1
CheckboxParameter KEYWORD1
isChecked KEYWORD2
IotWebConfSelectParameter KEYWORD1
SelectParameter KEYWORD1
#IotWebConfOptionalGroup.h
OptionalGroupHtmlFormatProvider KEYWORD1
OptionalParameterGroup KEYWORD1
ChainedParameterGroup KEYWORD1
setNext KEYWORD2
getNext KEYWORD2
#IotWebConfOptionalGroup.h
ChainedWifiParameterGroup KEYWORD1
MultipleWifiAddition KEYWORD1
name=IotWebConf
version=3.2.0
author=Balazs Kelemen <prampec+arduino@gmail.com>
maintainer=Balazs Kelemen <prampec+arduino@gmail.com>
sentence=ESP8266/ESP32 non-blocking WiFi/AP web configuration.
paragraph=IotWebConf will start up in AP (access point) mode, and provide a config portal for entering WiFi connection and other user-settings. The configuration is persisted in EEPROM. The config portal will stay available after WiFi connection was made. A WiFiManager alternative.
category=Communication
url=https://github.com/prampec/IotWebConf
architectures=esp8266,esp32
includes=IotWebConf.h
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment