Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강상위
/
2018-summer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
강상위
2018-08-17 01:33:42 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2eff7c4810c5fd3174639a234ef04e12c6323ce2
2eff7c48
1 parent
c108212b
Add 01_KVP Particle & Change, Add README.md
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
2 deletions
01_KHU_Valley_Program/particle-internet-button/README.md
01_KHU_Valley_Program/particle-internet-button/test/project.properties
01_KHU_Valley_Program/particle-internet-button/test/test.ino
01_KHU_Valley_Program/particle-internet-button/testing.html
01_KHU_Valley_Program/sbm-demo/README.md
01_KHU_Valley_Program/sbm-demo/web-start/README.md
01_KHU_Valley_Program/particle-internet-button/README.md
0 → 100644
View file @
2eff7c4
# Particle Internet-Button Codes
-
testing.html : Testing particle cloud.
-
test.ino : Send particle pub => Connect to firebase functions webhook(as payload).
01_KHU_Valley_Program/particle-internet-button/test/project.properties
0 → 100644
View file @
2eff7c4
dependencies.InternetButton
=
0.1.14
\ No newline at end of file
01_KHU_Valley_Program/particle-internet-button/test/test.ino
0 → 100644
View file @
2eff7c4
// This #include statement was automatically added by the Particle IDE.
#include <InternetButton.h>
// // int led = D7;
// int button1 = D4;
// int button2 = D5;
// int button3 = D6;
// int button4 = D7;
// int buttonVar1;
// int buttonVar2;
// int buttonVar3;
// int buttonVar4;
InternetButton
b
=
InternetButton
();
void
setup
(){
// // pinMode(led, OUTPUT);
// // pinMode(button1, INPUT);
// pinMode(button2, INPUT);
// pinMode(button3, INPUT);
// // pinMode(button4, INPUT);
// // Particle.variable("buttonVar", &buttonVar, INT);
// // Particle.function("led", ledToggle);
b
.
begin
();
}
void
loop
(){
// buttonVar1 = digitalRead(button1);
// buttonVar2 = digitalRead(button2);
// buttonVar3 = digitalRead(button3);
// buttonVar4 = digitalRead(button4);
if
(
b
.
buttonOn
(
1
)){
Particle
.
publish
(
"ButtonStatus"
,
"button1 pushed"
,
PRIVATE
);
delay
(
500
);
Particle
.
publish
(
"sbmtest"
,
"/phonecall.html"
,
PRIVATE
);
}
else
if
(
b
.
buttonOn
(
2
)){
Particle
.
publish
(
"ButtonStatus"
,
"button2 pushed"
,
PRIVATE
);
delay
(
500
);
Particle
.
publish
(
"sbmtest"
,
"/messages.html"
,
PRIVATE
);
}
else
if
(
b
.
buttonOn
(
3
)){
Particle
.
publish
(
"ButtonStatus"
,
"button3 pushed"
,
PRIVATE
);
delay
(
500
);
Particle
.
publish
(
"sbmtest"
,
"manner"
,
PRIVATE
);
}
else
if
(
b
.
buttonOn
(
4
)){
Particle
.
publish
(
"ButtonStatus"
,
"button4 pushed"
,
PRIVATE
);
delay
(
500
);
Particle
.
publish
(
"sbmtest"
,
"/"
,
PRIVATE
);
}
}
// int ledToggle(String command) {
// if (command=="on") {
// digitalWrite(led,HIGH);
// return 1;
// }
// else if (command=="off") {
// digitalWrite(led,LOW);
// return 0;
// }
// else {
// return -1;
// }
//
}
\ No newline at end of file
01_KHU_Valley_Program/particle-internet-button/testing.html
0 → 100644
View file @
2eff7c4
<
!DOCTYPE>
<html>
<body>
<center>
<br>
<br>
<br>
<form
action=
"https://api.particle.io/v1/devices/2d001d001447363333343437/led?access_token=d93f8e2b994532d0dd95c69db5eeac9237a01ded"
method=
"POST"
>
Tell your device what to do!
<br>
<br>
<input
type=
"radio"
name=
"arg"
value=
"on"
>
Turn the LED on.
<br>
<input
type=
"radio"
name=
"arg"
value=
"off"
>
Turn the LED off.
<br>
<br>
<input
type=
"submit"
value=
"Do it!"
>
</form>
</center>
</body>
</html>
\ No newline at end of file
01_KHU_Valley_Program/sbm-demo/README.md
View file @
2eff7c4
# SBM(Silver Business Model) Demo Code
# SBM(Silver Business Model) Demo
- Firebase
Code
-
This is the source code of SBM Demo for KVP.
-
Based on the Firebase FriendlyChat codelab codes.
-
fcm redirecting curl.txt : crul request for fcm.
...
...
01_KHU_Valley_Program/sbm-demo/web-start/README.md
View file @
2eff7c4
# SBM Demo Actual Code
-
index.html, phonecall.html, messages.html
-
main.js, index.js
-
main.js
-
index.js : Add webhook function. Connect to Particle Webhook.
-
Based on firebase tutorial - Friendly Chat Web-Start codes.
...
...
Please
register
or
login
to post a comment