From 8c72959d2f7acb307885e27b0eb5f31b9694cc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 10 Jul 2016 11:01:54 +0200 Subject: [PATCH] Typo fix --- README.md | 8 ++++++++ code/src/code.ino | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aa57834a..c14f30c2 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,14 @@ Once you have flashed it you can flash it again over-the-air using the ```ota``` > platformio run --target uploadfs -e ota ``` +When using OTA environment it defaults to the IP address of the device in SoftAP mode. If you want to flash it when connected to your home network best way is to supply the IP of the device: + +```bash +> platformio run --target upload -e ota --upload_port 192.168.1.151 +> platformio run --target uploadfs -e ota --upload_port 192.168.1.151 +``` + + Library dependencies are automatically managed via PlatformIO Library Manager. ## Usage diff --git a/code/src/code.ino b/code/src/code.ino index 6f98cf9c..c09163fc 100644 --- a/code/src/code.ino +++ b/code/src/code.ino @@ -50,7 +50,7 @@ along with this program. If not, see . #define MODEL "SONOFF" #define BUTTON_PIN 0 #define RELAY_PIN 12 -#define LED_PIN 13ter +#define LED_PIN 13 #define ADMIN_PASS "fibonacci" #define CONFIG_PATH "/.config" @@ -986,7 +986,7 @@ void hardwareLoop() { if (button1.loop()) { if (button1.getEvent() == EVENT_SINGLE_CLICK) toggleRelay(); if (button1.getEvent() == EVENT_DOUBLE_CLICK) wifiSetupAP(); - if (button1.getEvent() == EVENT_LONG_CLICK) ESP.restart(); + if (button1.getEvent() == EVENT_LONG_CLICK) ESP.reset(); } showStatus(); }