Added back src/ino files which will be excluded via .gitattributes instead of .gitignore

This keeps them in the reop, but excludes them from releases.
This commit is contained in:
Gregg 2020-11-08 07:41:36 -06:00
parent 7464109529
commit f200138a2d
2 changed files with 44 additions and 0 deletions

5
src/extras/extras.ino Normal file
View File

@ -0,0 +1,5 @@
#error THIS IS NOT COMPILABLE CODE
This is a dummy .ino file that allows you to easily edit the contents of this library using the Arduino IDE.
The code is NOT designed to be compiled from this point. Compile and test the library using one of the examples.

39
src/src.ino Normal file
View File

@ -0,0 +1,39 @@
// This is a placeholder .ino file that allows you to easily edit the contents of this library using the Arduino IDE,
// as well as compile and test from this point. This file is ignored when the library is included in other sketches.
#include "HomeSpan.h"
void setup() {
Serial.begin(115200);
homeSpan.setLogLevel(2);
homeSpan.begin(Category::Lighting,"HomeSpan Benchmark");
new SpanAccessory(); // Begin by creating a new Accessory using SpanAccessory(), which takes no arguments
new Service::AccessoryInformation(); // HAP requires every Accessory to implement an AccessoryInformation Service, which has 6 required Characteristics
new Characteristic::Name("HomeSpan Test"); // Name of the Accessory, which shows up on the HomeKit "tiles", and should be unique across Accessories
new Characteristic::Manufacturer("HomeSpan"); // Manufacturer of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::SerialNumber("HSL-123"); // Serial Number of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::Model("HSL Test"); // Model of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::FirmwareRevision(HOMESPAN_VERSION); // Firmware of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::Identify(); // Create the required Identify
new Service::HAPProtocolInformation(); // Create the HAP Protcol Information Service
new Characteristic::Version("1.1.0"); // Set the Version Characteristic to "1.1.0" as required by HAP
new Service::LightBulb(); // Create the Light Bulb Service
new Characteristic::On(); // This Service requires the "On" Characteristic to turn the light on and off
} // end of setup()
//////////////////////////////////////
void loop(){
homeSpan.poll();
} // end of loop()