changing jaggery theme

application-manager-new
Rasika 10 years ago
parent 28d7bf83e2
commit 7aa47dcbbd

@ -340,10 +340,14 @@
<tasks>
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps" />
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/repository/resources/sketches" />
<copy todir="target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps" overwrite="true">
<fileset dir="src/repository/jaggeryapps"></fileset>
</copy>
<copy todir="target/wso2carbon-core-${carbon.kernel.version}/repository/resources/sketches" overwrite="true">
<fileset dir="src/sketches" />
</copy>
<!--<copy todir="target/wso2carbon-core-${carbon.kernel.version}/modules" overwrite="true">
<fileset dir="src/repository/modules"></fileset>
</copy>

@ -263,8 +263,8 @@
</outputDirectory>
<fileMode>755</fileMode>
</fileSet-->
<!-- Copying Device Cloud webapp -->
<fileSet>
<!-- Copying Device Cloud webapp -->
<fileSet>
<directory>src/repository/webapps/</directory>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps
</outputDirectory>

@ -41,15 +41,9 @@ if (uriMatcher.match("/{context}/api/device/sketch/")) {
exit();
}
if(sketchType=="arduino"){
downloadModule.downloadSketch("arduino-sketch.hbs",response, {"{{self.publicURL}}":"####"});
}else if(sketchType=="raspberry"){
downloadModule.downloadSketch("raspberry-sketch.hbs",response, {"{{self.publicURL}}":"####"});
}else{
log.error("Sketch type `"+sketchType+"` not found");
response.sendRedirect(uri + "?#sketch-failed");
exit();
}
serviceUrl = "http://localhost:9763/WSO2ConnectedDevices-1.0.0/FireAlarmDeviceManager/DownloadSketch";
response.sendRedirect(serviceUrl + "?type="+sketchType+"&owner="+user.username);
exit();
}
// returning the result.

