From c46bf1698507243e74c01b1c1c6a1cacaa12371a Mon Sep 17 00:00:00 2001 From: kou029w Date: Sat, 15 Apr 2017 11:37:24 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E3=82=B9=E3=82=B3=E3=83=BC=E3=83=97?= =?UTF-8?q?=E3=82=92=E6=98=8E=E7=9E=AD=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/k2ping.ino | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/k2ping.ino b/src/k2ping.ino index 4bebde3..0ac84df 100644 --- a/src/k2ping.ino +++ b/src/k2ping.ino @@ -1,17 +1,7 @@ #include -// Model: WeMos D1 -#define D0 3 -#define D1 1 -#define D2 16 -#define D3 5 -#define D4 4 -#define D5 14 -#define D6 12 -#define D7 13 -#define D8 0 -#define D9 2 -#define D10 15 +// Digital pins for WeMos D1 +static const uint8_t D[] = {3, 1, 16, 5, 4, 14, 12, 13, 0, 2, 15}; void setup() { ; From 7e4193796813cd2e3e0755de3593b4d13e7e09d7 Mon Sep 17 00:00:00 2001 From: kou029w Date: Sat, 15 Apr 2017 11:56:44 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Wi-Fi=E3=81=AB=E6=8E=A5=E7=B6=9A=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/k2ping.ino | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/k2ping.ino b/src/k2ping.ino index 0ac84df..df2f9b7 100644 --- a/src/k2ping.ino +++ b/src/k2ping.ino @@ -4,9 +4,22 @@ static const uint8_t D[] = {3, 1, 16, 5, 4, 14, 12, 13, 0, 2, 15}; void setup() { - ; + Serial.begin(9600); + Serial.println(); + + WiFi.begin("network-name", "pass-to-network"); + + Serial.print("Connecting"); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.println(); + + Serial.print("Connected, IP address: "); + Serial.println(WiFi.localIP()); } void loop() { ; -} +} \ No newline at end of file From 438756b0f3383ef22d865577783a426290b732b2 Mon Sep 17 00:00:00 2001 From: kou029w Date: Sat, 15 Apr 2017 13:06:48 +0900 Subject: [PATCH 3/5] =?UTF-8?q?LCD=E3=81=ABWi-Fi=E6=8E=A5=E7=B6=9A?= =?UTF-8?q?=E7=8A=B6=E6=B3=81=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/k2ping.ino | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/k2ping.ino b/src/k2ping.ino index df2f9b7..3532e79 100644 --- a/src/k2ping.ino +++ b/src/k2ping.ino @@ -1,25 +1,40 @@ #include +#include +#include // Digital pins for WeMos D1 static const uint8_t D[] = {3, 1, 16, 5, 4, 14, 12, 13, 0, 2, 15}; +// LCD Keypad Shield for Arduino +LiquidCrystal lcd(D[8], D[9], D[4], D[5], D[6], D[7]); + void setup() { - Serial.begin(9600); - Serial.println(); + lcd.begin(16, 2); WiFi.begin("network-name", "pass-to-network"); - Serial.print("Connecting"); + lcd.print("Connecting"); + lcd.setCursor(0, 1); while (WiFi.status() != WL_CONNECTED) { delay(500); - Serial.print("."); - } - Serial.println(); - Serial.print("Connected, IP address: "); - Serial.println(WiFi.localIP()); + static uint8_t i = 0; + lcd.setCursor((i %= 32) % 16, 1); + if (i < 16) { + lcd.write(0xFF); + i++; + } else if (i < 32) { + lcd.print(" "); + i++; + } + } + + lcd.clear(); + lcd.print("Connected"); + lcd.setCursor(0, 1); + lcd.print(WiFi.localIP()); } void loop() { ; -} \ No newline at end of file +} From f1ba500a501c66fb0c284c3fc2c2dee2ff274303 Mon Sep 17 00:00:00 2001 From: kou029w Date: Sat, 15 Apr 2017 13:10:14 +0900 Subject: [PATCH 4/5] =?UTF-8?q?CI=E3=82=92=E9=80=9A=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 05a071e..638bf77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ cache: install: - pip install -U platformio + - platformio lib install 1526 script: - platformio run From 584cd55782053cf19d3c1c92a814e3cefd353261 Mon Sep 17 00:00:00 2001 From: kou029w Date: Sat, 15 Apr 2017 13:14:01 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=E6=94=B9=E8=A1=8C=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=82=92LF=E3=81=AB=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +-- .travis.yml | 30 ++++++++++----------- lib/readme.txt | 72 +++++++++++++++++++++++++------------------------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.gitignore b/.gitignore index ab09fd5..6c69f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -.pioenvs -.piolibdeps +.pioenvs +.piolibdeps diff --git a/.travis.yml b/.travis.yml index 638bf77..d484890 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,15 @@ -language: python -python: - - "2.7" - -sudo: false -cache: - directories: - - "~/.platformio" - -install: - - pip install -U platformio - - platformio lib install 1526 - -script: - - platformio run +language: python +python: + - "2.7" + +sudo: false +cache: + directories: + - "~/.platformio" + +install: + - pip install -U platformio + - platformio lib install 1526 + +script: + - platformio run diff --git a/lib/readme.txt b/lib/readme.txt index 9c196e2..dbadc3d 100644 --- a/lib/readme.txt +++ b/lib/readme.txt @@ -1,36 +1,36 @@ - -This directory is intended for the project specific (private) libraries. -PlatformIO will compile them to static libraries and link to executable file. - -The source code of each library should be placed in separate directory, like -"lib/private_lib/[here are source files]". - -For example, see how can be organized `Foo` and `Bar` libraries: - -|--lib -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| |--Foo -| | |- Foo.c -| | |- Foo.h -| |- readme.txt --> THIS FILE -|- platformio.ini -|--src - |- main.c - -Then in `src/main.c` you should use: - -#include -#include - -// rest H/C/CPP code - -PlatformIO will find your libraries automatically, configure preprocessor's -include paths and build them. - -More information about PlatformIO Library Dependency Finder -- http://docs.platformio.org/page/librarymanager/ldf.html + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory, like +"lib/private_lib/[here are source files]". + +For example, see how can be organized `Foo` and `Bar` libraries: + +|--lib +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| |--Foo +| | |- Foo.c +| | |- Foo.h +| |- readme.txt --> THIS FILE +|- platformio.ini +|--src + |- main.c + +Then in `src/main.c` you should use: + +#include +#include + +// rest H/C/CPP code + +PlatformIO will find your libraries automatically, configure preprocessor's +include paths and build them. + +More information about PlatformIO Library Dependency Finder +- http://docs.platformio.org/page/librarymanager/ldf.html