Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
764b18e539 | |||
e5a64c13ed | |||
338c90fb8e | |||
85c57daf91 | |||
36ce6f976b |
@ -16,10 +16,10 @@ steps:
|
|||||||
- name: release
|
- name: release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
api_key: a7f3afc9f77e721951e48b4af66d7565700b7a2e
|
api_key:
|
||||||
|
from_secret: DRONE_ACCESS_TOKEN
|
||||||
base_url: https://code.jcktrue.dk
|
base_url: https://code.jcktrue.dk
|
||||||
files:
|
files:
|
||||||
- .pio/build/nodemcu/firmware.bin
|
- .pio/build/nodemcu/firmware.bin
|
||||||
- .pio/build/nodemcu/firmware.elf
|
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
@ -6,6 +6,7 @@ const int TEMPERATURE_INTERVAL = 60;
|
|||||||
unsigned long lastTemperatureSent = 0;
|
unsigned long lastTemperatureSent = 0;
|
||||||
|
|
||||||
const int PIN_RELAY = D1;
|
const int PIN_RELAY = D1;
|
||||||
|
const int PIN_DHT11 = D2;
|
||||||
#define OUTPUT_SET(x) digitalWrite(PIN_RELAY, x ? LOW : HIGH)
|
#define OUTPUT_SET(x) digitalWrite(PIN_RELAY, x ? LOW : HIGH)
|
||||||
unsigned int timer = 0;
|
unsigned int timer = 0;
|
||||||
unsigned int next_timer_update = 0;
|
unsigned int next_timer_update = 0;
|
||||||
@ -50,7 +51,7 @@ void setupHandler() {
|
|||||||
powerNode.setProperty("timer").send("0");
|
powerNode.setProperty("timer").send("0");
|
||||||
|
|
||||||
|
|
||||||
dht.setup(D1, DHTesp::DHT11); // Connect DHT sensor to GPIO 17
|
dht.setup(PIN_DHT11, DHTesp::DHT11); // Connect DHT sensor to GPIO 17
|
||||||
}
|
}
|
||||||
|
|
||||||
void loopHandler() {
|
void loopHandler() {
|
||||||
@ -88,7 +89,7 @@ void loopHandler() {
|
|||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
|
||||||
Homie_setFirmware("deskcontrol", "1.1.0");
|
Homie_setFirmware("deskcontrol", "0.3.2");
|
||||||
|
|
||||||
Homie.disableResetTrigger();
|
Homie.disableResetTrigger();
|
||||||
powerNode.advertise("state").settable(powerStateHandler);
|
powerNode.advertise("state").settable(powerStateHandler);
|
||||||
|
Reference in New Issue
Block a user