@ -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
|
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" />
|
||||
<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>
|
||||
<br/><br/><br/>
|
||||
</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,3 +1,3 @@
|
||||
{
|
||||
|
||||
"predicate": "false"
|
||||
}
|
After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 542 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@ -1,3 +1,3 @@
|
||||
{
|
||||
"predicate": "true"
|
||||
"predicate": "false"
|
||||
}
|
@ -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";
|
||||
}
|
||||
|
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 29 KiB |
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|