I stumbled upon Mogoose Wizard, which seems like an super awesome (and easy) way to create web UI for ESP32. My problem is that i do not get a hang of it. Can you help? All tutorials are for something else than Arduino IDE so a bit hard to follow. My biggest problem right now is how to implement updating temperature measurement to the dashboard.
What I have got working
Blinking LEDs from the dashboard. See code below to see how I edited mongoose_glue.c
Reading a DS18B20 temperature sensor. Biggest issue is that where do I put the code where the sensor is read (float tempC = sensors.getTempC(deviceAddress);)? I understand that all the library declarations and initialization of the code goes above or in void(setup), as in a simple Arduino sketch. But how do I tell Mongoose to automatically update sensor reading and where do I put the command to update value?
All tutorials are for something else than Arduino IDE so a bit hard to follow.
Tutorials are to explain how to use Mongoose for C language programmers, regardless of whether they use Arduino, STM32CubeIDE, MCUXpresso, Eclipse, VSCode, Keil, simple make, Zephyr, etc.
There are specific examples for Arduino, too, you just need to be able to learn from one example and apply your knowledge to other examples.
My biggest problem right now is how to implement updating temperature measurement to the dashboard.
You are using the Wizard, not Mongoose itself, so you need to understand the Wizard.
If you add the UI for your sensor, you'll get the glue functions for your sensor, where you'll be able to put the code to read your sensor.
struct state {
int speed;
int temperature; <-------
int humidity;
int uptime;
char version[20];
bool online;
bool lights;
int level;
};
void glue_get_state(struct state *);