Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Пояснительная записка к диплому

.pdf
Скачиваний:
7
Добавлен:
20.07.2022
Размер:
14.57 Mб
Скачать

lcd.setCursor(0, 1); lcd.print(ssid); WiFi.begin(ssid, password); delay(1000); lcd.setCursor(0, 0);

lcd.print("WiFi connected!"); lcd.setCursor(0, 1); delay(1000);

lcd.clear();

server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ request->send_P(200, "text/html", index_html, processor);

});

server.on("/temperature", HTTP_GET, [](AsyncWebServerRequest *request){

request->send_P(200, "text/plain", readDSTemperature().c_str());

});

server.on("/humidity", HTTP_GET, [](AsyncWebServerRequest *request){

request->send_P(200, "text/plain", readDHTHumidity().c_str());

});

server.on("/typeegg", HTTP_GET, [](AsyncWebServerRequest *request){

request->send_P(200, "text/plain", readTypeEgg().c_str()); });

server.on("/dayincub", HTTP_GET, [](AsyncWebServerRequest *request){

request->send_P(200, "text/plain", readDayInc().c_str()); });

server.begin();

}

void loop() { if(onoffinc.shouldRun())

onoffinc.run();

if(onOff == 1) { while(daytemp <= daymax) {

if(selectegg.shouldRun())

selectegg.run();

if(onoffinc.shouldRun())

onoffinc.run();

if(rotation.shouldRun())

rotation.run();

if(measure.shouldRun())

measure.run();

if(vlaznost.shouldRun())

vlaznost.run();

if(peregrev.shouldRun())

peregrev.run();

if(incday.shouldRun())

incday.run();

if(pidregulator.shouldRun())

pidregulator.run();

}

digitalWrite(25, LOW); digitalWrite(26, LOW); dimmer.setPower(0); lcd.clear(); lcd.setCursor(0, 0); lcd.print("End process...");

}

else {

digitalWrite(25, LOW); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Idle...");

}

}

ПРИЛОЖЕНИЕ 5

const char index_html[] PROGMEM = R"rawliteral( <!doctype html>

<html lang="ru"> <head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initialscale=1">

<link

href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/boot strap.min.css" rel="stylesheet" integrity="sha384- +0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x

"crossorigin="anonymous">

<script

src="https://code.highcharts.com/highcharts.js"></script> <title>Умная ферма</title>

</head>

<body>

<nav class="navbar navbar-light bg-light"> <div class="container">

<a class="navbar-brand" href="#">

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-gear-wide" viewBox="0 0 16 16">

<path d="M8.932.727c-.243-.97-1.62-.97-1.864 0l-

.071.286a.96.96 0 0 1-1.622.434l-.205-.211c-.695-.719-1.888-.03- 1.613.931l.08.284a.96.96 0 0 1-1.186 1.187l-.284-.081c-.96-.275- 1.65.918-.931 1.613l.211.205a.96.96 0 0 1-.434 1.622l-.286.071c-

.97.243-.97 1.62 0 1.864l.286.071a.96.96 0 0 1 .434 1.622l-

.211.205c-.719.695-.03 1.888.931 1.613l.284-.08a.96.96 0 0 1 1.187 1.187l-.081.283c-.275.96.918 1.65 1.613.931l.205-

.211a.96.96 0 0 1 1.622.434l.071.286c.243.97 1.62.97 1.864 0l.071-.286a.96.96 0 0 1 1.622-.434l.205.211c.695.719 1.888.03 1.613-.931l-.08-.284a.96.96 0 0 1 1.187-1.187l.283.081c.96.275 1.65-.918.931-1.613l-.211-.205a.96.96 0 0 1 .434-1.622l.286-

.071c.97-.243.97-1.62 0-1.864l-.286-.071a.96.96 0 0 1-.434- 1.622l.211-.205c.719-.695.03-1.888-.931-1.613l-.284.08a.96.96 0 0 1-1.187-1.186l.081-.284c.275-.96-.918-1.65-1.613-.931l-

.205.211a.96.96 0 0 1-1.622-.434L8.932.727zM8 12.997a4.998 4.998 0 1 1 0-9.995 4.998 4.998 0 0 1 0 9.996z"/>

</svg>

<b>ВКР: Автоматизированный инкубатор с беспроводным доступом</b>

</a>

</div>

</nav>

<div class="container"> <div class="row">

<div class="col">

<div class="d-flex align-items-start">

<div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical">

<button class="nav-link active" id="v-pills-home-tab" data- bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" ariaselected="true">Инкубатор</button>

<button class="nav-link" id="v-pills-profile-tab" data-bs- toggle="pill" data-bs-target="#v-pills-profile" type="button" role="tab" aria-controls="v-pills-profile" ariaselected="false">Брудер</button>

<button class="nav-link" id="v-pills-messages-tab" data-bs- toggle="pill" data-bs-target="#v-pills-messages" type="button" role="tab" aria-controls="v-pills-messages" ariaselected="false">Курятник</button>

</div>

</div>

</div>

<div class="col-6"><div id="chart-temperature" class="container"></div>

</div>

<div class="col">

<div class="alert alert-primary" role="alert">

<b>Параметры внутри инкубатора:</b>

<div class="alert alert-dark" role="alert">

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-egg" viewBox="0 0 16 16">

<path d="M8 15a5 5 0 0 1-5-5c0-1.956.69-4.286 1.742-6.12.524-

.913 1.112-1.658 1.704-2.164C7.044 1.206 7.572 1 8 1c.428 0

.956.206 1.554.716.592.506 1.18 1.251 1.704 2.164C12.31 5.714 13 8.044 13 10a5 5 0 0 1-5 5zm0 1a6 6 0 0 0 6-6c0-4.314-3-10-6-10S2 5.686 2 10a6 6 0 0 0 6 6z"/>

