Update README.bn.md

pull/169/head
Mohammad Iftekher (Iftu) Ebne Jalal 4 years ago committed by GitHub
parent d8965da1ed
commit a848795692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,76 +1,80 @@
# Predict plant growth with IoT
# আইওটি দ্বারা উদ্ভিদ বৃদ্ধির পূর্বাভাস
## Pre-lecture quiz
![A sketchnote overview of this lesson](../../../sketchnotes/lesson-5.png)
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/9)
> স্কেচনোটটি তৈরী করেছেন [Nitya Narasimhan](https://github.com/nitya). বড় সংস্করণে দেখার জন্য ছবিটিতে ক্লিক করতে হবে।
## Introduction
## লেকচার-পূর্ববর্তী কুইজ
Plants need certain things to grow - water, carbon dioxide, nutrients, light, and heat. In this lesson, you'll learn how to calculate the growth and maturity rates of plants by measuring the air temperature.
[লেকচার-পূর্ববর্তী কুইজ](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/9)
In this lesson we'll cover:
## সূচনা
* [Digital agriculture](#digital-agriculture)
* [Why is temperature important when farming?](#why-is-temperature-important-when-farming)
* [Measure ambient temperature](#measure-ambient-temperature)
* [Growing degree days (GDD)](#growing-degree-days)
* [Calculate GDD using temperature sensor data](#calculate-gdd-using-temperature-sensor-data)
উদ্ভিদের বৃদ্ধির জন্য নির্দিষ্ট কিছু উপাদান প্রয়োজন - পানি, কার্বন-ডাইঅক্সাইড, পুষ্টি, হালকা এবং তাপ। এই পাঠে আমরা শিখবো কীভাবে বায়ুর তাপমাত্রা পরিমাপ করে উদ্ভিদের বৃদ্ধি এবং পরিপক্কতার হার হিসেব করা যায়।
## Digital agriculture
এই লেসনে আমরা শিখবো:
Digital Agriculture is transforming how we farm, using tools to collect, store and analyze data from farming. We are currently in a period described as the 'Fourth Industrial Revolution' by the World Economic Forum, and the rise of digital agriculture has been labelled as the 'Fourth Agricultural Revolution', or 'Agriculture 4.0'.
* [ডিজিটাল কৃষিব্যবস্থা](#ডিজিটাল-কৃষিব্যবস্থা)
* [কৃষিকাজে তাপমাত্রা কেন গুরুত্বপূর্ণ?](#কৃষিকাজে-তাপমাত্রা-কেন-গুরুত্বপূর্ণ)
* [চারিপার্শ্বিক তাপমাত্রা পরিমাপ](#চারিপার্শ্বিক-তাপমাত্রা-পরিমাপ)
* [Growing degree days (GDD) হিসেব](#growing-degree-days)
* [তাপমাত্রা সেন্সরের তথ্য দিয়ে GDD নির্ণয়](#তাপমাত্রা-সেন্সরের-তথ্য-দিয়ে-GDD-নির্ণয়)
> 🎓 The term Digital Agriculture also includes the whole 'agriculture value chain', that is the entire journey from farm to table. It includes tracking produce quality as food is shipped and processed, warehouse and e-commerce systems, even tractor rental apps!
## ডিজিটাল কৃষিব্যবস্থা
These changes allow farmers to increase yields, use less fertilizers and pesticides, and water more efficiently. Although primarily used in richer nations, sensors and other devices are slowly reducing in price, making them more accessible in developing nations.
ডিজিটাল বিপ্লব আমাদের কৃষিব্যবস্থায় আমূল পরিবর্তন আনছে। ডেটা সংগ্রহ, ডেটা স্টোর এবং সেই তথ্য বিশ্লেষণের মাধ্যমে আমাদের কৃষিকাজ নতুন রূপ লাভ করছে। ওয়ার্ল্ড ইকোনমিক ফোরামের ভাষ্যমতে আমরা বর্তমানে 'চতুর্থ শিল্প বিপ্লব' এর সময়ে আছি এবং ডিজিটাল কৃষির উত্থানকে 'চতুর্থ কৃষি বিপ্লব' বা 'কৃষি 4.0' হিসাবে চিহ্নিত করা হচ্ছে।
Some techniques enabled by digital agriculture are:
> 🎓 'ডিজিটাল এগ্রিকালচার' বলতে কৃষিব্যবস্থার সম্পূর্ণ value chain কে বোঝানো হয় যা একেবারে খামার থেকে খাওয়ার টেবিল পর্যন্ত সম্পূর্ণ যাত্রা । খাদ্য পরিবহণ এবং প্রক্রিয়াজাতকরণের সময় তার গুণগত মান ট্র্যাক করা, গুদাম এবং ই-কমার্স ব্যবস্থা পরিচালনা এমনকি ট্র্যাক্টর ভাড়া করা পর্যন্ত - সবকিছুই বর্তমানে ডিজিটাল মাধ্যমে করা সম্ভব হচ্ছে
* Temperature measurement - measuring temperature allows farmers to predict plant growth and maturity.
* Automated watering - measuring soil moisture and turning on irrigation systems when the soil is too dry, rather than timed watering. Timed watering can lead to crops being under-watered during a hot, dry spell, or over-watered during rain. By watering only when the soil needs it farmers can optimize their water use.
* Pest control - farmers can use cameras on automated robots or drones to check for pests, then apply pesticides only where needed, reducing the amount of pesticides used and reducing pesticide run-off into local water supplies.
এই বৈপ্লবিক পরিবর্তনের কারণে কম পরিমাণে সার ও কীটনাশক এবং দক্ষতার সাথে সেচ বা পানি ব্যবহার করে কৃষকেরা এখন অধিক ফলন পাচ্ছেন। যদিও প্রাথমিকভাবে কেবল উন্নত দেশগুলোতেই সেন্সর এবং অন্যান্য আধুনিক যন্ত্রের ব্যবহার শুরু হয়, বর্তমানে এগুলোর দাম কমে আসছে এবং উন্নয়নশীল দেশগুলোতেও অনেক বেশি সহজলভ্য হচ্ছে।
✅ Do some research. What other techniques are used to improve farming yields?
ডিজিটাল কৃষিব্যবস্থায় আমরা দেখতে পাচ্ছি -
> 🎓 The term 'Precision Agriculture' is used to define observing, measuring and responding to crops on a per-field basis, or even on parts of a field. This includes measuring water, nutrient and pest levels and responding accurately, such as watering only a small part of a field.
* তাপমাত্রা পরিমাপ - তাপমাত্রা সঠিক পরিমাপ কৃষকদের গাছের বৃদ্ধি এবং পরিপক্কতা সম্পর্কে পূর্বাভাস দেয়।
* স্বয়ংক্রিয় সেচকার্য - নির্দিষ্ট সময় পরপর পানি দেয়ার পরিবর্তে, মাটির আর্দ্রতা পরিমাপ করে, তা খুব শুষ্ক হলে সেচ ব্যবস্থা চালু করা অধিক উপযোগী। সময়ভিত্তিক সেচের ফলে গরম, শুষ্ক সময়ে কম পানি পাওয়া বা বৃষ্টির সময় অতিরিক্ত পানির চাপ বেড়ে যাওয়ার মতো ঘটনা ঘটতে পারে। কেবল প্রয়োজনের সময়ে সেচ দিয়েই, কৃষকরা তাদের জলের ব্যবহার আরো বেশি কার্যকর করতে পারে।
* কীটপতঙ্গ নিয়ন্ত্রণ - কৃষকরা স্বয়ংক্রিয় রোবট বা ড্রোনগুলিতে ক্যামেরা ব্যবহার করে কীতপতঙ্গ গুলো পর্যবেক্ষণ করতে পারে এবং কেবল যেখানে প্রয়োজন সেখানেই কীটনাশক প্রয়োগ করতে পারেন। এতে করে কীটনাশকের পরিমাণ হ্রাস হবে এবং স্থানীয় জলের সরবরাহে কীটনাশকের মিশ্রণ কমে আসবে।
## Why is temperature important when farming?
✅ একটু ভাবা যাক - কৃষকের ফলন উন্নত করতে আর কোন কোন কৌশল ব্যবহার করা হয়?
When learning about plants, most students are taught about the necessity of water, light, carbon dioxide (CO<sub>2</sub>) and nutrients. Plants also need warmth to grow - this is why plants bloom in spring as the temperature rises, why snowdrops or daffodils can sprout early due to a short warm spell, and why hothouses and greenhouses are so good at making plants grow.
> 🎓 'Precision Agriculture' পরিভাষা ব্যবহৃত হয় ফসলের পর্যবেক্ষণ, পরিমাপ ও প্রতিক্রিয়া সংক্রান্ত কাজে। এর মধ্যে সেচ নিশ্চিতকরণ, পুষ্টিমাত্রা সঠিক রাখা এবং কীটপতঙ্গের মাত্রা পরিমাপ করা এবং নির্ভুলভাবে যথাযথ কাজটি করা যেমন ক্ষেতের কেবলমাত্র প্রয়োজনীয় ছোট অংশে সেচ দেয়া - এসব অন্তর্ভুক্ত।
> 🎓 Hothouses and greenhouses do a similar job, but with an important difference. Hothouses are heated artificially and allow farmers to control temperatures more accurately, greenhouses rely on the sun for warmth and usually the only control is windows or other openings to let heat out.
## কৃষিকাজে তাপমাত্রা কেন গুরুত্বপূর্ণ ?
Plants have a base or minimum temperature, optimal temperature, and maximum temperature, all based on daily average temperatures.
গাছপালা সম্পর্কে শেখার সময়, বেশিরভাগ শিক্ষার্থীদের পানি, আলো, কার্বন ডাইঅক্সাইড এবং পুষ্টির প্রয়োজনীয়তা সম্পর্কে শেখানো হয়। গাছপালা বৃদ্ধির জন্য উষ্ণতাও প্রয়োজন - এই কারণেই তাপমাত্রা বৃদ্ধির সাথে সাথে বসন্তে উদ্ভিদের ফুল ফোটে। উষ্ণতার কারণেই ড্যাফোডিল খুব শীঘ্রই ফুটতে পারে পারে এবং হটহাউস ও গ্রিনহাউসগুলি গাছ এর বৃদ্ধির জন্য কার্যকরী ভূমিকা রাখে।
* Base temperature - this is the minimum daily average temperature needed for a plant to grow.
* Optimum temperature - this is the best daily average temperature to get the most growth.
* Maximum temperature - The is the maximum temperature a plant can withstand. Above this the plant will shut down it's growth in an attempt to conserve water and stay alive.
> 🎓 হটহাউস এবং গ্রিনহাউসগুলি একই কাজ করে তবে একটি গুরুত্বপূর্ণ পার্থক্য রয়েছে। হটহাউস কৃত্রিমভাবে উত্তপ্ত করা হয় এবং কৃষকদেরকে তাপমাত্রা আরও সঠিকভাবে নিয়ন্ত্রণ করার সুযোগ দেয়, কিন্তু গ্রিনহাউসগুলি উষ্ণতার জন্য সূর্যের উপর নির্ভর করে এবং সাধারণত তাপমাত্রা নিয়ন্ত্রণের জন্য জানালা বা কোন ছিদ্রের উপর নির্ভর করতে হয়।
> 💁 These are average temperatures, averaged over the daily and nightly temperatures. Plants also need different temperatures day and night to help them photosynthesize more efficiently and save energy at night.
গাছের একটি বেস বা সর্বনিম্ন তাপমাত্রা, সর্বোত্তম বা পরিমিত তাপমাত্রা এবং সর্বাধিক তাপমাত্রা থাকে, যা সবগুলিই প্রতিদিনের গড় তাপমাত্রার উপর নির্ভর করে।
Each species of plant has different values for their base, optimal and maximum. This is why some plants thrive in hot countries, and others in colder countries.
* বেস (সর্বনিম্ন) তাপমাত্রা - এটি কোনও গাছের বৃদ্ধির জন্য প্রয়োজনীয় ন্যূনতম দৈনিক গড় তাপমাত্রা।
* পরিমিত তাপমাত্রা - সর্বাধিক বৃদ্ধি পেতে এটি সেরা দৈনিক গড় তাপমাত্রা।
* সর্বাধিক তাপমাত্রা - এটি একটি উদ্ভিদ সহ্য করতে পারে সর্বোচ্চ তাপমাত্রা। এর উপরে উদ্ভিদ পানি সংরক্ষণ এবং জীবিত থাকার চেষ্টায় এর বৃদ্ধি বন্ধ করে দেবে।
✅ Do some research. For any plants you have in your garden, school, or local park see if you can find the base temperature.
> 💁 এগুলি দিন এবং রাতের তুলনায় গড় তাপমাত্রা। গাছপালাগুলিকে আরও বেশি দক্ষতার সাথে আলোকসংশ্লেষণ করতে এবং রাতে শক্তি সঞ্চয় করতে সহায়তা করার জন্য দিন ও রাতে বিভিন্ন তাপমাত্রার প্রয়োজন হয়।
প্রতিটি প্রজাতির উদ্ভিদের তাদের সর্বনিম্ন, সর্বোত্তম এবং সর্বাধিক তাপমাত্রারর জন্য আলাদা আলাদা মান রয়েছে । এ কারণেই কিছু দেশে গাছপালা উষ্ণ এবং অপর কিছু দেশে শীতল অবস্থায় অধিক বৃদ্ধি পায়।
✅ ছোট একটি গবেষণা করা যাক। আমাদের বাগান, স্কুল বা স্থানীয় উদ্যানের যে কোনও গাছের জন্য কীভাবে বেস তাপমাত্রা খুঁজে পেতে পারেন কিনা তা দেখুন।
![A graph showing growth rate rising as temperature rises, then dropping as the temperature goes too high](../../../images/plant-growth-temp-graph.png)
The graph above shows an example growth rate to temperature graph. Up to the base temperature there is no growth. The growth rate increases up to the optimum temperature, then falls after reaching this peak. At the maximum temperature growth stops.
উপরের গ্রাফটি তাপমাত্রার গ্রাফের একটি বৃদ্ধির হার দেখায়। বেস তাপমাত্রা পর্যন্ত কোনও বৃদ্ধি নেই। বৃদ্ধির হার পরিমিত তাপমাত্রা পর্যন্ত বৃদ্ধি পায়, তারপরে এই শীর্ষে পৌঁছানোর পরে কমতে থাকে। সর্বোচ্চ তাপমাত্রায় বৃদ্ধি বন্ধ হয়।
The shape of this graph varies from plant species to plant species. Some have sharper drop offs above the optimum, some have slower increases from tbe base to the optimum.
এই গ্রাফের আকার গাছের প্রজাতি থেকে উদ্ভিদ প্রজাতির মধ্যে পরিবর্তিত হয়। কোন কোন ক্ষেত্রে অপটিমাম (পরিমিত ) তাপমাত্রার পরে খুব খাড়াভাবে নেমে যায়, আবার কোন কোন উদ্ভিদে বেস তাপমাত্রা থেকে খুবই ধীরে ধীরে বৃদ্ধি পেয়ে পরিমিত তাপমাত্রায় পৌঁছায়।
> 💁 For a farmer to get the best growth, they will need to know the three temperature values and understand the shape of the graphs for the plants they are growing.
> 💁 একজন কৃষকের সর্বোচ্চ ফলন নিশ্চিত করার জন্য, তিনটি তাপমাত্রার মানই জানতে হবে এবং তাদের গাছগুলি বৃদ্ধির গ্রাফের ধরণ বুঝতে হবে।
If a farmer has control of temperature, for example in a commercial hothouse, then they can optimise for their plants. A commercial hothouse growing tomatoes for example will have the temperature set to around 25°C during the day and 20°C at night to get the fastest growth.
যদি কোন কৃষকের তাপমাত্রা নিয়ন্ত্রিত মাধ্যম থাকে, উদাহরণস্বরূপ বাণিজ্যিক হটহাউস, যেখানে তারা তাদের গাছগুলির জন্য অনুকূল তাপমাত্রা নিশ্চিত করতে পারে। যেমন বাণিজ্যিকভাবে এরকম হটহাউসে টমেটোগুলির দ্রুততম বৃদ্ধির জন্য দিনে তাপমাত্রা 25 ডিগ্রি সেন্টিগ্রেড এবং রাতে 20 ডিগ্রি সেলসিয়াস রাখতে হয়।
> 🍅 Combining these temperatures with artificial lights, fertilizers and controlled CO<sub>2</sub> levels means commercial growers can grow and harvest all year round.
> 🍅 কৃত্রিম আলো, সার এর নিয়ন্ত্রণের সাথে তাপমাত্রার মেলবন্ধনের ফলে অর্থ বাণিজ্যিক উৎপাদকরা সারা বছর ধরে তাদের উৎপাদন বজায় রাখতে পারে।
## Measure ambient temperature
## চারিপার্শ্বিক তাপমাত্রা পরিমাপ
Temperature sensors can be used with IoT devices to measure ambient temperature.
আইওটি ডিভাইসের সাথে তাপমাত্রা সেন্সর ব্যবহার করে চারিপার্শ্বের তাপমাত্রা পরিমাপ করা যায়।
### Task - measure temperature
### কাজ - তাপমাত্রা পরিমাপ
Work through the relevant guide to monitor temperatures using your IoT device:
আইওটি ডিভাইসটি ব্যবহার করে তাপমাত্রা পর্যবেক্ষণ করতে, পছন্দ অনুসারে নিচের যেকোন একটি গাইডের মাধ্যমে কাজ শুরু করতে হবে।
* [Arduino - Wio Terminal](wio-terminal-temp.md)
* [Single-board computer - Raspberry Pi](pi-temp.md)
@ -78,98 +82,92 @@ Work through the relevant guide to monitor temperatures using your IoT device:
## Growing degree days
Growing degree days (also know as growing degree units) are a way of measuring the growth of plants based off the temperature. Assuming a plant has enough water, nutrients and CO<sub>2</sub>, the temperature determines the growth rate.
Growing degree days (যাকে growing degree units ও বলা হয়) হলো তাপমাত্রার ভিত্তিতে গাছের বৃদ্ধি পরিমাপ করার একটি উপায়। একটি উদ্ভিদে পর্যাপ্ত পরিমাণে জল, পুষ্টি এবং CO<sub>2</sub> রয়েছে - এমনটা ধরে নিয়েই, তাপমাত্রার ভিত্তিতে বৃদ্ধির হার নির্ধারণ করা হয়।
Growing degree days, or GDD are calculated per day as the average temperature in Celsius for a day above the plants base temperature. Each plant needs a certain number of GDD to grow, flower or produce and mature a crop. The more GDD each day, the faster the plant will grow.
Growing degree days, সংক্ষেপে GDD কে উদিভের বেস তাপমাত্রার উপরে, প্রতিদিনের গড় তাপমাত্রা হিসেবে গণনা করা হয়। প্রতিটি উদ্ভিদে বৃদ্ধি, ফুল হওয়া বা উৎপাদন এবং পরিপক্ক হওয়ার জন্য নির্দিষ্ট সংখ্যক GDD প্রয়োজন। প্রতিদিন যত বেশি জিডিডি হবে, গাছটি তত দ্রুত বাড়বে।
> 🇺🇸 For Americans, growing degree days can also be calculated using Fahrenheit. 5 GDD<sup>C</sup> (growing degree days in Celsius) is the equivalent of 9 GDD<sup>F</sup> (growing degree days in Fahrenheit).
The full formula for GDD is a little complicated, but there is a simplified equation that is often used as a good approximation:
GDD-এর সম্পূর্ণ সূত্রটি কিছুটা জটিল, তবে একটি সরলীকৃত সমীকরণ রয়েছে যা প্রায়শই একটি কাছাকাছি মান হিসাবে ব্যবহৃত হয়:
![GDD = T max + T min divided by 2, all minus T base](../../../images/gdd-calculation.png)
* **GDD** - this is the number of growing degree days
* **T<sub>max</sub>** - this is the daily maximum temperature in degrees Celsius
* **T<sub>min</sub>** - this is the daily minimum temperature in degrees Celsius
* **T<sub>base</sub>** - this is the plants base temperature in degrees Celsius
* **GDD** - growing degree days এর সংখ্যা
* **T<sub>max</sub>** - এটি প্রতিদিনের সর্বোচ্চ তাপমাত্রা (ডিগ্রি সেলসিয়াসে)
* **T<sub>min</sub>** - এটি প্রতিদিনের সর্বনিম্ন তাপমাত্রা (ডিগ্রি সেলসিয়াসে)
* **T<sub>base</sub>** - এটি **উদ্ভিদের** বেইস তাপমাত্রা (ডিগ্রি সেলসিয়াসে)
> 💁 There are variations that deal with T<sub>max</sub> above 30°C or T<sub>min</sub> below T<sub>base</sub>, but we'll ignore these for now.
> 💁 T<sub>max</sub> এর মান ৩০ ডিগ্রি এর বেশি হলে অথবা T<sub>min</sub> এর মান T<sub>base</sub> এর কম হলে এখানে কিছুটা পরিবর্তন আসে। তবে আমরা এখন আপাতত এই পরিবর্তনগুলো অগ্রাহ্য করবো।
### Example - Corn/Maize 🌽
### উদাহরণ - ভুট্টা 🌽
Depending on the variety, corn (or maize) needs between 800 and 2,700 GDD to mature, with a base temperature of 10°C.
বিভিন্ন জাতের উপর নির্ভর করে, ভুট্টা পরিপক্ক হতে 800 এবং 2,700 জিডিডি প্রয়োজন (যখন বেস তাপমাত্রা 10 ডিগ্রি ্সেলসিয়াস)।
On the first day above the base temperature, the following temperatures were measured:
বেস তাপমাত্রার উপরে প্রথম দিন, নিম্নলিখিত তাপমাত্রা পরিমাপ করা হয়েছিল:
| Measurement | Temp °C |
| পরিমাপ | তাপমাত্রা °C |
| :---------- | :-----: |
| Maximum | 16 |
| Minimum | 12 |
Plugging these numbers in to our calculation:
| সর্বোচ্চ | 16 |
| সর্বনিম্ন | 12 |
তাহলে,
* T<sub>max</sub> = 16
* T<sub>min</sub> = 12
* T<sub>base</sub> = 10
This gives a calculation of:
হিসেব করে পাই,
![GDD = 16 + 12 divided by 2, all minus 10, giving an answer of 4](../../../images/gdd-calculation-corn.png)
The corn received 4 GDD on that day. Assuming a corn variety that needs 800 GDD days to mature, it will need another 796 GDD to reach maturity.
ঐদিন ভুট্টা 4 জিডিডি পেয়েছিল। এটিকে 800 GDD চাহিদাসম্পন্ন জাত হিসেবে বিবেচনা করলে, উদ্ভিদটির পরিপক্ব হতে আরো 796 GDD প্রয়োজন।
Do some research. For any plants you have in your garden, school, or local park see if you can find the number of GDD required to reach maturity or produce crops.
ছোট একটি গবেষণা করা যাক । বাগান, স্কুল বা স্থানীয় পার্কে যে কোনও উদ্ভিদের পরিপক্কতায় পৌঁছানোর জন্য বা ফসল উৎপাদনের জন্য প্রয়োজনীয় জিডিডি নম্বর নির্ণয় করা যায় কিনা দেখা যাক।
## Calculate GDD using temperature sensor data
## তাপমাত্রা সেন্সরের তথ্য দিয়ে GDD নির্ণয়
Plants don't grow on fixed dates - for example you can't plant a seed and know that the plant will bear fruit exactly 100 days later. Instead as a farmer you can have a rough idea how long a plant takes to grow, then you would check daily to see when the crops were ready.
গাছপালা নির্দিষ্ট তারিখ ধরে জন্মায় না - উদাহরণস্বরূপ আমরা কোনও বীজ রোপণ করতে রোপন করে এটা বলতে পারবোনা যে গাছটি ঠিক 100 দিন পরে ফলন দিবে। কৃষক হিসাবে আমরা বরং একটি উদ্ভিদ বাড়তে কত সময় নেয় তার ধরে সম্পর্কে মোটামুটি রাখতে পারি এবং সেই ধারণা অনুসারে প্রতিদিন ফসলগুলি প্রস্তুত হচ্ছে কিনা তা পরীক্ষা করে দেখতে পারি।
This has a huge labour impact on a large farm, and risks the farmer missing crops that are ready unexpectedly early. By measuring temperatures, the farmer can calculate the GDD a plant has received, allowing them to only check close to the expected maturity.
By gathering temperature data using an IoT device, a farmer can automatically be notified when plants are close to maturity. A typical architecture for this is to have the IoT devices measure temperature, then publish this telemetry data over the Internet using something like MQTT. Server code then listens to this data and saves it somewhere, such as to a database. This means the data can then be analyzed later, such as a nightly job to calculate the GDD for the day, total up the GDD for each crop so far and alert if a plant is close to maturity.
এভাবে গাছপালার প্রতি সার্বক্ষণিক নজর রাখাটা বড় খামারে অনেক সমস্যাপূর্ণ বিষয় কেননা এতে প্রচুর লোকবল দরকার এবং কোন ফলন অপ্রত্যাশিতভাবে তাড়াতাড়ি প্রস্তুত হয়ে গেলে, ঝুঁকি রয়েছে যে কৃষক হয়তো নজর এড়িয়ে যেতে পারে। তাপমাত্রা পরিমাপ করে, কৃষক একটি উদ্ভিদ এর জিডিডি গণনা করতে পারে এবং তখন কেবলমাত্র তাদের প্রত্যাশিত পরিপক্কতার সময়ের কাছাকাছি হলেই সার্বক্ষণিক নজরদারি করলেই হয়, এতে অতিরিক্ত শ্রম কমে আসে।
আইওটি ডিভাইস ব্যবহার করে তাপমাত্রার ডেটা সংগ্রহ করে, যখন গাছগুলি পরিপক্কতার কাছাকাছি থাকে তখন একজন কৃষককে স্বয়ংক্রিয়ভাবে অবহিত করা যায়। এর জন্য একটি সাধারণ একটি কার্যধারা হল আইওটি ডিভাইসগুলির দ্বারা তাপমাত্রা পরিমাপ করে, তারপরে MQTT-র মতো কিছু ব্যবহার করে এই টেলিমেট্রি ডেটা ইন্টারনেটে প্রকাশ করতে হবে। সার্ভার কোড তখন এই ডেটা গ্রহণ করে এবং এটি কোথাও সংরক্ষণ করে, যেমন কোনও ডাটাবেস এ। এতে করে এই ডেটাগুলি পরে বিশ্লেষণ করা যেতে পারে - যেমনঃ জিডিডি গণনা করা, নির্দিষ্ট পর্যন্ত প্রতিটি ফসলের জন্য মোট জিডিডি এর হিসেব রাখা এবং কোন উদ্ভিদ পরিপক্কতার কাছাকাছি গেলে, কৃষককে এই বিষয়ে সতর্ক করা।
![Telemetry data is sent to a server and then saved to a database](../../../images/save-telemetry-database.png)
***Telemetry data is sent to a server and then saved to a database. database by Icons Bazaar - from the [Noun Project](https://thenounproject.com)***
The server code can also augment the data by adding extra information. For example, the IoT device can publish an identifier to indicate which device it is, and the sever code can use this to look up the location of the device, and what crops it is monitoring. It can also add basic data like the current time as some IoT devices don't have the necessary hardware to keep track of an accurate time, or require additional code to read the current time over the Internet.
সার্ভার কোড অতিরিক্ত তথ্য যুক্ত করে ডেটা সমৃদ্ধ করতে পারে। উদাহরণস্বরূপ, আইওটি ডিভাইসটি নিজেকে চিহ্নিত করতে একটি সনাক্তকারী/আইডেন্টিফায়ার প্রকাশ করতে পারে এবং সার্ভার কোডটি ডিভাইসের অবস্থান এবং এটি কোন স্থানে কী ফসল পর্যবেক্ষণ করছে তা সন্ধান করতে এটি ব্যবহার করতে পারে। এটি চলমান সময়ের মতো বেসিক ডেটাও যুক্ত করতে পারে কারণ কিছু আইওটি ডিভাইসে সঠিক সময়ের উপর নজর রাখতে প্রয়োজনীয় হার্ডওয়্যার থাকেনা বা ইন্টারনেটের মাধ্যমে সময় এর হিসাব রাখতে অতিরিক্ত কোডের প্রয়োজন হয়।
Why do you think different fields might have different temperatures?
✅ বিভিন্ন ফার্মের তাপমাত্রা ভিন্ন ভিন্ন হওয়ার কারণ কী হতে পারে?
### Task - publish temperature information
### কাজ - তাপমাত্রা সংক্রান্ত তথ্য প্রকাশ করা
Work through the relevant guide to publish temperature data over MQTT using your IoT device so it can be analyzed later:
আইওটি ডিভাইস ব্যবহার করে MQTT এর মাধ্যমে তাপমাত্রার ডেটা প্রকাশের জন্য নীচের যেকোন একটি গাইডের মাধ্যমে কাজ শুরু করতে হবে:
* [Arduino - Wio Terminal](wio-terminal-temp-publish.md)
* [Single-board computer - Raspberry Pi/Virtual IoT device](single-board-computer-temp-publish.md)
### Task - capture and store the temperature information
### কাজ - তাপমাত্রা সংক্রান্ত তথ্য গ্রহণ ও সংরক্ষণ
Once the IoT device is publishing telemetry, the server code can be written to subscribe to this data and store it. Rather than save it to a database, the server code will save it to a Comma Separated Values (CSV) file. CSV files store data as rows of values as text, with each value separated by a comma, and each record on a new line. They are a convenient, human-readable and well supported way to save data as a file.
আইওটি ডিভাইসটি টেলিমেট্রি প্রকাশ করার পরে, এমনভাবে কোড লিখতে হবে সার্ভার কোডটি এই ডেটাতে সাবস্ক্রাইব এবং সংরক্ষণ করে। এটি একটি ডেটাবেজে সংরক্ষণের পরিবর্তে, সার্ভার কোড এটি একটি Comma Separated Values (CSV) ফাইলে সংরক্ষণ করবে। CSV ফাইল মানগুলির সারি হিসাবে ডেটা সংরক্ষণ করে; প্রতিটি মান একটি কমা দ্বারা পৃথক করা হয় এবং প্রতিটি রেকর্ড নতুন লাইনে থাকে। ফাইল হিসাবে ডেটা সংরক্ষণ করার জন্য এটি বেশ সুবিধাজনক, যা মানব-পঠনযোগ্য এবং অবশ্যই একটি ভাল উপায়।
The CSV file will have two columns - *date* and *temperature*. The *date* column is set as the current date and time that the message was received by the server, the *temperature* comes from the telemetry message.
এই CSV ফাইলে দুটি কলাম থাকবে - *তারিখ* এবং *তাপমাত্রা* । এখানে *তারিখ* কলামটিতে সার্ভার কর্তৃক ম্যাসেজ পাওয়ার সময় ও তারিখ থাকে এবং *তাপমাত্রা* সংক্রান্ত তথ্য আসে টেলিমেট্রি থেকে।
1. Repeat the steps in lesson 4 to create server code to subscribe to telemetry. You don't need to add code to publish commands.
1. টেলিমেট্রিতে সাবস্ক্রাইব করার জন্য সার্ভার কোড তৈরি করতে লেসন 4 এ এই ধাপগুলি পুনরাবৃত্তি করতে হবে। কমান্ডগুলি প্রকাশ করার জন্য আলাদা কোড যুক্ত করার দরকার নেই।
The steps for this are:
ধাপগুলো হলোঃ
* Configure and activate a Python Virtual Environment
* পাইথন ভার্চুয়াল এনভায়রনমেন্ট কনফিগার এবং একটিভেট করা ।
* Install the paho-mqtt pip package
* এরপর paho-mqtt pip package ইন্সটল করতে হবে।
* Write the code to listen for MQTT messages published on the telemetry topic
* টেলিমেট্রিতে যেসকল MQTT messages প্রকাশিত হয়েছে তা একসেস করতে হলে কোড লিখতে হবে।
> ⚠️ You can refer to [the instructions in lesson 4 for creating a Python app to receive telemetry if needed](../../../1-getting-started/lessons/4-connect-internet/README.md#receive-telemetry-from-the-mqtt-broker).
> ⚠️ এক্ষেত্রে [লেসন 4 এ প্রদেয়, টেলিমেট্রি ডেটা রিসিভ করার জন্য পাইথন কোড ](../../../1-getting-started/lessons/4-connect-internet/README.md#receive-telemetry-from-the-mqtt-broker) আমরা অনুসরণ করতে পারি।
Name the folder for this project `temperature-sensor-server`.
এই প্রজেক্টের জন্য ফোল্ডারের নাম দিই `temperature-sensor-server`.
1. Make sure the `client_name` reflects this project:
1. নিশ্চিত করতে হবে যেন `client_name` এ এই প্রজেক্টের ইঙ্গিত থাকে:
```cpp
client_name = id + 'temperature_sensor_server'
```
1. Add the following imports to the top of the file, below the existing imports:
1. আগে থেকে এসকম ইম্পোর্ট রয়েছে তার নীচে এগুলো যুক্ত করতে হবে:
```python
from os import path
@ -177,9 +175,9 @@ The CSV file will have two columns - *date* and *temperature*. The *date* column
from datetime import datetime
```
This imports a library for reading files, a library to interact with CSV files, and a library to help with dates and times.
এটি ফাইলগুলি পড়ার জন্য একটি লাইব্রেরি ইম্পোর্ট করে । এছাড়াও সিএসভি ফাইলগুলির সাথে যোগাযোগের জন্য একটি লাইব্রেরি এবং তারিখ ও সময়গুলির সংরক্ষণের জন্যে একটি লাইব্রেরি অন্তর্ভুক্ত হয়।
1. Add the following code before the `handle_telemetry` function:
1. তারপর`handle_telemetry` function এর পূর্বে এই কোড যুক্ত করতে হবে:
```python
temperature_file_name = 'temperature.csv'
@ -191,11 +189,11 @@ The CSV file will have two columns - *date* and *temperature*. The *date* column
writer.writeheader()
```
This code declares some constants for the name of the file to write to, and the name of the column headers for the CSV file. The first row of a CSV file traditionally contains column headers separated by commas.
এই কোডে কিছু কনস্ট্যান্ট ডিক্লেয়ার করা হয়েছে - যে CSV ফাইলে ডেটা রাখা হবে সেটির একং কলাম হেডারগুলোর নামকরণ এর জন্য। কোন সিএসভি ফাইলের প্রথম সারিতে সাধারণত কমা দ্বারা আলাদাকৃত ভাবে কলামের শিরোনাম বা হেডার থাকে।
The code then checks to see if the CSV file already exists. If it doesn't exist, it is created with the column headers on the first row.
কোডটি পরীক্ষা করে দেখ সিএসভি ফাইল ইতিমধ্যে বিদ্যমান কিনা । যদি এটি বিদ্যমান না থাকে তবে এটি প্রথম সারিতে কলাম শিরোনাম দিয়ে তৈরি করা হবে।
1. Add the following code to the end of the `handle_telemetry` function:
1. `handle_telemetry` function এর পর নিম্নোক্ত কোড যুক্ত করতে হবে:
```python
with open(temperature_file_name, mode='a') as temperature_file:
@ -203,9 +201,9 @@ The CSV file will have two columns - *date* and *temperature*. The *date* column
temperature_writer.writerow({'date' : datetime.now().astimezone().replace(microsecond=0).isoformat(), 'temperature' : payload['temperature']})
```
This code opens the CSV file, then appends a new row on the end. The row has the current data and time formatted into a human-readable format, followed by the temperature received from the IoT device. The data is stored in [ISO 8601 format](https://wikipedia.org/wiki/ISO_8601) with the timezone, but without microseconds.
এই কোড CSV file টি খুলে এতে নতুন সারি যুক্ত করবে। সেই সারিতে আইওটি ডিভাইস থেকে প্রাপ্ত তাপমাত্রা এবং তখনকার সময় ও তারিখ আমাদের বোধগম্য ফরম্যাটে রাখা হয়। এই তথ্যসমূহ [ISO 8601 ফরম্যাট](https://wikipedia.org/wiki/ISO_8601) অনুসরণ করে, নির্দিষ্ট টাইমজোন সহ, তবে এখানে মাইক্রোসেকেন্ড আকারে সময় সংরক্ষিত হয়।
1. Run this code in the same way as before, making sure your IoT device is sending data. A CSV file called `temperature.csv` will be created in the same folder. If you view it you will see date/times and temperature measurements:
1. আগের মতই এই কোডটি রান করতে হবে - এদিকে এটাও নিশ্চিত করতে হবে যে আইওটি ডিভাইস থেকে ডেটা পাঠানো হচ্ছে। দেখা যাবে `temperature.csv`নামে একটি ফোল্ডার তৈরী হয়েছে একই ফোল্ডারে। এটি খুললে দেখা যাবে, তারিখ-সময় এবং তাপমাত্রা রয়েছে।
```output
date,temperature
@ -214,28 +212,28 @@ The CSV file will have two columns - *date* and *temperature*. The *date* column
2021-04-19T17:41:36-07:00,25
```
1. Run this code for a while to capture data. Ideally you should run this for an entire day to gather enough data for GDD calculations.
1. তথ্য সংগ্রহের জন্য এই কোডটিও রান করি। জিডিডি গণনার জন্য পর্যাপ্ত ডেটা সংগ্রহ করার জন্য আমাদের পুরো দিন ধরে এটি রান করানো উচিত।
> 💁 If you are using Virtual IoT Device, select the random checkbox and set a range to avoid getting the same temperature everytime the temperature value is returned.
> 💁 যদি আমরা Virtual IoT Device ব্যবহার করে থাকি, সেক্ষেত্রে র‍্যান্ডম চেকবাক্সটি নির্বাচন করতে হবে এবং প্রতিবার তাপমাত্রার মান একই আসার বিষয়টি এড়াতে একটি সীমা নির্ধারণ করতে হবে।
![Select the random checkbox and set a range](../../../images/select-the-random-checkbox-and-set-a-range.png)
> 💁 If you want to run this for an entire day, then you need to make sure the computer your server code is running on won't go to sleep, either by changing your power settings, or running something like [this keep system active Python script](https://github.com/jaqsparow/keep-system-active).
> 💁 যদি এটি একটি পুরো দিন চালনা করতে চাই, তবে আমাদেরকে অবশ্যই এটি নিশ্চিত করতে হবে, যে সার্ভারে কোডটি চলছে সেই কম্পিউটারটি সারাদিন কাজ করবে। এক্ষেত্রে হয় আমাদেরকে পাওয়ার সেটিং ঠিক করে নিতে হবে অথবা [সিস্টেমকে একটিভ রাখার পাইথন স্ক্রিপ্ট](https://github.com/jaqsparow/keep-system-active) এর মতো কিছু ব্যবহার করতে হবে।
> 💁 You can find this code in the [code-server/temperature-sensor-server](code-server/temperature-sensor-server) folder.
> 💁 এই কোডগুলো [code-server/temperature-sensor-server](code-server/temperature-sensor-server) ফোল্ডারে পাওয়া যাবে।
### Task - calculate GDD using the stored data
### কাজ - সঞ্চিত ডেটা ব্যবহার করে জিডিডি গণনাকরণ
Once the server has captured temperature data, the GDD for a plant can be calculated.
একবার সার্ভার তাপমাত্রার ডেটা ক্যাপচার করে নিলে, একটি গাছের জন্য জিডিডি গণনা করা যায়।
The steps to do this manually are:
এটি ম্যানুয়ালি করার ধাপগুলি হল:
1. Find the base temperature for the plant. For example, for strawberries the base temperature is 10°C.
1. উদ্ভিদের জন্য আগে বেস তাপমাত্রা নির্ণয়. যেমন, সট্রবেরির জন্য এটি ১০°C.
1. From the `temperature.csv`, find the highest and lowest temperatures for the day
1. এরপর `temperature.csv`থেকে, দিনের সর্বোচ্চ এবং সর্বনিম্ন তাপমাত্রা বের করতে হবে।
1. Use the GDD calculation given earlier to calculate GDD
1. পূর্বে প্রদত্ত সূত্র ব্যবহার করে জিডিডি গণনা করতে হবে।
For example, if the highest temperature for the day is 25°C, and the lowest is 12°C:
উদাহরণস্বরূপ, যদি দিনের সর্বোচ্চ তাপমাত্রা ২৫°C হয় এবং সর্বনিম্ন ১২°C হয়:
![GDD = 25 + 12 divided by 2, then subtract 10 from the result giving 8.5](../../../images/gdd-calculation-strawberries.png)
@ -243,26 +241,25 @@ For example, if the highest temperature for the day is 25°C, and the lowest is
* 37 / 2 = 18.5
* 18.5 - 10 = 8.5
Therefore the strawberries have received **8.5** GDD. Strawberries need about 250 GDD to bear fruit, so still a while to go.
এখানে স্ট্রবেরির জন্য মান এসেছে **8.5** GDD । যেহেতু স্ট্রবেরির ফলনের জন্য ২৫০ জিডিডি প্রয়োজন, তাহলে আরো অনেকদিন হাতে রয়েছে।
---
## 🚀 Challenge
Plants need more than heat to grow. What other things are needed?
## 🚀 চ্যালেঞ্জ
For these, find if there are sensors that can measure them. What about actuators to control these levels? How would you put together one or more IoT devices to optimize plant growth?
উদ্ভিদের বৃদ্ধির জন্য তাপ ছাড়াও আরো কিছু বিষয় প্রয়োজন। আর কি কি জিনিস দরকার এক্ষেত্রে?
এই অতিরিক্ত ফ্যাক্টরগুলোর জন্য কী সেন্সর রয়েছে যা সেগুলি পরিমাপ করতে পারে ? এই স্তরগুলি নিয়ন্ত্রণ করতে একচুয়েটর ব্যবহার করা যায়? উদ্ভিদের বৃদ্ধি অনুকূল করতে কীভাবে এক বা একাধিক আইওটি ডিভাইস যুক্ত করলে ভালো ফল আসবে ?
## Post-lecture quiz
## লেকচার পরবর্তী কুইজ
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/10)
[লেকচার পরবর্তী কুইজ](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/10)
## Review & Self Study
## রিভিউ এবং স্ব-অধ্যয়ন
Read more on digital agriculture on the [Digital Agriculture Wikipedia page](https://wikipedia.org/wiki/Digital_agriculture). Also read more about precision agriculture the [Precision Agriculture Wikipedia page](https://wikipedia.org/wiki/Precision_agriculture).
ডিজিটাল কৃষিব্যবস্থা সম্পর্কে আরো জানতে [Digital Agriculture Wikipedia page](https://wikipedia.org/wiki/Digital_agriculture) পড়া যায়। এছাড়াও [Precision Agriculture](https://wikipedia.org/wiki/Precision_agriculture) এর ব্যাপারেও আরো জানার চেষ্টা করা উচিত।
The full growing degree days calculation is more complicated than the simplified one given here. Read more about the more complicated equation and how to deal with temperatures below the baseline on the [Growing Degree Day Wikipedia page](https://wikipedia.org/wiki/Growing_degree-day).
জিডিডি গণনা এখানে দেওয়া সরলীকৃত সূত্রের চেয়ে কিছুটা জটিল। এই সংক্রান্ত বিষয়ে আরো জানতে এবং বেস তাপমাত্রার নিচে দৈনিক তাপমাত্রা হলে তা কিভাবে ম্যানেজ করা যায় সেই সংক্রান্ত তথ্য [Growing Degree Day Wikipedia page](https://wikipedia.org/wiki/Growing_degree-day) এ পাওয়া যাবে।
## Assignment
## এসাইনমেন্ট
[Visualize GDD data using a Jupyter Notebook](assignment.md)
[জুপিটার নোটবুক ব্যবহার করে জিডিডি ডেটা প্রদর্শন করা](assignment.md)

Loading…
Cancel
Save