@ -1,6 +1,6 @@
{{layout "fluid"}}
{{#zone "title"}}
WSO2 Device Cloud | Login
WSO2 Device Cloud | Login
{{/zone}}
{{#zone "body"}}
{{unit "appbar"}}

@ -1,30 +0,0 @@
<div class="container container-bg white">
<h1 class="white">Arduino Uno</h1><hr>
<p>Connect your Arduino Uno device to the IBM Internet of Things Foundation.</p>
<img src="{{self.publicURL}}/images/arduino-board.png" alt="Arduino UNO Board" width="300" height="253"/><br/>
<h2>Prepare</h2>
<h6>Get your device ready</h6>
<ul>
<li>Mount the Ethernet / Wifi shield on the Arduino Uno device.</li>
<li>Connect the Arduino Uno to the USB of your computer.</li>
<li>Connect an Ethernet cable to the Ethernet / WiFi Shield.</li>
</ul>
<h2>Connect (Quickstart)</h2>
<h6>Internet of Things Foundation Quickstart connection</h6>
<ul>
<li>Use the following command to download the installer from GitHub:</li>
<li>curl -LO https://github.com/ibm-messaging/iot-arduino.git</li>
<li>Download the Sketch installer from the Arduino website http://arduino.cc/en/Main/Software</li>
<li>Install the Sketch program</li>
<li>Use the Sketch program to open the samples code samples/quickstart/quickstart.ino</li>
<li>View the lower part of the Sketch pad window to check that the COM connection is shown as active</li>
<li>Compile and deploy the sample code to the Arduino Uno device</li>
</ul>
</p>
<form method="POST" class="form-login-box" action="{{sketchPath}}">
<input type="hidden" name="type" value="arduino" />
<button class="blue-btn">Create Sketch</button>
</form>
<br/><br/><br/>
</div>

@ -1,5 +0,0 @@
# Ignore everything in this directory.
# they are auto generated, should not be committed.
*
# Except this file
!.gitignore

@ -68,92 +68,94 @@
</nav>
</div><!--container-->
<div class="sign-panel" data-type="register">
<div class="container padding margin-top-double ">
<h5 >Register </h5> <hr class="opacity">
<div class="form-group" align="center">
<span class="wr-validation-summary hidden">
<strong class="label label-danger"></strong>
</span>
</div>
<div class="col-lg-10 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
First Name
</div>
<div class="col-lg-6 ">
<input type="text right" id="first_name" placeholder="First Name">
</div>
</div>
<div class="col-lg-10 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Last Name
</div>
<div class="col-lg-6 ">
<input type="text right" id="last_name" placeholder="Last Name">
</div>
</div>
<div class="col-lg-10 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Username
</div>
<div class="col-lg-6 ">
<input type="text right" id="user_name" placeholder="Username ">
</div>
</div>
<div class="col-lg-10 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Email
</div>
<div class="col-lg-6 ">
<input type="text right" id="email" placeholder="Email">
</div>
</div>
<div class="col-lg-10 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Password
</div>
<div class="col-lg-6 ">
<input type="password" id="password" placeholder="Password">
</div>
</div>
<div class="col-lg-10 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Confirm Password
</div>
<div class="col-lg-6 ">
<input type="password" id="password_confirmation" placeholder="Confirm Password">
</div>
</div>
<div class="col-lg-9 right padding-top-double padding-bottom-double margin-right-none">
<input type="checkbox" name="Agree" id="t_and_c" value="Bike"> <span class="italic">
I Agree by Clicking register, you agree to the Terms and Conditions set out by this site</span>
</div>
<div class="col-lg-12 center padding-top-double padding-bottom-double">
<button id="add-user-btn" class="blue-action-btn uppercase margin"> Submit</button>
<button class="black-btn uppercase margin cancel-btn" > Cancel</button>
</div>
</div>
</div>
<div class="sign-panel" data-type="login">
<form method="POST" class="form-login-box" action="{{loginPath}}">
<div class="container padding margin-top-double ">
<h5 >Login </h5> <hr class="opacity">
<div class="col-lg-3 padding ">
Username :<br> <input name="username" type="text" value="">
<h5 >Register </h5> <hr class="opacity">
<div class="form-group" align="center">
<span class="wr-validation-summary hidden">
<strong class="label label-danger"></strong>
</span>
</div>
<div class="col-lg-5 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
First Name
</div>
<div class="col-lg-7 ">
<input type="text right" id="first_name" placeholder="First Name">
</div>
</div>
<div class="col-lg-5 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Last Name
</div>
<div class="col-lg-7 ">
<input type="text right" id="last_name" placeholder="Last Name">
</div>
</div>
<div class="col-lg-5 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Username
</div>
<div class="col-lg-7 ">
<input type="text right" id="user_name" placeholder="Username ">
</div>
</div>
<div class="col-lg-5 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Email
</div>
<div class="col-lg-7 ">
<input type="text right" id="email" placeholder="Email">
</div>
</div>
<div class="col-lg-5 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Password
</div>
<div class="col-lg-7 ">
<input type="password right" id="password" placeholder="Password">
</div>
</div>
<div class="col-lg-5 padding center ">
<div class="col-lg-5 right padding-top-double uppercase ">
Confirm Password
</div>
<div class="col-lg-7 ">
<input type="password right" id="password_confirmation"
placeholder="Confirm
Password">
</div>
</div>
<div class="col-lg-9 right padding-top-double padding-bottom-double margin-right-none">
<input type="checkbox" name="Agree" id="t_and_c" value="Bike"> <span class="italic">
I Agree by Clicking register, you agree to the Terms and Conditions set out by this site</span>
</div>
<div class="col-lg-3 padding ">
Password: <br> <input name="password" type="password" value="">
</div>
<div class="col-lg-6 padding-top-double padding-bottom-double padding-left-none">
<button class="blue-action-btn uppercase margin" onclick="document.location.href='home.html';"> Login</button>
<div class="col-lg-12 center padding-top-double padding-bottom-double">
<button id="add-user-btn" class="blue-action-btn uppercase margin">
Register </button>
<button class="black-btn uppercase margin cancel-btn" > Cancel</button>
</div>
</div>
</form>
</div>
</div>
<div class="sign-panel" data-type="login">
<form method="POST" class="form-login-box" action="{{loginPath}}">
<div class="container padding margin-top-double ">
<h5 >Login </h5> <hr class="opacity">
<div class="col-lg-3 padding ">
Username :<br> <input type="text" name="username" />
</div>
<div class="col-lg-3 padding ">
Password: <br> <input type="password" name="password" />
</div>
<div class="col-lg-6 padding-top-double padding-bottom-double padding-left-none">
<button class="blue-action-btn uppercase margin" onclick="document.location.href='home.html';"> Login</button>
<button class="black-btn uppercase margin cancel-btn " > Cancel</button>
</div>
</div>
</form>
</div>
</header>
{{/zone}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

@ -1,32 +1,76 @@
{{#zone "main"}}
<div class="container container-bg white">
<h1 class="white">Arduino Uno</h1><hr>
<p>Connect your Arduino Uno device to the IBM Internet of Things Foundation.</p>
<img src="{{self.publicURL}}/images/arduino-board.png" alt="Arduino UNO Board" width="300" height="253"/><br/>
<h2>Prepare</h2>
<h6>Get your device ready</h6>
<ul>
<li>Mount the Ethernet / Wifi shield on the Arduino Uno device.</li>
<li>Connect the Arduino Uno to the USB of your computer.</li>
<li>Connect an Ethernet cable to the Ethernet / WiFi Shield.</li>
</ul>
<h2>Connect (Quickstart)</h2>
<h6>Internet of Things Foundation Quickstart connection</h6>
<ul>
<li>Use the following command to download the installer from GitHub:</li>
<li>curl -LO https://github.com/ibm-messaging/iot-arduino.git</li>
<li>Download the Sketch installer from the Arduino website http://arduino.cc/en/Main/Software</li>
<li>Install the Sketch program</li>
<li>Use the Sketch program to open the samples code samples/quickstart/quickstart.ino</li>
<li>View the lower part of the Sketch pad window to check that the COM connection is shown as active</li>
<li>Compile and deploy the sample code to the Arduino Uno device</li>
</ul>
</p>
<form method="POST" class="form-login-box" action="{{sketchPath}}">
<input type="hidden" name="type" value="arduino" />
<button class="blue-btn" type="submit">Create Sketch</button>
</form>
<br/><br/><br/>
</div>
<div class="container container-bg white-bg">
<div class=" margin-top-double">
<div class="row row padding-top-double padding-bottom-double margin-bottom-double">
<div class="col-lg-12 margin-top-double">
<h1 class="grey ">ArduinoUno</h1>
<hr>
<p class="margin-bottom-double light-grey ">Connect your Arduino Uno device to the IBM Internet of Things Foundation. </p>
</div>
</div>
<div class="row margin-bottom-double">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 padding-top">
<img src="{{self.publicURL}}/images/Arduino_Uno_-_R3.png" class="img-responsive">
</div>
<div class="col-xs-12 col-sm-6 col-md-8 col-lg-8 padding-top">
<h2 class="uppercase">Ingredients</h2>
<hr>
<p class="grey margin-top">Hardware Requirements </p>
<br><br>
<span class="fw-stack fw-lg margin-right">
<i class="fw fw-ring fw-stack-2x"> </i>
<i class="fw fw-right-arrow-2 fw-stack-1x"></i>
</span>Arduino Uno<br><br>
<span class="fw-stack fw-lg margin-right">
<i class="fw fw-ring fw-stack-2x"> </i>
<i class="fw fw-right-arrow-2 fw-stack-1x"></i>
</span>Arduino Ethernet / WiFi Shield
<br /><br />
<form method="POST" class="form-login-box"
action="{{sketchPath}}">
<input type="hidden" name="type" value="firealarm" />
<button class="blue-btn" type="submit">Create Sketch</button>
</form>
</div>
<div class ="col-xs-12 col-sm-6 col-md-3 col-lg-12 padding-double grey-bg ">
<h2 class="uppercase">Prepare</h2><hr>
<p class="grey margin-top">Get your device ready </p>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom ">
<span class="circle">01 </span> <span class="padding-left"> Mount the Ethernet / Wifi shield on the Arduino Uno device.</span>
</div>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom">
<span class="circle">02 </span> <span class="padding-left"> Mount the Ethernet / Wifi shield on the Arduino Uno device.</span>
</div>
<div class="margin-doubles padding-top-double margin-bottom-double light-grey margin-left-double margin-bottom">
<span class="circle">03 </span> <span class="padding-left"> Mount the Ethernet / Wifi shield on the Arduino Uno device.</span>
</div>
</div>
</div>
<div class="row row padding-top-double padding-bottom-double margin-bottom-double ">
<div class="col-lg-12 margin-top-double">
<h2 class="uppercase ">Connect (Quickstart)</h2>
<hr>
<p class="margin-bottom-double light-grey ">Internet of Things Foundation Quickstart connection </p>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom ">
<span class="circle">01 </span> <span class="padding-left">Use the following command to download the installer from GitHub:</span><br>
</div>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom ">
<span class="circle">02 </span> <span class="padding-left">Download the Sketch installer from the Arduino website http://arduino.cc/en/Main/Software</span><br>
</div>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom ">
<span class="circle">03 </span> <span class="padding-left"> Install the Sketch program</span><br>
</div>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom ">
<span class="circle">04 </span> <span class="padding-left">Use the Sketch program to open the samples code samples/quickstart/quickstart.ino</span><br>
</div>
<div class="margin-doubles padding-top-double light-grey margin-left-double margin-bottom ">
<span class="circle">05 </span> <span class="padding-left">View the lower part of the Sketch pad window to check that the COM connection is shown as active</span><br>
</div>
</div>
</div>
</div>
{{/zone}}
{{#zone "topCss"}}
<link href="{{self.publicURL}}/css/fontwso2.css" rel="stylesheet">
<link href="{{self.publicURL}}/css/fontwso2-extend.css" rel="stylesheet">
{{/zone}}

@ -1,9 +1,9 @@
{{#zone "main"}}
<div class="container container-bg">
<div class="container container-bg white-bg">
<div data-type="login">
<div class="container padding margin-top-double ">
<form method="POST" class="white form-login-box" action="{{loginPath}}">
<h1 class="white">Login </h1> <hr>
<form method="POST" class="form-login-box" action="{{loginPath}}">
<h1 class="grey">Login </h1> <hr>
<div class="col-lg-3 padding ">
Username :<br> <input name="username" type="text" value="" placeholder=""/>
@ -13,7 +13,9 @@
</div>
<div class="col-lg-6 padding-top-double padding-bottom-double padding-left-none">
<button class="blue-action-btn uppercase margin" onclick="document.location.href='home.html';"> Login</button>
<button class="black-btn uppercase margin " > Cancel</button>
<button class="black-btn uppercase margin" onclick="javascript:window
.location='/iot'" >
Cancel</button>
</div>
</form>
</div>

@ -1,56 +1,57 @@
{{#zone "main"}}
<div class="container container-bg">
<div class=" margin-top-double padding-top-large ">
<div class="row padding-bottom-large">
<div class="col-xs-12 col-md-4 col-lg-4 center"><img src="{{self.publicURL}}/images/banner-img.png" class="img-responsive"> </div>
<div class="container container-bg">
<div class=" margin-top-double ">
<div class="row row padding-top-double padding-bottom-double margin-bottom-double ">
<div class="col-xs-12 col-md-4 col-lg-4 center"><img src="{{self.publicURL}}/images/banner-img-3.png" class="img-responsive"> </div>
<div class="col-lg-8 margin-top-double">
<h1 class="white">Ready to connect a device or create an app?</h1>
<h1 class="grey">Ready to connect a device or create an app?</h1>
<hr>
<p class="margin-bottom-double">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas
<p class="margin-bottom-double light-grey ">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas
consectetur rutrum sapien. In ullamcorper nisi nisi, et interdum libero vestibulum at. </p>
<button class="blue-btn padding"> Quick Start</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 padding-top ">
<div class="product-wrapper rounded dark-grey center">
<div class="icon-wrapper">
<img src="{{self.publicURL}}/images/raspberry-pi.png" >
<img src="{{self.publicURL}}/images/RaspberryPi.png" >
</div>
<h2 class="white center">RaspberryPi</h2>
<div class="text-wrapper">
Use a Raspberry Pi to connect to the ABC Foundation. Then you can visualize the data
generated by the Raspberry Pi. <br><br>
</div>
<button class="grey-btn">Learn</button>
<a href="#" class="grey-btn">Connect</a>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 padding-top ">
<div class=" col-xs-12 col-sm-6 col-md-3 col-lg-3 padding-top ">
<div class="product-wrapper rounded dark-grey center">
<div class="icon-wrapper">
<img src="{{self.publicURL}}/images/arduino-uno.png" >
<img src="{{self.publicURL}}/images/ArduinoUno.png" >
</div>
<h2 class="white center">ArduinoUno</h2 >
<h2 class="white center">ArduinoUno</h2>
<div class="text-wrapper">
Connect your Arduino Uno device to the ABC Foundation .<br><br><br><br>
</div>
<button class="grey-btn" onclick="document.location.href='arduino';">Learn</button>
<a href="#" class="grey-btn" onclick="document.location.href='arduino';
">Connect</a>
</div>
</div>
<div class=" col-xs-12 col-sm-6 col-md-3 col-lg-3 padding-top ">
<div class="product-wrapper rounded dark-grey center">
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 padding-top ">
<div class="product-wrapper rounded dark-grey center">
<div class="icon-wrapper">
<img src="{{self.publicURL}}/images/beagle-bone.png" >
<img src="{{self.publicURL}}/images/beagleBone.png" >
</div>
<h2 class="white center">BeagleBone</h2>
<h2 class="white center">BeagleBone</h2 >
<div class="text-wrapper">
Use a BeagleBone Black board to visualize the data generated by the
SensorTag's temperature, agyroscope, and magnetometer sensors. <br><br>
SensorTag's temperature, agyroscope, and magnetometer sensors.
</div>
<button class="grey-btn">Learn</button>
<a href="#" class="grey-btn">Connect</a>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 padding-top ">
<div class="product-wrapper rounded dark-grey center">
<div class="icon-wrapper">
@ -61,7 +62,7 @@
Use an Intel® Galileo to connect to the ABC Foundation.
Then you can visualize the data generated by the on-board sensors.<br><br>
</div>
<button class="grey-btn">Learn</button>
<a href="#" class="grey-btn">Connect</a>
</div>
</div>
</div>

@ -267,8 +267,9 @@ th {
@font-face {
font-family: 'Glyphicons Halflings';
src: url(../fonts/glyphicons-halflings-regular.eot);
src: url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'), url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'), url(../fonts/glyphicons-halflings-regular.woff) format('woff'), url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'), url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')
src: url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'), url(../fonts/glyphicons-halflings-regular.woff) format('woff'), url(../fonts/glyphicons-halflings-regular.woff) format('woff'), url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'), url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')
}
.glyphicon {
position: relative;
top: 1px;

@ -2,7 +2,7 @@
background-color: #2a2a2a;
border-color:#2a2a2a ;
}
.navbar-nav{color: #a5a5a5; font-weight:300; padding-top: 12px; padding-left:0px;}
.navbar-nav{color: #a5a5a5; font-weight:300; padding-top: 5px; padding-left:0px;}
.form-control {background-color: #121212; border: 0px;}
.btn-default {background-color: #121212; border: 1px solid #121212;}
.container { padding:0px;}
@ -40,4 +40,7 @@ input[type="checkbox"], input[type="radio"] {
.navbar-default .navbar-nav>li>a:hover {
color: #747474;
outline: 0;
}
.navbar {
margin-bottom: 5px;
}

@ -0,0 +1,177 @@
.fw, [class^="fw-"], [class*=" fw-"] {
display: inline-block;
font: normal normal normal 14px/1 fontwso2;
font-size: inherit;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
vertical-align: middle;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: auto;
transform: translate(0, 0);
}
/* icon options */
.fw-lg {
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.fw-1-5x {
font-size: 1.5em;
}
.fw-2x {
font-size: 2em;
}
.fw-3x {
font-size: 3em;
}
.fw-4x {
font-size: 4em;
}
.fw-5x {
font-size: 5em;
}
.fw-fixedwidth {
width: 1.28571429em;
text-align: center;
}
.fw-ul {
padding-left: 0;
margin-left: 2.14285714em;
list-style-type: none;
}
.fw-ul > li {
position: relative;
}
.fw-li {
position: absolute;
left: -2.14285714em;
width: 2.14285714em;
top: 0.14285714em;
text-align: center;
}
.fw-li.fw-lg {
left: -1.85714286em;
}
.fw-border {
padding: .2em .25em .15em;
border: solid 0.08em #eeeeee;
border-radius: .1em;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.fw.pull-left {
margin-right: .3em;
}
.fw.pull-right {
margin-left: .3em;
}
.fw-spin {
-webkit-animation: wso2icon-spin 2s infinite linear;
animation: wso2icon-spin 2s infinite linear;
}
.fw-pulse {
-webkit-animation: wso2icon-spin 1s infinite steps(8);
animation: wso2icon-spin 1s infinite steps(8);
}
@-webkit-keyframes wso2icon-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes wso2icon-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.fw-rotate-90 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.fw-rotate-180 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.fw-rotate-270 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}
.fw-flip-horizontal {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-webkit-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
}
.fw-flip-vertical {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
-webkit-transform: scale(1, -1);
-ms-transform: scale(1, -1);
transform: scale(1, -1);
}
:root .fw-rotate-90,
:root .fw-rotate-180,
:root .fw-rotate-270,
:root .fw-flip-horizontal,
:root .fw-flip-vertical {
filter: none;
}
.fw-stack, .fw-stack-md {
position: relative;
display: inline-block;
width: 2em;
height: 2em;
line-height: 1.8em;
vertical-align: middle;
text-align: center;
}
.fw-stack-md {
width: 1em;
}
.fw-stack-1x,
.fw-stack-2x,
.fw-stack-1-5x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
}
.fw-stack-1x {
line-height: inherit;
font-size: 0.9em;
}
.fw-stack-1-5x {
line-height: inherit;
font-size: 1.2em;
}
.fw-stack-2x {
font-size: 1.8em;
}
.fw-inverse {
color: #ffffff;
}

@ -0,0 +1,481 @@
@font-face {
font-family: 'fontwso2';
src:url('../fonts/fontwso2.eot?3uii6i');
src:url('../fonts/fontwso2.eot?#iefix3uii6i') format('embedded-opentype'),
url('../fonts/fontwso2.woff?3uii6i') format('woff'),
url('../fonts/fontwso2.ttf?3uii6i') format('truetype'),
url('../fonts/fontwso2.svg?3uii6i#fontwso2') format('svg');
font-weight: normal;
font-style: normal;
}
.fw {
font-family: 'fontwso2';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fw-lifecycle:before {
content: "\e617";
}
.fw-globe:before {
content: "\e666";
}
.fw-filter:before {
content: "\e65b";
}
.fw-store:before {
content: "\e61b";
}
.fw-apple:before {
content: "\e613";
}
.fw-android:before {
content: "\e653";
}
.fw-windows:before {
content: "\e654";
}
.fw-monitor:before {
content: "\e658";
}
.fw-laptop:before {
content: "\e659";
}
.fw-computer:before {
content: "\e655";
}
.fw-mobile:before {
content: "\e656";
}
.fw-dots:before {
content: "\e615";
}
.fw-tiles:before {
content: "\e60e";
}
.fw-menu:before {
content: "\e60f";
}
.fw-list:before {
content: "\e610";
}
.fw-grid:before {
content: "\e611";
}
.fw-list2:before {
content: "\e667";
}
.fw-user:before {
content: "\e601";
}
.fw-add-user:before {
content: "\e668";
}
.fw-key:before {
content: "\e665";
}
.fw-star:before {
content: "\e65c";
}
.fw-star-2:before {
content: "\e612";
}
.fw-view:before {
content: "\e652";
}
.fw-edit:before {
content: "\e65d";
}
.fw-register2:before {
content: "\e669";
}
.fw-register:before {
content: "\e65f";
}
.fw-search:before {
content: "\e657";
}
.fw-send:before {
content: "\e66a";
}
.fw-delete:before {
content: "\e614";
}
.fw-settings:before {
content: "\e65e";
}
.fw-share:before {
content: "\e65a";
}
.fw-message:before {
content: "\e616";
}
.fw-bell:before {
content: "\e66b";
}
.fw-lock:before {
content: "\e618";
}
.fw-battery:before {
content: "\e619";
}
.fw-camera:before {
content: "\e61a";
}
.fw-wifi:before {
content: "\e606";
}
.fw-usb-drive:before {
content: "\e602";
}
.fw-hdd:before {
content: "\e61c";
}
.fw-map-location:before {
content: "\e61d";
}
.fw-invitation:before {
content: "\e664";
}
.fw-dial-up:before {
content: "\e61f";
}
.fw-incoming-call:before {
content: "\e620";
}
.fw-clock:before {
content: "\e621";
}
.fw-clean:before {
content: "\e622";
}
.fw-sort:before {
content: "\e623";
}
.fw-list-sort:before {
content: "\e624";
}
.fw-sequence:before {
content: "\e625";
}
.fw-rules:before {
content: "\e626";
}
.fw-padlock:before {
content: "\e66c";
}
.fw-uri:before {
content: "\e603";
}
.fw-pdf:before {
content: "\e627";
}
.fw-ms-document:before {
content: "\e629";
}
.fw-swagger:before {
content: "\e62a";
}
.fw-jquery:before {
content: "\e62b";
}
.fw-java:before {
content: "\e62c";
}
.fw-javaee:before {
content: "\e62d";
}
.fw-javascript:before {
content: "\e62e";
}
.fw-jaggery:before {
content: "\e62f";
}
.fw-uncheck:before {
content: "\e630";
}
.fw-check:before {
content: "\e631";
}
.fw-up-arrow-2:before {
content: "\e660";
}
.fw-down-arrow-2:before {
content: "\e661";
}
.fw-left-arrow-2:before {
content: "\e662";
}
.fw-right-arrow-2:before {
content: "\e663";
}
.fw-up-arrow:before {
content: "\e632";
}
.fw-down-arrow:before {
content: "\e63e";
}
.fw-left-arrow:before {
content: "\e633";
}
.fw-right-arrow:before {
content: "\e634";
}
.fw-cancel:before {
content: "\e635";
}
.fw-add:before {
content: "\e636";
}
.fw-minus:before {
content: "\e628";
}
.fw-refresh:before {
content: "\e637";
}
.fw-ring:before {
content: "\e600";
}
.fw-circle:before {
content: "\e638";
}
.fw-ok:before {
content: "\e639";
}
.fw-error:before {
content: "\e63a";
}
.fw-block:before {
content: "\e63b";
}
.fw-warning:before {
content: "\e605";
}
.fw-deploy:before {
content: "\e66d";
}
.fw-devices:before {
content: "\e63c";
}
.fw-dss:before {
content: "\e63d";
}
.fw-database:before {
content: "\e66e";
}
.fw-computer2:before {
content: "\e66f";
}
.fw-endpoint:before {
content: "\e63f";
}
.fw-bpmn:before {
content: "\e640";
}
.fw-bpel:before {
content: "\e641";
}
.fw-gadget:before {
content: "\e642";
}
.fw-application:before {
content: "\e643";
}
.fw-cloud:before {
content: "\e644";
}
.fw-service:before {
content: "\e645";
}
.fw-rest-service:before {
content: "\e646";
}
.fw-rest-api:before {
content: "\e647";
}
.fw-api:before {
content: "\e648";
}
.fw-service-provider:before {
content: "\e649";
}
.fw-website:before {
content: "\e604";
}
.fw-proxy:before {
content: "\e64a";
}
.fw-policy:before {
content: "\e64b";
}
.fw-security-policy:before {
content: "\e64c";
}
.fw-throttling-policy:before {
content: "\e64d";
}
.fw-blank-document:before {
content: "\e64e";
}
.fw-ebook:before {
content: "\e670";
}
.fw-document:before {
content: "\e671";
}
.fw-text:before {
content: "\e64f";
}
.fw-html:before {
content: "\e650";
}
.fw-wadl:before {
content: "\e608";
}
.fw-wsdl:before {
content: "\e609";
}
.fw-xacml:before {
content: "\e60a";
}
.fw-xsd:before {
content: "\e60b";
}
.fw-xq:before {
content: "\e60c";
}
.fw-xslt:before {
content: "\e60d";
}
.fw-xml:before {
content: "\e61e";
}
.fw-soap:before {
content: "\e651";
}
.fw-wso2:before {
content: "\e607";
}

@ -47,11 +47,11 @@
/* Light Italic */
@font-face {
font-family: 'Open Sans';
src: url('../fonts/OpenSans-LightItalic-webfont.eot');
src: url('../fonts/OpenSans-LightItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-LightItalic-webfont.woff') format('woff'),
url('../fonts/OpenSans-LightItalic-webfont.ttf') format('truetype'),
url('../fonts/OpenSans-LightItalic-webfont.svg#OpenSansLightItalic') format('svg');
src: url(../fonts/OpenSans-LightItalic-webfont.eot);
src: url(../fonts/OpenSans-LightItalic-webfont.eot?#iefix) format('embedded-opentype'),
url(../fonts/OpenSans-LightItalic-webfont.woff) format('woff'),
url(../fonts/OpenSans-LightItalic-webfont.ttf) format('truetype'),
url(../fonts/OpenSans-LightItalic-webfont.svg#OpenSansLightItalic) format('svg');
font-weight: 200;
font-style: italic;
@ -165,7 +165,7 @@ body {
line-height:1;
color:#141414;
line-height:1;
background:#676767;
background: url("../images/content-bg-1.png")repeat scroll 0 0 #f0f2f4;
margin: 15px;
}
@ -224,6 +224,7 @@ hr {
border-top:1px solid #7f7f7f;
margin:1em 0;
padding:0;
opacity: 0.2;
}
input, select {
vertical-align:middle;
@ -237,7 +238,7 @@ input, select {
p{font-size:17px; line-height:24px; color:#c7c7c7;}
h1{ font-size:39px;font-weight:100; line-height:Auto; font-style: normal;}
h2{font-size:24px; line-height:Auto; font-weight: 300; }
h2{font-size:24px; line-height:Auto; font-weight: 400; }
h3{font-size:15px; line-height:Auto; font-weight: 400; }
h4{font-size:20px; line-height:Auto; font-weight: 400; }
h5{ font-size:30px;font-weight:100; line-height:Auto; font-style: normal; color: #929292;}
@ -254,6 +255,7 @@ h5{ font-size:30px;font-weight:100; line-height:Auto; font-style: normal; color:
.light-blue{color:#3a9ecf;}
.black{color:#000;}
.grey{color:#333;}
.light-grey{color:#7c7c7c;}
.white{color:#FFF;}
.blue{color: #00979c;} .blue:hover{color: #03c5cb;}
@ -271,9 +273,22 @@ h5{ font-size:30px;font-weight:100; line-height:Auto; font-style: normal; color:
.top{vertical-align: top;}
.middle{vertical-align: middle;}
.bottom{vertical-align: bottom;}
.rounded{-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;}
.rounded{-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;}
.opacity{opacity: 0.8;}
.circle {
background: none repeat scroll 0 0 #191919;
border-radius: 50px;
height: 50px;
padding: 10px;
width: 50px;
color: #fff;
}
/* _____________________________________________________________________________
BACKGROUND
@ -291,9 +306,9 @@ h5{ font-size:30px;font-weight:100; line-height:Auto; font-style: normal; color:
body { margin: 0; }
header{background-color: #2a2a2a;}
.content-wrapper{background-color:#676767;}
.product-wrapper{ float: left; width:100%; min-height: 293px; -webkit-box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.14);
.product-wrapper{ float: left; width:100%; min-height: 310px; -webkit-box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.14);
-moz-box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.14);
box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.14);}
.icon-wrapper{min-height: 110px; padding-top: 12px; text-align: center; }
@ -363,9 +378,9 @@ header{background-color: #2a2a2a;}
button
_____________________________________________________________________________ */
.blue-btn {
-webkit-border-radius: 5;
-moz-border-radius: 5;
border-radius: 5px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0px;
color: #ffffff;
font-size: 15px;
font-weight: 500;
@ -380,9 +395,9 @@ header{background-color: #2a2a2a;}
text-decoration: none;
}
.blue-action-btn {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
color: #ffffff;
font-size: 15px;
font-weight: 500;
@ -398,9 +413,9 @@ header{background-color: #2a2a2a;}
text-decoration: none;
}
.black-btn {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
color: #ccc;
font-size: 15px;
font-weight: 500;
@ -416,18 +431,27 @@ header{background-color: #2a2a2a;}
text-decoration: none; ;
}
.grey-btn {
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background: none repeat scroll 0 0 #00979c;
border: 0 none;
border-top-left-radius: 0;
border-top-right-radius: 0;
color: #ffffff;
font-size: 13px;
cursor: pointer;
font-size: 18px;
font-weight: 300;
background: #1a1a1a;
padding: 10px 20px 10px 20px;
padding: 10px 35px;
text-decoration: none;
}
.grey-btn:hover {
background: none repeat scroll 0 0 #006a6d;
border: 0 none;
border-top-left-radius: 0;
border-top-right-radius: 0;
color: #ffffff;
cursor: pointer;
font-size: 18px;
font-weight: 300;
padding: 10px 35px;
text-decoration: none;
border: 0px;
cursor:pointer;
}
.grey-btn a{color: #fff; text-decoration: none;}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 137 KiB

@ -5,7 +5,6 @@ $(document).ready(function(){
$(container).slideToggle("fast");
$(container).siblings('div.sign-panel').slideUp("fast");
});
$(".cancel-btn").click(function(){
$(".sign-panel").slideUp();
});

@ -1,67 +0,0 @@
$(function () {
$('.button-checkbox').each(function () {
// Settings
var $widget = $(this),
$button = $widget.find('button'),
$checkbox = $widget.find('input:checkbox'),
color = $button.data('color'),
settings = {
on: {
icon: 'glyphicon glyphicon-check'
},
off: {
icon: 'glyphicon glyphicon-unchecked'
}
};
// Event Handlers
$button.on('click', function () {
$checkbox.prop('checked', !$checkbox.is(':checked'));
$checkbox.triggerHandler('change');
updateDisplay();
});
$checkbox.on('change', function () {
updateDisplay();
});
// Actions
function updateDisplay() {
var isChecked = $checkbox.is(':checked');
// Set the button's state
$button.data('state', (isChecked) ? "on" : "off");
// Set the button's icon
$button.find('.state-icon')
.removeClass()
.addClass('state-icon ' + settings[$button.data('state')].icon);
// Update the button's color
if (isChecked) {
$button
.removeClass('btn-default')
.addClass('btn-' + color + ' active');
}
else {
$button
.removeClass('btn-' + color + ' active')
.addClass('btn-default');
}
}
// Initialization
function init() {
updateDisplay();
// Inject the icon if applicable
if ($button.find('.state-icon').length == 0) {
$button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i>');
}
}
init();
});
});

@ -1,23 +1,26 @@
{{#zone "topLibCss"}}
<link rel="stylesheet" href="{{self.publicURL}}/css/main.css">
<link rel="stylesheet" href="{{self.publicURL}}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{self.publicURL}}/css/main.css">
{{/zone}}
{{#zone "topCss"}}
<link rel="stylesheet" href="{{self.publicURL}}/css/custom-theme.css">
<link rel="stylesheet" href="{{self.publicURL}}/css/fontwso2.css">
<link rel="stylesheet" href="{{self.publicURL}}/css/fontwso2-extend.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="{{self.publicURL}}/js/html5shiv.min.js"></script>
<script src="{{self.publicURL}}/js/respond.min.js"></script>
<![endif]-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="{{self.publicURL}}/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{self.publicURL}}/js/bootstrap.min.js"></script>
<script src="{{self.publicURL}}/js/toggle.js"></script>
{{/zone}}
{{#zone "bottomLibJs"}}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="{{self.publicURL}}/js/html5shiv.min.js"></script>
<script src="{{self.publicURL}}/js/respond.min.js"></script>
<![endif]-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="{{self.publicURL}}/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{self.publicURL}}/js/bootstrap.min.js"></script>
<script src="{{self.publicURL}}/js/toggle.js"></script>
{{/zone}}
{{#zone "bottomJs"}}
<script src="{{self.publicURL}}/scripts/interface.js"></script>
{{/zone}}

@ -0,0 +1,38 @@
byte mac[6] = { 0x90, 0xA2, 0xDA, 0x0D, 0x30, 0xD7}; //mac - 90a2da0d30d7
byte dns2[] = { 8, 8, 8, 8 };
byte subnet[] = { 255, 255, 255, 0 };
byte gateway[] = { 192, 168, 1, 1 };
byte deviceIP[4] = { 192, 168, 1, 219 };
byte server[4] = { 192, 168, 1, 216 };
String connecting = "connecting.... ";
void connectHttp() {
Serial.println("-------------------------------");
Ethernet.begin(mac, deviceIP, dns2, gateway, subnet);
delay(2000);
Serial.print("My IP: ");
Serial.println(Ethernet.localIP());
connecting += httpClient.connect(server, SERVICE_PORT);
delay(2000);
Serial.println(connecting);
if (httpClient.connected()) {
Serial.println("connected");
} else {
Serial.println("connection failed");
Serial.println("retrying to connect......");
while(!httpClient.connected()){
httpClient.connect(server, SERVICE_PORT);
delay(2000);
}
Serial.println("connected to server!");
}
Serial.println("-------------------------------");
}

@ -0,0 +1,39 @@
#[[
#ifndef WSO2ArduinoAgent_H
#define WSO2ArduinoAgent_H
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#define HTTP_METHOD "POST"
#define HTTP_VERSION "HTTP/1.1"
#define DEVICE_IP "192.168.1.219"
#define DEVICE_TYPE "arduino"
]]#
\#define DEVICE_OWNER "${DEVICE_OWNER}"
\#define DEVICE_ID "${DEVICE_ID}"
#[[
#define SERVICE_IP "192.168.1.216"
#define SERVICE_PORT 9763
#define SERVICE_EPOINT "/WSO2ConnectedDevices/DeviceController/pushdata/"
// {ip}/{owner}/{type}/{mac}/90/{key}/{value}
#define MQTT_PROXY SERVICE_IP
#define MQTT_PORT 1883
#define MQTT_CLIENTID "wso2:iot:arduino:xxxxxxxx"
#define MQTT_TOPIC "wso2/iot/shabirmean/arduino/xxxxxxxx"
#define MQTTCLIENT_QOS2 1
#define PUBLISH_INTERVAL 30000
enum IP_TYPE{
SERVER,
DEVICE
};
#endif
]]#

@ -0,0 +1,36 @@
#include "IoTArduinoAgent.h"
#include <Ethernet.h>
#include <SPI.h>
#include <IPStack.h>
#include <Countdown.h>
#include <MQTTClient.h>
EthernetClient httpClient;
int digitalPins[] = { 2, 5, 8, 9, 12 };
int analogPins[] = { 0, 1, 2, 3, 4, 5 };
void setup() {
Serial.begin(9600);
connectHttp();
setupResource();
MQTTConnect();
}
void loop() {
if (httpClient.connected()) {
// pushDigitalPinData();
// pushAnalogPinData();
} else {
Serial.println("client not found...");
Serial.println("disconnecting.");
httpClient.stop();
// connectHttp();
// for(;;)
// ;
}
delay(PUBLISH_INTERVAL);
}

@ -0,0 +1,75 @@
void messageArrived(MQTT::MessageData& md);
int arrivedcount = 0;
MQTT::Message message;
EthernetClient mqtt; // replace by a YunClient if running on a Yun
IPStack mqttIPStack(mqtt);
MQTT::Client<IPStack, Countdown, 100, 1> mqttClient = MQTT::Client<IPStack, Countdown, 100, 1>(mqttIPStack);
void MQTTConnect() {
int rc = -1;
if (!mqttClient.isConnected()) {
Serial.print("Connecting using Registered mode with clientid : ");
Serial.println(MQTT_CLIENTID);
Serial.print("\tto MQTT Broker : ");
Serial.println(MQTT_PROXY);
Serial.print("\ton topic : ");
Serial.println(MQTT_TOPIC);
while (rc != 0) {
rc = mqttIPStack.connect(MQTT_PROXY, MQTT_PORT);
// rc = mqtt.connect(server, MQTT_PORT);
Serial.print("rc from TCP connect is ");
Serial.println(rc);
}
Serial.println("MQTT connecting");
MQTTPacket_connectData options = MQTTPacket_connectData_initializer;
options.MQTTVersion = 3;
options.clientID.cstring = MQTT_CLIENTID;
// options.username.cstring = "admin";
// options.password.cstring = "admin";
// options.keepAliveInterval = 10;
rc = -1;
while ((rc = mqttClient.connect(options)) != 0){
Serial.print("rc from MQTT connect is ");
Serial.println(rc);
}
//unsubscribe the topic, if it had subscribed it before.
Serial.println("MQTT connected");
mqttClient.unsubscribe(MQTT_TOPIC);
//Try to subscribe for commands
if ((rc = mqttClient.subscribe(MQTT_TOPIC, MQTT::QOS2, messageArrived)) != 0) {
Serial.print("Subscribe failed with return code : ");
Serial.println(rc);
} else {
Serial.println("Subscribed\n");
}
Serial.println("Subscription tried......");
Serial.println("Connected successfully\n");
Serial.println("____________________________________________________________________________");
}
}
void messageArrived(MQTT::MessageData& md)
{
MQTT::Message &message = md.message;
Serial.println("=======================================");
Serial.print("Message ");
// Serial.print(++arrivedcount);
Serial.print(" arrived: qos ");
Serial.print(message.qos);
Serial.print(", retained ");
Serial.print(message.retained);
Serial.print(", dup ");
Serial.print(message.dup);
Serial.print(", packetid ");
Serial.println(message.id);
Serial.print("Payload ");
Serial.println((char*)message.payload);
Serial.println("=======================================");
delay(1000);
}

@ -0,0 +1,91 @@
String resource, tempResource, host;
String myIP = "";
String hostIP = "";
void setupResource(){
setHostIP(server);
String port = String(SERVICE_PORT);
host = "Host: " + hostIP + ":" + port;
Serial.println(host);
myIP = String(Ethernet.localIP()[0]);
for ( int index = 1; index < 4; index++) {
myIP += "." + String(Ethernet.localIP()[index]);
}
resource = String(SERVICE_EPOINT) + myIP + "/" + String(DEVICE_OWNER) + "/" +
String(DEVICE_TYPE) + "/" + String(DEVICE_ID) + "/";
resource = resource + 30;
Serial.println(resource);
Serial.println("-------------------------------");
}
void setHostIP(byte server[4]){
hostIP = String(server[0]);
for ( int index = 1; index < 4; index++) {
hostIP += "." + String(server[index]);
}
}
void pushDigitalPinData(){
for ( int pin = 0; pin < (sizeof(digitalPins)/sizeof(int)); pin++) {
tempResource = " " + resource + "/D" + digitalPins[pin] + "/";
if ( digitalRead(digitalPins[pin]) == HIGH) {
tempResource += "HIGH ";
} else if ( digitalRead(digitalPins[pin]) == LOW) {
tempResource += "LOW ";
}
httpClient.print(HTTP_METHOD);
httpClient.print(tempResource);
httpClient.println(HTTP_VERSION);
httpClient.println(host);
httpClient.println();
delay(2000);
while (httpClient.available()) {
char response = httpClient.read();
Serial.print(response);
}
Serial.println();
Serial.println("-------------------------------");
tempResource = "";
delay(2000);
}
}
void pushAnalogPinData(){
for ( int pin = 0; pin < (sizeof(analogPins)/sizeof(int)); pin++) {
tempResource = " " + resource + "/A" + analogPins[pin] + "/" + analogRead(analogPins[pin]) + " ";
httpClient.print(HTTP_METHOD);
httpClient.print(tempResource);
httpClient.println(HTTP_VERSION);
httpClient.println(host);
httpClient.println();
delay(1000);
while (httpClient.available()) {
char response = httpClient.read();
Serial.print(response);
}
Serial.println();
Serial.println("-------------------------------");
tempResource = "";
delay(1000);
}
}
Loading…
Cancel
Save