Commit e9d5539
feat(wsen-pads): Climate Station example with OLED Display. (#373)
* feat(wsen-pads): Climate Station example with OLED Display.
* fix(wsen-pads): Fix ruff lint issues and missing final newlines.
* fix(wsen-pads): Simplify display using steami_screen and fix lint issues.
* fix(hts221): Remove unused env_station.py example.
* refactor(wsen-pads): Rewrite climate station with steami_screen widgets.
Major rewrite of the station_env example:
1. Use steami_screen (Screen, SSD1327Display, gauge, title, value,
subtitle) instead of 100+ lines of pixel-by-pixel manual drawing
(draw_hline, draw_vline, draw_rect, draw_fill_rect, draw_circle).
The native framebuf primitives behind steami_screen are implemented
in C and are orders of magnitude faster than Python pixel loops.
2. Remove fake calibration that forced readings toward arbitrary "ideal"
values (20C, 50%RH, 1013hPa). A sensor reading 23C at startup was
being shifted to 20C, making every subsequent reading wrong by -3C.
The example now shows raw sensor values. For real calibration, use
steami_config (see calibrate_temperature.py).
3. Translate all UI text and comments from French to English to match
the project convention.
4. Add try/except/finally with power_off() for both sensors so Ctrl+C
does not leave WSEN-PADS and HTS221 running.
5. Use named comfort thresholds (TEMP_MIN/MAX, HUM_MIN/MAX, PRES_MIN/MAX)
instead of inline magic numbers.
---------
Co-authored-by: Sébastien NEDJAR <sebastien@nedjar.com>1 parent a6a70d2 commit e9d5539
1 file changed
Lines changed: 93 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
0 commit comments