Skip to content
Snippets Groups Projects
Commit 9d6635d5 authored by Robert Piotrowski's avatar Robert Piotrowski
Browse files

Poprawion rys do zad z alarmTemp

parent 00849c23
Branches
No related merge requests found
......@@ -47,11 +47,11 @@ with open(path,'r',encoding = 'utf-8') as f:
- nadawać wiadomości MQTT z ustalonym interwałem (np. 5s) w topic 'sensors/bme280/' - aplikacja sensorsBME280.py (1pkt.)
<img src="img/ztb_lab2_schem_bme280.svg" width="240">
- odczytywać własne wiadomości z temp. z MQTT (aplikacja recvBME280.py) (1pkt.)
- wysłać wiadomości MQTT z aktualną temp., kiedy wykryto opadający zbocze na przycisku (wciśnięcie) (zmodyfikować sendBME280.py, tak aby odbierał wiadomości MQTT wysyłane z aplikacji buttonMQTT.py z lab1) (1pkt.)
- wysłać wiadomości MQTT z aktualną temp., kiedy wykryto opadający zbocze na przycisku (wciśnięcie) (zmodyfikować sendBME280.py, tak aby odbierał wiadomości MQTT wysyłane z aplikacji button.py z lab1) (1pkt.)
<img src="img/ztb_lab2_schem_bme280_button.svg" width="240">
- odczytać wiadomości z temp. z innych DevKitNUC (zmodyfikować recvBME280.py, tak aby dobierał wiadomości z kliku kanałów MQTT) (1pkt.)
<img src="img/ztb_lab2_schem_bme280_button_otherNUC.svg" width="240">
- utwórz aplikacje alarmTemp.py: odczytuj wiadomości z topic 'sensors/bme280', gdy temp>28st to zapal LED wysyłając wiadomości na topic 'sensors/490'),gdy temp.<28st. LEE wygaszona (1pkt.)
- utwórz aplikacje alarmTemp.py: odczytuj wiadomości z topic 'sensors/bme280', gdy temp>28st to zapal LED wysyłając wiadomości na topic 'led/490'),gdy temp.<28st. LED wygaszona, skorzystaj z apliakacji led.py z lab1 (1pkt.)
<img src="img/ztb_lab2_schem_bme280_alarm.svg" width="240">
## Utworzyć nowe oraz uruchomić kontenery Telegraf, Influx, Grafana
......
......@@ -9,9 +9,9 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="255.8017mm"
height="144.29478mm"
viewBox="0 0 255.8017 144.29478"
width="227.11314mm"
height="138.04544mm"
viewBox="0 0 227.11314 138.04544"
version="1.1"
id="svg8"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
......@@ -306,6 +306,38 @@
transform="scale(0.6)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow2Mstart"
orient="auto"
refY="0"
refX="0"
id="Arrow2Mstart"
style="overflow:visible"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path1166"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
transform="scale(0.6)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1719"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow2Mstart"
inkscape:collect="always">
<path
transform="scale(0.6)"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
id="path1717"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
......@@ -314,9 +346,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.0767374"
inkscape:cx="634.21552"
inkscape:cy="222.3599"
inkscape:zoom="0.76136832"
inkscape:cx="468.29281"
inkscape:cy="443.22741"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
......@@ -340,16 +372,16 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(91.104373,-50.427048)">
transform="translate(66.083636,-35.438421)">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:7.05555534px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-91.300743"
y="91.240807"
x="-66.280006"
y="89.850769"
id="text27"><tspan
sodipodi:role="line"
x="-91.300743"
y="91.240807"
x="-66.280006"
y="89.850769"
style="font-size:7.05555534px;stroke-width:0.26458332px"
id="tspan29">sensorBME280.py</tspan></text>
<g
......@@ -1361,5 +1393,131 @@
d="m -100.69233,138.57066 0.62311,0.34779 0.408707,-0.59923"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.17906021px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
id="g6964"
transform="translate(29.443335,-78.696841)">
<text
transform="rotate(-14.135158)"
id="text62-3"
y="142.4953"
x="24.288315"
style="font-style:normal;font-weight:normal;font-size:5.64444447px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-size:5.64444447px;stroke-width:0.26458332px"
y="142.4953"
x="24.288315"
id="tspan60-6"
sodipodi:role="line">subscribe(&quot;led/#&quot;)</tspan></text>
<g
transform="translate(-35.982642,-18.583098)"
id="g277">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:5.64444447px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="49.356239"
y="180.82765"
id="text255"
transform="rotate(-14.358521)"><tspan
sodipodi:role="line"
id="tspan253"
x="49.356239"
y="180.82765"
style="font-size:5.64444447px;stroke-width:0.26458332px">publish(&quot;490,:1&quot;)</tspan></text>
<g
id="g275"
transform="matrix(0.82753259,-0.3858119,0.3858119,0.82753259,-52.345494,99.883787)">
<g
id="g273"
transform="matrix(0.13317062,0,0,0.13317062,165.98921,120.30093)">
<path
id="path259"
d="m -2.1057453,130.98417 v -17 a 11,11 0 0 0 -21.9999997,0 v 17 a 3.009,3.009 0 0 0 -3,3 v 2 a 3.009,3.009 0 0 0 3,3 h 6 v 9 h 2 v -9 h 6 v 12.99999 h 1.9999997 v -12.99999 h 6 a 3.009,3.009 0 0 0 3.00000005,-3 v -2 a 3.009,3.009 0 0 0 -3.00000005,-3 z m -19.9999997,-17 a 9.0000001,9.0000001 0 0 1 17.9999997,0 v 17 h -4 v -8 a 1,1 0 0 0 -1,-1 h -2.9999997 a 1.033,1.033 0 0 0 -0.71,0.29 l -1.02,1.02 -0.38,-0.76 a 0.977,0.977 0 0 0 -0.89,-0.55 h -2 a 1,1 0 0 0 -1,1 v 8 h -4 z m 12,10 v 7 h -6 v -7 h 0.38 l 0.73,1.45 a 1,1 0 0 0 0.73,0.54 1.032,1.032 0 0 0 0.87,-0.28 l 1.7,-1.71 z m 8.9999997,12 a 1,1 0 0 1 -1,1 H -24.105745 a 1,1 0 0 1 -1,-1 v -2 a 1,1 0 0 1 1,-1 h 21.9999997 a 1,1 0 0 1 1,1 z"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
<g
transform="matrix(1,0,0,-1,-28.042382,226.19743)"
id="g2185">
<path
inkscape:connector-curvature="0"
id="path2181"
d="M 62.988566,84.927854 143.69012,108.20601"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.50000004, 0.50000001;stroke-dashoffset:0;stroke-opacity:1;marker-start:url(#marker1719)"
d="M 143.02022,104.15763 64.351035,80.671739"
id="path2183"
inkscape:connector-curvature="0" />
</g>
<text
id="text139"
y="133.22188"
x="112.76218"
style="font-style:normal;font-weight:normal;font-size:7.05555534px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-size:7.05555534px;stroke-width:0.26458332px"
y="133.22188"
x="112.76218"
id="tspan137"
sodipodi:role="line">led.py</tspan></text>
<g
id="g5859"
transform="translate(-28.045142,78.783576)">
<g
id="g192"
transform="matrix(0.91305039,0,0,0.91305039,-5.28044,-72.250772)">
<rect
y="120.20163"
x="165.74257"
height="8.3627234"
width="8.7879467"
id="rect181"
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<g
id="led"
transform="matrix(0.13317062,0,0,0.13317062,165.98921,120.30093)">
<path
id="path2-4"
d="M 43,41 V 24 a 11,11 0 0 0 -22,0 v 17 a 3.009,3.009 0 0 0 -3,3 v 2 a 3.009,3.009 0 0 0 3,3 h 6 v 9 h 2 v -9 h 6 v 13 h 2 V 49 h 6 a 3.009,3.009 0 0 0 3,-3 V 44 A 3.009,3.009 0 0 0 43,41 Z M 23,24 a 9,9 0 0 1 18,0 v 17 h -4 v -8 a 1,1 0 0 0 -1,-1 h -3 a 1.033,1.033 0 0 0 -0.71,0.29 l -1.02,1.02 -0.38,-0.76 A 0.977,0.977 0 0 0 30,32 h -2 a 1,1 0 0 0 -1,1 v 8 h -4 z m 12,10 v 7 h -6 v -7 h 0.38 l 0.73,1.45 a 1,1 0 0 0 0.73,0.54 1.032,1.032 0 0 0 0.87,-0.28 L 33.41,34 Z m 9,12 a 1,1 0 0 1 -1,1 H 21 a 1,1 0 0 1 -1,-1 v -2 a 1,1 0 0 1 1,-1 h 22 a 1,1 0 0 1 1,1 z"
inkscape:connector-curvature="0" />
<path
id="path4"
d="m 32,18 v -2 a 8.009,8.009 0 0 0 -8,8 h 2 a 6.006,6.006 0 0 1 6,-6 z"
inkscape:connector-curvature="0" />
<path
id="path6"
d="m 31,2 h 2 v 6 h -2 z"
inkscape:connector-curvature="0" />
<path
id="path8-7"
transform="matrix(0.707,-0.707,0.707,0.707,-5.347,12.909)"
d="m 11.908,9.908 h 2 v 6 h -2 z"
inkscape:connector-curvature="0" />
<path
id="path10"
d="m 2,31 h 6 v 2 H 2 Z"
inkscape:connector-curvature="0" />
<path
id="path12"
d="m 56,31 h 6 v 2 h -6 z"
inkscape:connector-curvature="0" />
<path
id="path14-4"
transform="matrix(0.707,-0.707,0.707,0.707,5.837,39.908)"
d="m 48.092,11.908 h 6 v 2 h -6 z"
inkscape:connector-curvature="0" />
</g>
</g>
<circle
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2251"
cx="149.91956"
cy="41.34798"
r="5.746295" />
</g>
</g>
</g>
</svg>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment