Trying to fix tests in project, not done yet

This commit is contained in:
Eric Ratliff
2026-02-21 20:52:48 -06:00
parent 0abe907811
commit 8a72098443
10 changed files with 1876 additions and 147 deletions

View File

@@ -0,0 +1,35 @@
/*
* {{PROJECT_NAME}}.ino -- TMP36 weather station
*
* Reads temperature from a TMP36 sensor every 2 seconds
* and prints to Serial:
*
* Temperature: 23.5 C (74.3 F)
*
* All logic lives in lib/app/{{PROJECT_NAME}}_app.h which depends
* on the HAL and TempSensor interfaces, making it fully testable
* on the host without hardware.
*
* Wiring (TMP36, flat side facing you):
* Pin 1 (left) -> 5V
* Pin 2 (middle) -> A0 (analog input)
* Pin 3 (right) -> GND
*
* Serial: 115200 baud
*/
#include <hal_arduino.h>
#include <{{PROJECT_NAME}}_app.h>
#include <tmp36_analog.h>
static ArduinoHal hw;
static Tmp36Analog sensor(&hw, A0);
static WeatherApp app(&hw, &sensor);
void setup() {
app.begin();
}
void loop() {
app.update();
}