diff --git a/aREST_UI.h b/aREST_UI.h index ad69fb3..ea48ae5 100644 --- a/aREST_UI.h +++ b/aREST_UI.h @@ -37,7 +37,7 @@ void title(String the_title) { } // Create button -void button(int pin){ +void button(int pin, char * btn_name){ // Set pin as output #if defined(ARDUINO_ESP8266_NODEMCU) || defined(ARDUINO_ESP8266_WEMOS_D1MINI) @@ -48,6 +48,7 @@ void button(int pin){ // Set in button array buttons[buttons_index] = pin; + int_btn_names[buttons_index] = btn_name; buttons_index++; } @@ -114,6 +115,9 @@ virtual void root_answer() { // Buttons UI for (int i = 0; i < buttons_index; i++) { + addToBuffer("

"); + addToBuffer(int_btn_names[i]); + addToBuffer("

"); addToBuffer("
"); addToBuffer("