teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

誤字

2016/10/19 00:22

投稿

hidebon_sp
hidebon_sp

スコア13

title CHANGED
@@ -1,1 +1,1 @@
1
- aruduinoを使っています。初めての質問です。お願いいたします。
1
+ arduinoを使っています。初めての質問です。お願いいたします。
body CHANGED
File without changes

1

加筆しました。

2016/10/19 00:22

投稿

hidebon_sp
hidebon_sp

スコア13

title CHANGED
File without changes
body CHANGED
@@ -16,4 +16,84 @@
16
16
  これをスケッチに書き込んでおく。
17
17
 
18
18
  どちらも、条件の設定の仕方がわかりません。
19
- 初心者で、質問の体すらなってないかもわかりませんが、アドバイスをよろしくお願いいたします。
19
+ 初心者で、質問の体すらなってないかもわかりませんが、アドバイスをよろしくお願いいたします。
20
+
21
+ 現状はBLYNKのすけっちのみです。
22
+
23
+ ``` /**************************************************************
24
+ * Blynk is a platform with iOS and Android apps to control
25
+ * Arduino, Raspberry Pi and the likes over the Internet.
26
+ * You can easily build graphic interfaces for all your
27
+ * projects by simply dragging and dropping widgets.
28
+ *
29
+ * Downloads, docs, tutorials: http://www.blynk.cc
30
+ * Blynk community: http://community.blynk.cc
31
+ * Social networks: http://www.fb.com/blynkapp
32
+ * http://twitter.com/blynk_app
33
+ *
34
+ * Blynk library is licensed under MIT license
35
+ * This example code is in public domain.
36
+ *
37
+ **************************************************************
38
+ * This example runs directly on ESP8266 chip.
39
+ *
40
+ * You need to install this for ESP8266 development:
41
+ * https://github.com/esp8266/Arduino
42
+ *
43
+ * Please be sure to select the right ESP8266 module
44
+ * in the Tools -> Board menu!
45
+ *
46
+ * Change WiFi ssid, pass, and Blynk auth token to run :)
47
+ *
48
+ **************************************************************/
49
+
50
+ #define BLYNK_PRINT Serial // Comment this out to disable prints and save space
51
+ #include <ESP8266WiFi.h>
52
+ #include <BlynkSimpleEsp8266.h>
53
+
54
+ // You should get Auth Token in the Blynk App.
55
+ // Go to the Project Settings (nut icon).
56
+ char auth[] = "********************";
57
+
58
+ // Your WiFi credentials.
59
+ // Set password to "" for open networks.
60
+ char ssid[] = "";
61
+ char pass[] = "**********";
62
+
63
+ void setup()
64
+ {
65
+ Serial.begin(9600);
66
+ Blynk.begin(auth, ssid, pass);
67
+ }
68
+
69
+ void loop()
70
+ {
71
+ Blynk.run();
72
+ }
73
+
74
+ ```
75
+
76
+ 自分としては、条件が満たされたとき、
77
+ 例えば、ヴァーチャルピンがlowからHIGHになったとき、
78
+ 下記のように作動させればよいのではないかと考えていました。
79
+
80
+ Serial.print("open\n");
81
+ digitalWrite(13, HIGH);
82
+ delay(100);
83
+ digitalWrite(13, LOW);
84
+ delay(100);
85
+ digitalWrite(14, HIGH);
86
+ delay(100);
87
+ digitalWrite(14, LOW);
88
+
89
+ break;
90
+
91
+ 補足ですが、
92
+ 自宅のパナソニックのインターホンから、子機登録したandroid携帯を、
93
+ teamviewerでリモートコントロールして、外部から開錠施錠することができるようになっています。これはPCのみです。
94
+ 携帯端末から携帯端末のリモートコントロールができないためです。
95
+ この開錠施錠利用目的のみで設置してあるスマホをリレータッチボードでコントロールしようとしています。
96
+ 一つ目のtouchで開錠ボタンを押して、二つ目のタッチでokボタンをクリックさせます。
97
+ ok・キャンセルのダイアログが必ず出るためです。
98
+ これをワンボタンで処理できないかというのが、今回の質問の主旨です。
99
+ よろしくお願いいたします。