ct-Open-Source / Basecamp

An Arduino library to ease the use of the ESP32 in IoT projects
GNU General Public License v3.0
254 stars 48 forks source link

Text Input for an e-paper door sign #55

Open AlexBollmann opened 6 years ago

AlexBollmann commented 6 years ago

Hi, I love this project and I wanted to use it for my first diy project. Unfortunately, I can't find everything I need in the documentation or in the ct magazine.

My goal is to have a text input on the http page, where you can set your door message. That message should be shown on the display. I startet like this:

`#include Basecamp iot{ }; String doormessage = "Test Message !"; void setup() {

iot.begin(); iot.configuration.set("my-DoorMessage", doormessage); iot.web.addInterfaceElement("DoorMessageDisplay", "input", "Türschildnachricht:", "#configform", "my-DoorMessage"); iot.web.setInterfaceElementAttribute("my-DoorMessage", "type", "text"); }

void loop() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); Serial.println("Türschildnachricht: "); Serial.println(doormessage);

delay(5000); }`

I don't think it's the right way, because when I click "Save", it gets resetted to the standard message. Also, I don't want to show the wireless and mqqt settings page, once the wireless has been set up. Not using MQTT for now. How would you do it? Is Basecamp the right base to start from?