You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
973 lines
204 KiB
973 lines
204 KiB
4 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<meta name="generator" content="Asciidoctor 2.0.10">
|
||
|
<meta name="description" content="IoT Διαδίκτυο των Αντικειμένων">
|
||
|
<meta name="keywords" content="iot, imu, AHRS">
|
||
|
<meta name="author" content="Apostolos rootApostolos@swarmlab.io">
|
||
|
<title>Sensor node/mote Connect2Server</title>
|
||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||
|
<style>
|
||
|
/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
|
||
|
/* Uncomment @import statement to use as custom stylesheet */
|
||
|
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
|
||
|
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
|
||
|
audio,video{display:inline-block}
|
||
|
audio:not([controls]){display:none;height:0}
|
||
|
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
|
||
|
a{background:none}
|
||
|
a:focus{outline:thin dotted}
|
||
|
a:active,a:hover{outline:0}
|
||
|
h1{font-size:2em;margin:.67em 0}
|
||
|
abbr[title]{border-bottom:1px dotted}
|
||
|
b,strong{font-weight:bold}
|
||
|
dfn{font-style:italic}
|
||
|
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
|
||
|
mark{background:#ff0;color:#000}
|
||
|
code,kbd,pre,samp{font-family:monospace;font-size:1em}
|
||
|
pre{white-space:pre-wrap}
|
||
|
q{quotes:"\201C" "\201D" "\2018" "\2019"}
|
||
|
small{font-size:80%}
|
||
|
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
||
|
sup{top:-.5em}
|
||
|
sub{bottom:-.25em}
|
||
|
img{border:0}
|
||
|
svg:not(:root){overflow:hidden}
|
||
|
figure{margin:0}
|
||
|
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
|
||
|
legend{border:0;padding:0}
|
||
|
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
|
||
|
button,input{line-height:normal}
|
||
|
button,select{text-transform:none}
|
||
|
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
|
||
|
button[disabled],html input[disabled]{cursor:default}
|
||
|
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
|
||
|
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
|
||
|
textarea{overflow:auto;vertical-align:top}
|
||
|
table{border-collapse:collapse;border-spacing:0}
|
||
|
*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
|
||
|
html,body{font-size:100%}
|
||
|
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
||
|
a:hover{cursor:pointer}
|
||
|
img,object,embed{max-width:100%;height:auto}
|
||
|
object,embed{height:100%}
|
||
|
img{-ms-interpolation-mode:bicubic}
|
||
|
.left{float:left!important}
|
||
|
.right{float:right!important}
|
||
|
.text-left{text-align:left!important}
|
||
|
.text-right{text-align:right!important}
|
||
|
.text-center{text-align:center!important}
|
||
|
.text-justify{text-align:justify!important}
|
||
|
.hide{display:none}
|
||
|
img,object,svg{display:inline-block;vertical-align:middle}
|
||
|
textarea{height:auto;min-height:50px}
|
||
|
select{width:100%}
|
||
|
.center{margin-left:auto;margin-right:auto}
|
||
|
.stretch{width:100%}
|
||
|
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
|
||
|
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
|
||
|
a{color:#2156a5;text-decoration:underline;line-height:inherit}
|
||
|
a:hover,a:focus{color:#1d4b8f}
|
||
|
a img{border:0}
|
||
|
p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
|
||
|
p aside{font-size:.875em;line-height:1.35;font-style:italic}
|
||
|
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
|
||
|
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
|
||
|
h1{font-size:2.125em}
|
||
|
h2{font-size:1.6875em}
|
||
|
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
|
||
|
h4,h5{font-size:1.125em}
|
||
|
h6{font-size:1em}
|
||
|
hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
|
||
|
em,i{font-style:italic;line-height:inherit}
|
||
|
strong,b{font-weight:bold;line-height:inherit}
|
||
|
small{font-size:60%;line-height:inherit}
|
||
|
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
|
||
|
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
|
||
|
ul,ol{margin-left:1.5em}
|
||
|
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
|
||
|
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
|
||
|
ul.square{list-style-type:square}
|
||
|
ul.circle{list-style-type:circle}
|
||
|
ul.disc{list-style-type:disc}
|
||
|
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
|
||
|
dl dt{margin-bottom:.3125em;font-weight:bold}
|
||
|
dl dd{margin-bottom:1.25em}
|
||
|
abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
|
||
|
abbr{text-transform:none}
|
||
|
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
|
||
|
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
|
||
|
blockquote cite::before{content:"\2014 \0020"}
|
||
|
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
|
||
|
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
|
||
|
@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
|
||
|
h1{font-size:2.75em}
|
||
|
h2{font-size:2.3125em}
|
||
|
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
|
||
|
h4{font-size:1.4375em}}
|
||
|
table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
|
||
|
table thead,table tfoot{background:#f7f8f7}
|
||
|
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
|
||
|
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
|
||
|
table tr.even,table tr.alt{background:#f8f8f7}
|
||
|
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
|
||
|
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
|
||
|
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
|
||
|
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
|
||
|
.clearfix::after,.float-group::after{clear:both}
|
||
|
:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
|
||
|
:not(pre)>code.nobreak{word-wrap:normal}
|
||
|
:not(pre)>code.nowrap{white-space:nowrap}
|
||
|
pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
|
||
|
pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
|
||
|
pre>code{display:block}
|
||
|
pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
|
||
|
em em{font-style:normal}
|
||
|
strong strong{font-weight:400}
|
||
|
.keyseq{color:rgba(51,51,51,.8)}
|
||
|
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
|
||
|
.keyseq kbd:first-child{margin-left:0}
|
||
|
.keyseq kbd:last-child{margin-right:0}
|
||
|
.menuseq,.menuref{color:#000}
|
||
|
.menuseq b:not(.caret),.menuref{font-weight:inherit}
|
||
|
.menuseq{word-spacing:-.02em}
|
||
|
.menuseq b.caret{font-size:1.25em;line-height:.8}
|
||
|
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
|
||
|
b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
|
||
|
b.button::before{content:"[";padding:0 3px 0 2px}
|
||
|
b.button::after{content:"]";padding:0 2px 0 3px}
|
||
|
p a>code:hover{color:rgba(0,0,0,.9)}
|
||
|
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
|
||
|
#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
|
||
|
#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
|
||
|
#content{margin-top:1.25em}
|
||
|
#content::before{content:none}
|
||
|
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
|
||
|
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
|
||
|
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
|
||
|
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
|
||
|
#header .details span:first-child{margin-left:-.125em}
|
||
|
#header .details span.email a{color:rgba(0,0,0,.85)}
|
||
|
#header .details br{display:none}
|
||
|
#header .details br+span::before{content:"\00a0\2013\00a0"}
|
||
|
#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
|
||
|
#header .details br+span#revremark::before{content:"\00a0|\00a0"}
|
||
|
#header #revnumber{text-transform:capitalize}
|
||
|
#header #revnumber::after{content:"\00a0"}
|
||
|
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
|
||
|
#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
|
||
|
#toc>ul{margin-left:.125em}
|
||
|
#toc ul.sectlevel0>li>a{font-style:italic}
|
||
|
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
|
||
|
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
|
||
|
#toc li{line-height:1.3334;margin-top:.3334em}
|
||
|
#toc a{text-decoration:none}
|
||
|
#toc a:active{text-decoration:underline}
|
||
|
#toctitle{color:#7a2518;font-size:1.2em}
|
||
|
@media screen and (min-width:768px){#toctitle{font-size:1.375em}
|
||
|
body.toc2{padding-left:15em;padding-right:0}
|
||
|
#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
|
||
|
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
|
||
|
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
|
||
|
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
|
||
|
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
|
||
|
body.toc2.toc-right{padding-left:0;padding-right:15em}
|
||
|
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
|
||
|
@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
|
||
|
#toc.toc2{width:20em}
|
||
|
#toc.toc2 #toctitle{font-size:1.375em}
|
||
|
#toc.toc2>ul{font-size:.95em}
|
||
|
#toc.toc2 ul ul{padding-left:1.25em}
|
||
|
body.toc2.toc-right{padding-left:0;padding-right:20em}}
|
||
|
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
|
||
|
#content #toc>:first-child{margin-top:0}
|
||
|
#content #toc>:last-child{margin-bottom:0}
|
||
|
#footer{max-width:100%;background:rgba(0,0,0,.8);padding:1.25em}
|
||
|
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
|
||
|
#content{margin-bottom:.625em}
|
||
|
.sect1{padding-bottom:.625em}
|
||
|
@media screen and (min-width:768px){#content{margin-bottom:1.25em}
|
||
|
.sect1{padding-bottom:1.25em}}
|
||
|
.sect1:last-child{padding-bottom:0}
|
||
|
.sect1+.sect1{border-top:1px solid #e7e7e9}
|
||
|
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
|
||
|
#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
|
||
|
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
|
||
|
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
|
||
|
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
|
||
|
details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
|
||
|
details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
|
||
|
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
|
||
|
table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
|
||
|
.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
|
||
|
table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
|
||
|
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
|
||
|
.admonitionblock>table td.icon{text-align:center;width:80px}
|
||
|
.admonitionblock>table td.icon img{max-width:none}
|
||
|
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
|
||
|
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6)}
|
||
|
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
||
|
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
|
||
|
.exampleblock>.content>:first-child{margin-top:0}
|
||
|
.exampleblock>.content>:last-child{margin-bottom:0}
|
||
|
.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
|
||
|
.sidebarblock>:first-child{margin-top:0}
|
||
|
.sidebarblock>:last-child{margin-bottom:0}
|
||
|
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
||
|
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
||
|
.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;overflow-x:auto;padding:1em;font-size:.8125em}
|
||
|
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
||
|
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
||
|
.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
|
||
|
.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
|
||
|
.listingblock>.content{position:relative}
|
||
|
.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
|
||
|
.listingblock:hover code[data-lang]::before{display:block}
|
||
|
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
|
||
|
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
|
||
|
.listingblock pre.highlightjs{padding:0}
|
||
|
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
|
||
|
.listingblock pre.prettyprint{border-width:0}
|
||
|
.prettyprint{background:#f7f7f8}
|
||
|
pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
|
||
|
pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
|
||
|
pre.prettyprint li code[data-lang]::before{opacity:1}
|
||
|
pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
|
||
|
table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
|
||
|
table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
|
||
|
table.linenotable td.code{padding-left:.75em}
|
||
|
table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
|
||
|
pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
|
||
|
pre.pygments .lineno::before{content:"";margin-right:-.125em}
|
||
|
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
|
||
|
.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
|
||
|
.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
|
||
|
.quoteblock blockquote{margin:0;padding:0;border:0}
|
||
|
.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
|
||
|
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
|
||
|
.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
|
||
|
.verseblock{margin:0 1em 1.25em}
|
||
|
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
|
||
|
.verseblock pre strong{font-weight:400}
|
||
|
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
|
||
|
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
|
||
|
.quoteblock .attribution br,.verseblock .attribution br{display:none}
|
||
|
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
|
||
|
.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
|
||
|
.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
|
||
|
.quoteblock.abstract{margin:0 1em 1.25em;display:block}
|
||
|
.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
|
||
|
.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
|
||
|
.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
|
||
|
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
|
||
|
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
|
||
|
table.tableblock{max-width:100%;border-collapse:separate}
|
||
|
p.tableblock:last-child{margin-bottom:0}
|
||
|
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
|
||
|
td.tableblock>.content>:last-child.sidebarblock{margin-bottom:0}
|
||
|
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
|
||
|
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
|
||
|
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
|
||
|
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
|
||
|
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
|
||
|
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
|
||
|
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
|
||
|
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
|
||
|
table.frame-all{border-width:1px}
|
||
|
table.frame-sides{border-width:0 1px}
|
||
|
table.frame-topbot,table.frame-ends{border-width:1px 0}
|
||
|
table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
|
||
|
th.halign-left,td.halign-left{text-align:left}
|
||
|
th.halign-right,td.halign-right{text-align:right}
|
||
|
th.halign-center,td.halign-center{text-align:center}
|
||
|
th.valign-top,td.valign-top{vertical-align:top}
|
||
|
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
|
||
|
th.valign-middle,td.valign-middle{vertical-align:middle}
|
||
|
table thead th,table tfoot th{font-weight:bold}
|
||
|
tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7}
|
||
|
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
|
||
|
p.tableblock>code:only-child{background:none;padding:0}
|
||
|
p.tableblock{font-size:1em}
|
||
|
ol{margin-left:1.75em}
|
||
|
ul li ol{margin-left:1.5em}
|
||
|
dl dd{margin-left:1.125em}
|
||
|
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
|
||
|
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
|
||
|
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
|
||
|
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
|
||
|
ul.unstyled,ol.unstyled{margin-left:0}
|
||
|
ul.checklist{margin-left:.625em}
|
||
|
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
|
||
|
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
|
||
|
ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
|
||
|
ul.inline>li{margin-left:1.25em}
|
||
|
.unstyled dl dt{font-weight:400;font-style:normal}
|
||
|
ol.arabic{list-style-type:decimal}
|
||
|
ol.decimal{list-style-type:decimal-leading-zero}
|
||
|
ol.loweralpha{list-style-type:lower-alpha}
|
||
|
ol.upperalpha{list-style-type:upper-alpha}
|
||
|
ol.lowerroman{list-style-type:lower-roman}
|
||
|
ol.upperroman{list-style-type:upper-roman}
|
||
|
ol.lowergreek{list-style-type:lower-greek}
|
||
|
.hdlist>table,.colist>table{border:0;background:none}
|
||
|
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
|
||
|
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
|
||
|
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
|
||
|
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
|
||
|
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
|
||
|
.colist td:not([class]):first-child img{max-width:none}
|
||
|
.colist td:not([class]):last-child{padding:.25em 0}
|
||
|
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
|
||
|
.imageblock.left{margin:.25em .625em 1.25em 0}
|
||
|
.imageblock.right{margin:.25em 0 1.25em .625em}
|
||
|
.imageblock>.title{margin-bottom:0}
|
||
|
.imageblock.thumb,.imageblock.th{border-width:6px}
|
||
|
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
|
||
|
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
|
||
|
.image.left{margin-right:.625em}
|
||
|
.image.right{margin-left:.625em}
|
||
|
a.image{text-decoration:none;display:inline-block}
|
||
|
a.image object{pointer-events:none}
|
||
|
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
|
||
|
sup.footnote a,sup.footnoteref a{text-decoration:none}
|
||
|
sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
|
||
|
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
|
||
|
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
|
||
|
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
|
||
|
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
|
||
|
#footnotes .footnote:last-of-type{margin-bottom:0}
|
||
|
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
|
||
|
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
|
||
|
.gist .file-data>table td.line-data{width:99%}
|
||
|
div.unbreakable{page-break-inside:avoid}
|
||
|
.big{font-size:larger}
|
||
|
.small{font-size:smaller}
|
||
|
.underline{text-decoration:underline}
|
||
|
.overline{text-decoration:overline}
|
||
|
.line-through{text-decoration:line-through}
|
||
|
.aqua{color:#00bfbf}
|
||
|
.aqua-background{background:#00fafa}
|
||
|
.black{color:#000}
|
||
|
.black-background{background:#000}
|
||
|
.blue{color:#0000bf}
|
||
|
.blue-background{background:#0000fa}
|
||
|
.fuchsia{color:#bf00bf}
|
||
|
.fuchsia-background{background:#fa00fa}
|
||
|
.gray{color:#606060}
|
||
|
.gray-background{background:#7d7d7d}
|
||
|
.green{color:#006000}
|
||
|
.green-background{background:#007d00}
|
||
|
.lime{color:#00bf00}
|
||
|
.lime-background{background:#00fa00}
|
||
|
.maroon{color:#600000}
|
||
|
.maroon-background{background:#7d0000}
|
||
|
.navy{color:#000060}
|
||
|
.navy-background{background:#00007d}
|
||
|
.olive{color:#606000}
|
||
|
.olive-background{background:#7d7d00}
|
||
|
.purple{color:#600060}
|
||
|
.purple-background{background:#7d007d}
|
||
|
.red{color:#bf0000}
|
||
|
.red-background{background:#fa0000}
|
||
|
.silver{color:#909090}
|
||
|
.silver-background{background:#bcbcbc}
|
||
|
.teal{color:#006060}
|
||
|
.teal-background{background:#007d7d}
|
||
|
.white{color:#bfbfbf}
|
||
|
.white-background{background:#fafafa}
|
||
|
.yellow{color:#bfbf00}
|
||
|
.yellow-background{background:#fafa00}
|
||
|
span.icon>.fa{cursor:default}
|
||
|
a span.icon>.fa{cursor:inherit}
|
||
|
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
|
||
|
.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
|
||
|
.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
|
||
|
.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
|
||
|
.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
|
||
|
.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
|
||
|
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
|
||
|
.conum[data-value] *{color:#fff!important}
|
||
|
.conum[data-value]+b{display:none}
|
||
|
.conum[data-value]::after{content:attr(data-value)}
|
||
|
pre .conum[data-value]{position:relative;top:-.125em}
|
||
|
b.conum *{color:inherit!important}
|
||
|
.conum:not([data-value]):empty{display:none}
|
||
|
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
||
|
h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
|
||
|
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
||
|
p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
|
||
|
p{margin-bottom:1.25rem}
|
||
|
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
||
|
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
||
|
.print-only{display:none!important}
|
||
|
@page{margin:1.25cm .75cm}
|
||
|
@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
|
||
|
html{font-size:80%}
|
||
|
a{color:inherit!important;text-decoration:underline!important}
|
||
|
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
|
||
|
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
|
||
|
abbr[title]::after{content:" (" attr(title) ")"}
|
||
|
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
|
||
|
thead{display:table-header-group}
|
||
|
svg{max-width:100%}
|
||
|
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
|
||
|
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
|
||
|
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
|
||
|
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
|
||
|
body.book #header{text-align:center}
|
||
|
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
|
||
|
body.book #header .details{border:0!important;display:block;padding:0!important}
|
||
|
body.book #header .details span:first-child{margin-left:0!important}
|
||
|
body.book #header .details br{display:block}
|
||
|
body.book #header .details br+span::before{content:none!important}
|
||
|
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
|
||
|
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
|
||
|
.listingblock code[data-lang]::before{display:block}
|
||
|
#footer{padding:0 .9375em}
|
||
|
.hide-on-print{display:none!important}
|
||
|
.print-only{display:block!important}
|
||
|
.hide-for-print{display:none!important}
|
||
|
.show-for-print{display:inherit!important}}
|
||
|
@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
|
||
|
.sect1{padding:0!important}
|
||
|
.sect1+.sect1{border:0}
|
||
|
#footer{background:none}
|
||
|
#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
|
||
|
@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
|
||
|
</style>
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||
|
</head>
|
||
|
<body class="article toc2 toc-right">
|
||
|
<div id="header">
|
||
|
<h1>Sensor node/mote Connect2Server</h1>
|
||
|
<div class="details">
|
||
|
<span id="author" class="author">Apostolos rootApostolos@swarmlab.io</span><br>
|
||
|
</div>
|
||
|
<div id="toc" class="toc2">
|
||
|
<div id="toctitle">Πίνακας περιεχομένων</div>
|
||
|
<ul class="sectlevel1">
|
||
|
<li><a href="#_create_a_mote_with_raspberry_pi">1. Create a mote with Raspberry Pi</a>
|
||
|
<ul class="sectlevel2">
|
||
|
<li><a href="#_install_raspberry_pi">1.1. Install Raspberry Pi</a>
|
||
|
<ul class="sectlevel3">
|
||
|
<li><a href="#_step_1_download_raspbian">1.1.1. Step 1: Download Raspbian</a></li>
|
||
|
<li><a href="#_step_2_unzip_the_file">1.1.2. Step 2: Unzip the file</a></li>
|
||
|
<li><a href="#_step_3_write_the_disc_image_to_your_microsd_card">1.1.3. Step 3: Write the disc image to your microSD card</a></li>
|
||
|
<li><a href="#_step_4_enabling_ssh">1.1.4. Step 4: Enabling SSH</a></li>
|
||
|
<li><a href="#_step_5_put_the_microsd_card_in_your_pi_and_boot_up">1.1.5. Step 5: Put the microSD card in your Pi and boot up</a></li>
|
||
|
<li><a href="#_step_6_access_via_ssh">1.1.6. Step 6: Access via SSH</a></li>
|
||
|
<li><a href="#_step_7_configure_your_raspberry_pi">1.1.7. Step 7: Configure your Raspberry Pi.</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#_arduino_uno_raspberry_pi_serial_communication">1.2. Arduino Uno Raspberry Pi Serial Communication</a>
|
||
|
<ul class="sectlevel3">
|
||
|
<li><a href="#_serial_config_on_raspi">1.2.1. Serial config on Raspi</a></li>
|
||
|
<li><a href="#_reading_in_arduino">1.2.2. Reading in arduino</a></li>
|
||
|
<li><a href="#_python">1.2.3. Python</a></li>
|
||
|
<li><a href="#_php">1.2.4. PHP</a></li>
|
||
|
<li><a href="#_nodejs">1.2.5. NodeJS</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#_send_data2server">1.3. Send data2server</a>
|
||
|
<ul class="sectlevel3">
|
||
|
<li><a href="#_nodejs_2">1.3.1. NodeJS</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="content">
|
||
|
<div id="preamble">
|
||
|
<div class="sectionbody">
|
||
|
<div class="paragraph">
|
||
|
<p><br></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect1">
|
||
|
<h2 id="_create_a_mote_with_raspberry_pi">1. Create a mote with Raspberry Pi</h2>
|
||
|
<div class="sectionbody">
|
||
|
<div class="paragraph">
|
||
|
<p>The Raspberry Pi is a low-cost credit-card sized single-board computer. The Raspberry Pi was created in the UK by the Raspberry Pi Foundation. The Raspberry Pi Foundation’s goal is to "advance the education of adults and children, particularly in the field of computers, computer science and related subjects."</p>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p><a href="https://simple.wikipedia.org/wiki/Raspberry_Pi">Wikipedia</a></p>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<div class="title">Raspberry Pi 2 Model B</div>
|
||
|
<p><span class="image"><img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD//gBdRmlsZSBzb3VyY2U6IGh0dHA6Ly9jb21tb25zLndpa2ltZWRpYS5vcmcvd2lraS9GaWxlOlJhc3BiZXJyeV9QaV8yX01vZGVsX0JfdjEuMV90b3BfbmV3LmpwZ//iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAhAAAG1udHJSR0IgWFlaIAfOAAIACQAGADEAAGFjc3BNU0ZUAAAAAElFQyBzUkdCAAAAAAAAAAAAAAAAAAD21gABAAAAANMtSFAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEWNwcnQAAAFQAAAAM2Rlc2MAAAGEAAAAbHd0cHQAAAHwAAAAFGJrcHQAAAIEAAAAFHJYWVoAAAIYAAAAFGdYWVoAAAIsAAAAFGJYWVoAAAJAAAAAFGRtbmQAAAJUAAAAcGRtZGQAAALEAAAAiHZ1ZWQAAANMAAAAhnZpZXcAAAPUAAAAJGx1bWkAAAP4AAAAFG1lYXMAAAQMAAAAJHRlY2gAAAQwAAAADHJUUkMAAAQ8AAAIDGdUUkMAAAQ8AAAIDGJUUkMAAAQ8AAAIDHRleHQAAAAAQ29weXJpZ2h0IChjKSAxOTk4IEhld2xldHQtUGFja2FyZCBDb21wYW55AABkZXNjAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAAAAAAEnNSR0IgSUVDNjE5NjYtMi4xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYWVogAAAAAAAA81EAAQAAAAEWzFhZ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note">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td class="icon">
|
||
|
<i class="fa icon-note" title="Note"></i>
|
||
|
</td>
|
||
|
<td class="content">
|
||
|
<div class="title">Remember</div>
|
||
|
<div class="paragraph">
|
||
|
<p>A mote is a node but a node is not always a mote!</p>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p><span class="image"><img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAABXAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAAABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFlaAAABuAAAABRyVFJDAAABzAAAAEBnVFJDAAABzAAAAEBiVFJDAAABzAAAAEBkZXNjAAAAAAAAAANjMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0ZXh0AAAAAEZCAABYWVogAAAAAAAA9tYAAQAAAADTLVhZWiAAAAAAAAADFgAAAzMAAAKkWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeFAAAY2lhZWiAAAAAAAAAkoAAAD4QAALbPY3VydgAAAAAAAAAaAAAAywHJA2MFkghrC/YQPxVRGzQh8SmQMhg7kkYFUXdd7WtwegWJsZp8rGm/fdPD6TD////bAEMABQUFBQUFBQYGBQgIBwgICwoJCQoLEQwNDA0MERoQExAQExAaFxsWFRYbFykgHBwgKS8nJScvOTMzOUdER11dff/bAEMBBQUFBQUFBQYGBQgIBwgICwoJCQoLEQwNDA0MERoQExAQExAaFxsWFRYbFykgHBwgKS8nJScvOTMzOUdER11dff/AABEIArwCvAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoopCaAFopu7mlzRdIL3FoppalB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F/g7xPHo3ii5lntzKEnWY+Y8fmdHRvT29K3/2gyGj8MMDkE3GCO+QK562MVTCVp03KEotJrZo9bK+HpYLiLK8PjFSxOHrxnOE4+9TmuXz7HLwfEn4uXMcc0FtLLE4yrpYblYeoIFdL4Q+NeqSavb6d4kt4ljlfyjOiGNo3PA3Ke1dL4G+JPgzSPCeiafe6ykdzBbKskexzgjtnGK8J8W6jb+MfHsk2iwOVuZ4YoNq4Z2XAL47etcsqk6MaM4Yx1JSavBu+59DQwWEzKvmWExXDdPB0aUKnJiox9n8Lsndpep9H/FLxB4u0OHR28Nxu7zPL5wWDzvlUAj6V3XhG91HUPDuj3WpAi8lgDTAp5Z3Z/u9q8m+MfiDXfDOn+Gv7M1OW3dy6SlMfPsQdc5r0/wNe3V/4T0K7u52lnmtlaSRurEnqa9CnUTxdVOUrqCbi9kfF4zC+z4dy6usPQSnXnFVo39pK19JabHYVFLIscbuzAKqliT2A5pd6n+IfnXmfxZ8Q/2B4PvvLkxcXv8Ao0ODg/P94/gK6alSNOnObatGLZ4mBwlTHYzDYWC96rUjFad3q/keE6t8avFg1m/fT7yFdPFywgjMCkmNTgZJ55r6v0XVINZ0rT9RgcGO5hSQY7bhyPwr430TwK+o/DvXteVCZ4p1a3HrHD9/+f6V658B/Ef2zSL7Q5ZMyWb+bCCesUnYD2NeXgq9ZVoxrSbVWPNA+94mynLJZXKrltGEZ5fWVHEOK1ldLV99T6C3Ck3CvA/jX4m1zw8NAOlalLambz/M2Y+bbtxnNee2uofFrxatlqmmz3yWMbxwo8bhAxBAZ2X+Pnk9q66mOhTqypeznKStsu58/g+F8RisvoZhLHYahQquSTqyas4u1vVn16WF
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="sect2">
|
||
|
<h3 id="_install_raspberry_pi">1.1. Install Raspberry Pi</h3>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_1_download_raspbian">1.1.1. Step 1: Download Raspbian</h4>
|
||
|
<div class="paragraph">
|
||
|
<p><a href="https://www.raspberrypi.org/downloads/raspbian/">Download</a> the Raspbian disc image - Choose Raspbian Lite</p>
|
||
|
</div>
|
||
|
<div class="admonitionblock note">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td class="icon">
|
||
|
<i class="fa icon-note" title="Note"></i>
|
||
|
</td>
|
||
|
<td class="content">
|
||
|
<div class="title">Why Raspbian Lite?</div>
|
||
|
<div class="paragraph">
|
||
|
<p>Because it is a lightweight version of the Raspbian and it doesn’t have a graphical user interface installed.</p>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>This means that it doesn’t have any unnecessary software installed that we don’t need for our projects, so this makes it the perfect solution for future automation projects.</p>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_2_unzip_the_file">1.1.2. Step 2: Unzip the file</h4>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>Windows users, you’ll want 7-Zip.</p>
|
||
|
</li>
|
||
|
<li>
|
||
|
<p>Linux users will use the appropriately named Unzip.</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_3_write_the_disc_image_to_your_microsd_card">1.1.3. Step 3: Write the disc image to your microSD card</h4>
|
||
|
<div class="paragraph">
|
||
|
<p>Next, pop your microSD card into your computer and write the disc image to it. You’ll need a specific program to do this:</p>
|
||
|
</div>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>Windows users, your answer is <a href="https://sourceforge.net/projects/win32diskimager/">Win32 Disk Imager</a>.</p>
|
||
|
</li>
|
||
|
<li>
|
||
|
<p>Linux people, <a href="https://www.balena.io/etcher/">Etcher – which also works on Windows – is what the Raspberry Pi Foundation recommends.</a></p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>The process of actually writing the image will be slightly different across these programs, but it’s pretty self-explanatory no matter what you’re using.</p>
|
||
|
</div>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>Each of these programs will have you select the destination (make sure you’ve picked your microSD card!) and the disc image (the unzipped Raspbian file).</p>
|
||
|
</li>
|
||
|
<li>
|
||
|
<p>Choose, double-check, and then hit the button to write.</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_4_enabling_ssh">1.1.4. Step 4: Enabling SSH</h4>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>Windows users</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<div class="title">Create ssh file (no extension)</div>
|
||
|
<p><span class="image"><img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAQCAwMDAgQDAwMEBAQEBQkGBQUFBQsICAYJDQsNDQ0LDAwOEBQRDg8TDwwMEhgSExUWFxcXDhEZGxkWGhQWFxb/2wBDAQQEBAUFBQoGBgoWDwwPFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhb/wgARCADrA1cDASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAUGAQQHAwII/8QAGgEBAQADAQEAAAAAAAAAAAAAAAECAwQFBv/aAAwDAQACEAMQAAAB7+ADQxAePl52vEFE+phfPKiwx1nx5zY4sGzAz1mQoAAAAAADGcGQRUTO6Jvw1gxELmQ1qx672lEZmX2Cu2ko8fYAAAAAAAAA8I6W1DHxt/EeHhIfJrbOPOvnz28xo/e1mzYCtf3+IjWx6GNTf+TU0Zr4I6T+PWzVz7/K7YAAMau1mNXVk8kdnY+qjZjS3QAACA2ZVy3I6pqZ2UZFAAAAAAAAAM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oIRmyL4w2LcavqOP7ULihmZ5VWRFm1WC/Dne9oFfkIVzXtYLM52iz5kDNzCQjpRLnctBpw8gWOdgbBXbWcWcsdvxMSIgiZN1EHSHku7CY5MsQXbYmOLRyATMyUILMB6ntuHkC3d37g7nTak6Wx/tyBxrW9ZtE3JIyniMlk1i4u774+SHfYfQlkzLmyD+VXfzRBL5XLN2u7bJHiqbL3KRaXm4NcuQXipkHQK4JyZsn7l/DY8PROQYm7b2fxREsxm8U1iY5pU98XnAqQxzCAMPPIIizpjokG5
|
||
|
</div>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>Linux Users</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">Create ssh file</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">sudo fdisk -l
|
||
|
# find dev and Boot partition
|
||
|
sudo mkdir /mnt/sdcardP1
|
||
|
sudo mount /dev/device_partion_boot /mnt/sdcardP1 -rw
|
||
|
cd /mnt/sdcardP1
|
||
|
sudo touch ssh</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_5_put_the_microsd_card_in_your_pi_and_boot_up">1.1.5. Step 5: Put the microSD card in your Pi and boot up</h4>
|
||
|
<div class="paragraph">
|
||
|
<p>Your default credentials are username <strong>pi</strong> and password <strong>raspberry</strong></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_6_access_via_ssh">1.1.6. Step 6: Access via SSH</h4>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>The boot protocol for the ethernet interface is set to DHCP by default</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>You can find the open SSH ports on your network using the nmap utility:</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">find ports on Network</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">nmap -p 22 --open -sV 192.168.1.0/24</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>You should find your pi listed in the output along with the IP assigned to the pi.</p>
|
||
|
</div>
|
||
|
<div class="ulist">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>You can change the boot protocol to static and define a static IP address for the pi by editing the ifcfg-eth0 file:</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">static IP address</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">sudo fdisk -l
|
||
|
# find dev and Boot partition
|
||
|
sudo mkdir /mnt/sdcardP1
|
||
|
sudo mount /dev/device_partion_ext /mnt/sdcardP1 -rw
|
||
|
cd /mnt/sdcardP1
|
||
|
vi /etc/sysconfig/network-scripts/ifcfg-eth0</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>Then edit the file to suit your needs</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">static IP address</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">DEVICE=eth0
|
||
|
BOOTPROTO=static
|
||
|
ONBOOT=yes
|
||
|
NETWORK=192.168.1.0
|
||
|
NETMASK=255.255.255.0
|
||
|
IPADDR=192.168.1.200
|
||
|
GATEWAY=192.168.1.1</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_step_7_configure_your_raspberry_pi">1.1.7. Step 7: Configure your Raspberry Pi.</h4>
|
||
|
<div class="paragraph">
|
||
|
<p><strong>raspi-config</strong> is the Raspberry Pi configuration tool</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">config Pi</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">sudo raspi-config</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>It has the following options available:</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">config options</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">┌───────────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├────────────────────┐
|
||
|
│ │
|
||
|
│ 1 Change User Password Change password for the current user │
|
||
|
│ 2 Network Options Configure network settings │
|
||
|
│ 3 Boot Options Configure options for start-up │
|
||
|
│ 4 Localisation Options Set up language and regional settings to match your location │
|
||
|
│ 5 Interfacing Options Configure connections to peripherals │
|
||
|
│ 6 Overclock Configure overclocking for your Pi │
|
||
|
│ 7 Advanced Options Configure advanced settings │
|
||
|
│ 8 Update Update this tool to the latest version │
|
||
|
│ 9 About raspi-config Information about this configuration tool │
|
||
|
│ │
|
||
|
│ │
|
||
|
│ │
|
||
|
│ <Select> <Finish> │
|
||
|
│ │
|
||
|
└──────────────────────────────────────────────────────────────────────────────────────────────────┘</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect2">
|
||
|
<h3 id="_arduino_uno_raspberry_pi_serial_communication">1.2. Arduino Uno Raspberry Pi Serial Communication</h3>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_serial_config_on_raspi">1.2.1. Serial config on Raspi</h4>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">config 1 (recommended)</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">whoami
|
||
|
sudo usermod -a -G dialout pi
|
||
|
reboot</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>This gives read/write permission for all users to the Raspberry Pi (potentially unsafe):</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">config 2</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">sudo chmod 777 /dev/ttyACM0</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>This provides some configuration for the Arduino serial connection:</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">configuration for the Arduino serial connection</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">sudo stty -F /dev/ttyACM0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_reading_in_arduino">1.2.2. Reading in arduino</h4>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">C code in the arduino</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">void loop() {
|
||
|
meas = analogRead(a);
|
||
|
if (Serial.available())
|
||
|
{
|
||
|
if (Serial.read() == '1')
|
||
|
{
|
||
|
Serial.println(meas);
|
||
|
}
|
||
|
}
|
||
|
}</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_python">1.2.3. Python</h4>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">Python code in Raspberry Pi</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-python" data-lang="python">import serial
|
||
|
from datetime import datetime
|
||
|
from time import sleep
|
||
|
now = datetime.now()
|
||
|
|
||
|
ser = serial.Serial('/dev/ttyACM0', 9600)
|
||
|
ser.write("1".encode())
|
||
|
sleep(0.05);
|
||
|
s = ser.readline()
|
||
|
|
||
|
file = open("dataset", "a")
|
||
|
file.write(now.strftime("%Y-%m-%d %H:%M") + " Sensor Value:" + str(s)+ "\n")
|
||
|
file.close()</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_php">1.2.4. PHP</h4>
|
||
|
<div class="admonitionblock note">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td class="icon">
|
||
|
<i class="fa icon-note" title="Note"></i>
|
||
|
</td>
|
||
|
<td class="content">
|
||
|
<div class="title">PHP Class</div>
|
||
|
<div class="paragraph">
|
||
|
<p><a href="https://gist.github.com/gravataLonga/6c89821b845d15e939a0/archive/0d0063684d388a8ff53df8e73e55f4cb1187d7cd.zip">Download Class</a></p>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">PHP code in Raspberry Pi - read</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-php" data-lang="php"><?php
|
||
|
|
||
|
include "php_serial.class.php";
|
||
|
|
||
|
$serial = new phpSerial();
|
||
|
$serial->deviceSet("/dev/ttyACM0");
|
||
|
$serial->confBaudRate(9600);
|
||
|
$serial->confParity("none");
|
||
|
$serial->confCharacterLength(8);
|
||
|
$serial->confStopBits(1);
|
||
|
$serial->confFlowControl("none");
|
||
|
|
||
|
$serial->deviceOpen();
|
||
|
$read = $serial->readPort();
|
||
|
$serial->deviceClose();
|
||
|
|
||
|
echo $read</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>Sends a string to the Arduino.</p>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">PHP code in Raspberry Pi - send</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-php" data-lang="php"><?php
|
||
|
|
||
|
error_reporting(E_ALL);
|
||
|
ini_set('display_errors', '1');
|
||
|
include "php_serial.class.php";
|
||
|
|
||
|
$serial = new phpSerial;
|
||
|
$serial->deviceSet("/dev/ttyAMA0");
|
||
|
$serial->confBaudRate(115200);
|
||
|
$serial->confParity("none");
|
||
|
$serial->confCharacterLength(8);
|
||
|
$serial->confStopBits(1);
|
||
|
$serial->deviceOpen();
|
||
|
$serial->sendMessage("Hello from my PHP script, say hi back!");
|
||
|
|
||
|
$serial->deviceClose();
|
||
|
|
||
|
echo "I've sended a message! \n\r";</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_nodejs">1.2.5. NodeJS</h4>
|
||
|
<div class="admonitionblock note">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td class="icon">
|
||
|
<i class="fa icon-note" title="Note"></i>
|
||
|
</td>
|
||
|
<td class="content">
|
||
|
<div class="paragraph">
|
||
|
<p>Read the writing carefully on your Raspberry Pi circuit board to confirm it indicates something like “Raspberry Pi 4 Model B” or “Raspberry Pi 2 Model B”. If in doubt, run the following command in the terminal:</p>
|
||
|
</div>
|
||
|
<div class="literalblock">
|
||
|
<div class="content">
|
||
|
<pre>$ uname -m</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="paragraph">
|
||
|
<p>If the result returned starts with <strong>“armv6”</strong>, you are running a Raspberry Pi based on the older ARMv6 chipset and the next Node.js installation step <strong>will not work</strong>; otherwise, you are ready for the next step.</p>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">Install NodeJS</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
|
||
|
sudo apt install -y nodejs
|
||
|
npm install raspi-serial</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">Install NodeJS - armv6</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-bash" data-lang="bash">cd ~
|
||
|
wget http://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
|
||
|
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
|
||
|
cd node-v6.2.1-linux-armv6l/
|
||
|
sudo cp -R * /usr/local/
|
||
|
export PATH=$PATH:/usr/local/bin
|
||
|
npm install raspi-serial</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">NodeJS code in Raspberry Pi - read</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-c" data-lang="c">mport { init } from 'raspi';
|
||
|
import { Serial } from 'raspi-serial';
|
||
|
|
||
|
init(() => {
|
||
|
var serial = new Serial();
|
||
|
serial.open(() => {
|
||
|
serial.on('data', (data) => {
|
||
|
process.stdout.write(data);
|
||
|
});
|
||
|
serial.write('Hello from raspi-serial');
|
||
|
});
|
||
|
});</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="sect2">
|
||
|
<h3 id="_send_data2server">1.3. Send data2server</h3>
|
||
|
<div class="sect3">
|
||
|
<h4 id="_nodejs_2">1.3.1. NodeJS</h4>
|
||
|
<div class="listingblock">
|
||
|
<div class="title">NodeJS code in Raspberry Pi - send</div>
|
||
|
<div class="content">
|
||
|
<pre class="highlight"><code class="language-c" data-lang="c">...
|
||
|
var serverIOT=IP_SERVER
|
||
|
const socket = require('socket.io-client')('https://'+serverIOT+':9080');
|
||
|
socket.on('connect', function () {
|
||
|
socket.emit('subscribe', log);
|
||
|
var obj = new Object();
|
||
|
obj.room = log;
|
||
|
obj.message = data;
|
||
|
var text = JSON.stringify(obj);
|
||
|
var text1 = Buffer.from(text);
|
||
|
var text5 = text1.toString('base64');
|
||
|
socket.emit('log', text5, log )
|
||
|
//console.log(util.inspect(text5, false, null, true /* enable colors */))
|
||
|
|
||
|
res.json({
|
||
|
'message':"ok"
|
||
|
});
|
||
|
});
|
||
|
|
||
|
...</code></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="admonitionblock tip">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td class="icon">
|
||
|
<i class="fa icon-tip" title="Tip"></i>
|
||
|
</td>
|
||
|
<td class="content">
|
||
|
You can find more information <a href="https://git.swarmlab.io:3000/zeus/iot-swarm-example/src/branch/master" target="_blank" rel="noopener">here</a> and <a href="http://docs.swarmlab.io/SwarmLab-HowTos/index-lab.adoc.html#_iot_swarm_implementation" target="_blank" rel="noopener">here</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="footer">
|
||
|
<div id="footer-text">
|
||
|
Last updated 2020-10-28 20:13:10 UTC
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|