</svg> <b>Тип яйца:</b> <h2><span id="typeegg">%TYPEEGG%</span></h2> </div>

<div class="alert alert-dark" role="alert">

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar-event" viewBox="0 0 16 16">

<path d="M11 6.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1z"/>

<path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2- 2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1- 1V4H1z"/>

</svg> <b>День инкубации:</b> <h2><span id="dayincub">%DAYINCUB%</span> день</h2> </div>

<div class="alert alert-dark" role="alert">

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lightbulb" viewBox="0 0 16 16">

<path d="M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-

.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5

15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761- 1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm6-5a5 5

00 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632- 1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1z"/>

</svg> <b>Температура:</b> <h2><span id="temperature">%TEMPERATURE%</span> °C</h2>

</div>

<div class="alert alert-dark" role="alert">

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-droplet-half" viewBox="0 0 16 16">

<path fill-rule="evenodd" d="M7.21.8C7.69.295 8 0 8 0c.109.363.234.708.371 1.038.812 1.946 2.073 3.35 3.197 4.6C12.878 7.096 14 8.345 14 10a6 6 0 0 1-12 0C2 6.668 5.58 2.517 7.21.8zm.413 1.021A31.25 31.25 0 0 0 5.794 3.99c-.726.95- 1.436 2.008-1.96 3.07C3.304 8.133 3 9.138 3 10c0 0 2.5 1.5 5

.5s5-.5 5-.5c0-1.201-.796-2.157-2.181-3.7l-.03-.032C9.75 5.11 8.5 3.72 7.623 1.82z"/>

<path fill-rule="evenodd" d="M4.553 7.776c.82-1.641 1.717- 2.753 2.093-3.13l.708.708c-.29.29-1.128 1.311-1.907 2.87l-.894-

.448z"/>

</svg> <b>Влажность:</b> <h2><span id="humidity">%HUMIDITY%</span> <b>%</b></h2> </div>

<div class="alert alert-dark" role="alert">

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-workspace" viewBox="0 0

1616">

<path d="M4 16s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H4Zm4-5.95a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>

<path d="M2 1a2 2 0 0 0-2 2v9.5A1.5 1.5 0 0 0 1.5 14h.653a5.373 5.373 0 0 1 1.066-2H1V3a1 1 0 0 1 1-1h12a1 1 0 0 1

11v9h-2.219c.554.654.89 1.373 1.066 2h.653a1.5 1.5 0 0 0 1.5- 1.5V3a2 2 0 0 0-2-2H2Z"/>

</svg>

</svg> <b>Процесс:</b> <h2><span id="humidity">%PROCESS%</span></h2> </div>

</div>

</div>

</div>

</body>

<script>

var chartT = new Highcharts.Chart({

chart:{ renderTo : 'chart-temperature' },

title: { text: 'Температура внутри инкубатора' }, series: [{

showInLegend: false, data: []

}], plotOptions: {

line: { animation: false, dataLabels: { enabled: true }

},

series: { color: '#059e8a' }

},

xAxis: { type: 'datetime', dateTimeLabelFormats: { second: '%H:%M:%S' }

}, yAxis: {

title: { text: 'Температура (°C)' }

},

credits: { enabled: false } });

setInterval(function ( ) {

var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) { var x = (new Date()).getTime(), y =

parseFloat(this.responseText); if(chartT.series[0].data.length > 40) { chartT.series[0].addPoint([x, y], true, true, true);

}

else {

chartT.series[0].addPoint([x, y], true, false, true);

}

document.getElementById("temperature").innerHTML = this.responseText;

}

};

xhttp.open("GET", "/temperature", true); xhttp.send();

}, 10000 ) ;

setInterval(function ( ) {

var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) { document.getElementById("humidity").innerHTML =

this.responseText;

}

};

xhttp.open("GET", "/humidity", true); xhttp.send();

}, 10000 ) ;

setInterval(function ( ) {

var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) { document.getElementById("typeegg").innerHTML =

this.responseText;

}

};

xhttp.open("GET", "/typeegg", true);

xhttp.send(); }, 10000 ) ;

setInterval(function ( ) {

var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) { document.getElementById("dayincub").innerHTML =

this.responseText;

}

};

xhttp.open("GET", "/dayincub", true); xhttp.send();

}, 10000 ) ; setInterval(function ( ) {

var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) { document.getElementById("process").innerHTML =

this.responseText;

}

};

xhttp.open("GET", "/process", true); xhttp.send();

}, 10000 ) ; </script> </html>)rawliteral";

ПРЕЗЕНТАЦИЯ ДИПЛОМНОЙ РАБОТЫ НА ТЕМУ:

«

Выполнил:

Научный руководитель: профессор, д.т.н. Данилаев Максим Петрович

Казань 2022 г.

Актуальность

Все профессиональные и домашние модели инкубаторов, представленные на рынке, обладают одинаковым недостатком. У них нет возможности дистанционного контроля за процессом инкубации поэтому они требуют непосредственного расположения вблизи себя оператора. Проектируемая автоматизированная беспроводная система должна устранить этот недостаток и сделать процесс инкубации более удобным и эффективным.

2

Задачи

Познакомиться с группой беспроводных стандартов Short Range RF и выбрать один из них для проектируемой системы;

Сформировать требования к проектируемой автоматизированной системе;

Разработать алгоритм работы, подобрать необходимые компоненты для проектируемой системы;

Разработать структурную и принципиальную схему проектируемой системы;

Отладить программное обеспечение;

Спроектировать макет.

3

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]