slint/examples/energy_mng
Florian Blasius d2f08726a0
energy mng demo: display real date, time and weather data (#2244)
* display real date, time and weather data
2023-02-22 14:36:13 +01:00
..
src energy mng demo: display real date, time and weather data (#2244) 2023-02-22 14:36:13 +01:00
ui energy mng demo: display real date, time and weather data (#2244) 2023-02-22 14:36:13 +01:00
build.rs energy mng demo: display real date, time and weather data (#2244) 2023-02-22 14:36:13 +01:00
Cargo.toml energy mng demo: display real date, time and weather data (#2244) 2023-02-22 14:36:13 +01:00
README.md energy mng demo: display real date, time and weather data (#2244) 2023-02-22 14:36:13 +01:00

See the MCU backend Readme to see how to run the example on a smaller device like the Raspberry Pi Pico.

The example can run with the mcu simulator with the following command

cargo run -p energy_mng --no-default-features --features=simulator --release

display weather data

To display real weather data in the demo an application key from https://www.weatherapi.com/ is needed. The api key can be injected by settings the WEATHER_API environment variable. With the WEATHER_LAT and WEATHER_LONG variable position can be set, default is Berlin.