Build the two sketches with PlatformIO, add offline checks and rewrite the README
Sumbrella had no build definition: it was two .ino files to open in the Arduino IDE. This adds one PlatformIO project per sketch (PlatformIO only converts a *.ino sitting at the top of its own src_dir) and there is now a real, repeated compile for the boards the project actually used: Projeto.ino -> Arduino Nano 206 B RAM, 3508 B flash of 30720 Fetch_rain.ino -> ESP8266 ESP-01 28972 B RAM, 280119 B of 434160 flash The boards come from the course poster kept in the repository (Sumbrella.pdf, "Listagem de material": Arduino Nano and ESP8226 ESP-01), not from the code: neither sketch names its board. The ESP-01 flash size is not given anywhere, so the 512 KB variant is targeted. Dependencies are now reproducible. LiquidCrystal_I2C comes from the PlatformIO registry by name and version. DS3231 1.01 cannot: all 87 registry hits were checked and none exposes class Time / getTimeStr() / DS3231(data, sclk), so it is pinned to tag v1.01 of a mirror whose files were verified byte-for-byte equal to the libs/DS3231 removed in009066d. A clean clone compiles as it is. The unused LCD stays unused and no sensor is invented: the only thing this commit does to the sketches is compile them. tests/ holds the checks that need no board, each with a negative selftest that proves the check bites: secrets hygiene (secrets.h not tracked and ignored, the example complete and placeholder-only, no credential literal in any tracked file) and pin validity against the Nano and ESP-01 pin maps. run.sh builds both targets and then runs them, exiting non-zero on any failure. .gitignore now covers the PlatformIO artefacts (.pio/, *.bin, *.elf and friends). README.md is rewritten in the common format, with the real build and test output. Two things it no longer says, because they are not true of this repository: no revision reachable from main ever contained a credential literal (the deleted ESP8266_Fetching_Data.ino carried the string "<REDACTED>"), and the DS3231 dependency is not installable from the PlatformIO registry. Known, left unfixed on purpose: the LCD is constructed and never written to; the rain values are printed and discarded; loop() calls setup() on failure; and libs/DS3231 is still reachable in the history before009066d.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
; PlatformIO project for Projeto.ino, the DS3231 sketch that sits in the
|
||||
; repository root. The ESP8266 sketch has its own project, because PlatformIO
|
||||
; only converts a *.ino file that is at the top of its src_dir:
|
||||
;
|
||||
; pio run -> Projeto.ino (Arduino Nano)
|
||||
; pio run -d Fetch_rain -> Fetch_rain.ino (ESP8266 ESP-01)
|
||||
; ./run.sh -> both, then the offline tests
|
||||
;
|
||||
; Neither sketch names its board in its own source. The board is named on the
|
||||
; course poster kept in this repository, Sumbrella.pdf, under "Listagem de
|
||||
; material": "Arduino Nano" and "ESP8226 ESP-01" (sic). Projeto.ino agrees with
|
||||
; the Nano: analogWrite() on pins 5 and 6, both PWM-capable, plus the SDA/SCL
|
||||
; macros, which are A4/A5 = 18/19 on the Nano exactly as on the Uno.
|
||||
|
||||
[platformio]
|
||||
src_dir = .
|
||||
|
||||
[env:nano]
|
||||
platform = atmelavr
|
||||
board = nanoatmega328new
|
||||
framework = arduino
|
||||
monitor_speed = 9600
|
||||
; src_dir is the repository root, so keep the ESP8266 sketch's own project
|
||||
; directory (and the .pio tree PlatformIO creates inside it) out of this build.
|
||||
build_src_filter = +<*> -<Fetch_rain/>
|
||||
lib_deps =
|
||||
; DS3231 1.01 — Rinky-Dink Electronics / Henning Karlsen. It is NOT in the
|
||||
; PlatformIO registry (all 87 registry search hits were checked for the
|
||||
; class Time / getTimeStr() / DS3231(data, sclk) API it needs), so it is
|
||||
; pinned to a byte-identical mirror of the removed libs/DS3231 at tag v1.01.
|
||||
; See DEPENDENCIAS.md.
|
||||
https://github.com/whonore/DS3231.git#v1.01
|
||||
Reference in New Issue
Block a user