Merge branch 'microsoft:main' into main

pull/382/head
Jim Bennett 4 years ago committed by GitHub
commit efcc1244f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,7 +31,14 @@ If you want to work directly on your Pi, you can use the desktop version of Rasp
Set up your Pi for development.
1. Follow the instructions in the [Raspberry Pi setup guide](https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up) to set up your Pi, connect it to a keyboard/mouse/monitor, connect it to your WiFi or ethernet network, and update the software. The OS you want to install is **Raspberry Pi OS (32 bit)**, it is marked as the recommended OS when using the Raspberry Pi Imager to image your SD card.
1. Follow the instructions in the [Raspberry Pi setup guide](https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up) to set up your Pi, connect it to a keyboard/mouse/monitor, connect it to your WiFi or ethernet network, and update the software.
> IMPORTANT
>
> Currently the latest Raspberry Pi OS no longer suports accessing the camera via PiCamera or any other Python library. You can read about this change in this [Raspberry Pi blog post](https://www.raspberrypi.com/news/bullseye-camera-system/).
> You will need to install an older OS by downloading the Buster image from the here:
>
> [https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-05-28/](https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-05-28/)
To program the Pi using the Grove sensors and actuators, you will need to install an editor to allow you to write the device code, and various libraries and tools that interact with the Grove hardware.

@ -0,0 +1,230 @@
# IoT에 대한 소개
![이 강의의 개요](../../../../sketchnotes/lesson-1.jpg)
> [Nitya Narasimhan](https://github.com/nitya) 의 스케치노트. 더 큰 이미지를 보고싶으면 클릭하세요.
이 수업은 [Microsoft Reactor](https://developer.microsoft.com/reactor/?WT.mc_id=academic-17441-jabenn)의 [Hello IoT series](https://youtube.com/playlist?list=PLmsFUfdnGr3xRts0TIwyaHyQuHaNQcb6-) 일부로 진행되었습니다. 수업은 2개의 비디오로 진행되었는데, 1시간짜리 수업과 강의에 대한 집중탐구 및 질의 응답 1시간으로 구성되어있습니다.
[![Lesson 1: Introduction to IoT](https://img.youtube.com/vi/bVFfcYh6UBw/0.jpg)](https://youtu.be/bVFfcYh6UBw)
[![Lesson 1: Introduction to IoT - Office hours](https://img.youtube.com/vi/YI772q5v3yI/0.jpg)](https://youtu.be/YI772q5v3yI)
> 🎥 비디오를 시청하고 싶으면 이미지를 클릭하세요
## 강의 전 퀴즈
[강의 전 퀴즈](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/1)
## 개요
이 강의에서는 사물 인터넷과 관련된 몇 가지 소개용 항목에 대해 설명하고 하드웨어를 설정하는 방법에 대해 설명합니다.
이 단원에서는 다음을 다룹니다:
* ['사물 인터넷'이란?](#what-is-the-internet-of-things)
* [IoT 장치](#iot-devices)
* [디바이스 설정](#set-up-your-device)
* [IoT의 응용 프로그램](#applications-of-iot)
* [내 주변에서 IoT의 예시](#examples-of-iot-devices-you-may-have-around-you)
## '사물 인터넷'이란 무엇인가?
'사물 인터넷'이라는 용어는 1999년, [Kevin Ashton](https://wikipedia.org/wiki/Kevin_Ashton)이 센서를 통해 인터넷을 물리적 세계에 연결하는 것을 지칭하기 위해 만들었다. 그 이후로 이 용어는 센서로부터 데이터를 수집하거나 액츄에이터(스위치를 켜거나 LED를 켜거나 켜는 것과 같은 일을 하는 장치)를 통해 실제 상호작용을 제공함으로써 주변 물리 세계와 상호 작용하는 모든 장치를 기술하기 위해 사용되어 왔으며 일반적으로 다른 장치나 인터넷에 연결되어 있다.
> **센서** 는 속도, 온도 또는 위치 와 같은 정보를 세상에서 수집합니다.
>
> **액츄에이터** 는 전기 신호를 스위치 트리거, 조명 켜기, 소리 내기 또는 전원 소켓 켜기와 같은 실제 상호 작용으로 변환합니다.
IoT는 단순한 기기가 아니라 센서 데이터를 처리하거나 IoT 기기에 연결된 액츄에이터에 요청을 보낼 수 있는 클라우드 기반 서비스를 포함합니다. 또한 edge장치라고 종종 언급되는, 인터넷 연결이 없거나 필요하지 않은 장치도 포함됩니다. 이들은 센서 데이터를 자체적으로 처리하고 대응할 수 있는 장치들로, 대개 클라우드에서 훈련된 AI 모델을 사용합니다.
IoT는 빠르게 성장하는 기술 분야입니다. 2020년 말까지, IoT 기기가 300억대 보급돼 인터넷에 연결된 것으로 추산됩니다. 미래를 내다보면 2025년에는, IoT 기기가 거의 80제타바이트 또는 80조 기가바이트의 데이터를 수집할 것으로 예상됩니다. 정말 많은 데이터양이죠!
![2015년에 50억 미만에서 2025년에 300억 이상으로 증가하는 추세로 시간에 따른 활성 IoT 기기를 보여주는 그래프](../../../../images/connected-iot-devices.svg)
✅ 약간의 조사를 해보세요: IoT 기기에서 생성된 데이터의 얼마가 실제로 사용되고 있고, 얼마나 많은 데이터가 낭비되고 있나요? 왜 이렇게 많은 데이터가 무시되는 것일까요?
IoT 성공의 비결은 바로 이 데이터입니다. 성공적인 IoT 개발자가 되려면 수집해야 할 데이터, 수집 방법, 이를 어떻게 결정을 할지 및 필요한 경우 이러한 결정들을 물리 세계와 연동하기 위해 어떻게 이용해야하는지 이해해야 합니다.
## IoT 장치
IoT에서 **T****Things** 을 의미합니다. - 센서로부터 데이터를 수집하거나 액추에이터를 통해 실세계의 상호작용을 제공하며 주변 물리적 세계와 상호 작용하는 장치입니다.
소비자 피트니스 추적기 또는 산업용 기계 제어기와 같은 생산 또는 상업적 사용을 위한 장치는 일반적으로 맞춤 제작됩니다. 이들은 맞춤형 회로 기판, 심지어 맞춤형 프로세서를 사용하기도 하는데, 이 기판은 손목에 찰 정도로 작거나 고온, 고강도 또는 고진동 공장 환경에서 작동하기에 충분히 견고하거나, 손목에 잘 맞도록 설계되어 있습니다.
개발자는 IoT에 대해 배우거나 기기 프로토타입을 만들 때 개발자 키트로 시작해야 합니다. 그것은 개발자가 사용할 수 있도록 설계된 범용 IoT 장치이며, 센서나 액추에이터를 연결할 수 있는 외부 핀 세트, 디버깅을 지원하는 하드웨어 또는 대규모 제조 실행 시 불필요한 비용을 추가하는 추가 리소스와 같은 운영 장치에는 없는 기능을 갖추고 있습니다.
이러한 개발자 키트는 일반적으로 마이크로컨트롤러와 싱글보드 컴퓨터의 두 가지 범주로 나뉩니다. 이것들은 여기서 소개될 것이고, 다음 수업에서 더 자세히 다루도록 하겠습니다.
> 💁 당신의 핸드폰 또한 센서와 액추에이터가 내장된 범용 IoT 기기로도 볼 수 있으며, 앱마다 센서와 액추에이터를 사용하는 방식이 다르고 클라우드 서비스도 다릅니다. 당신은 또한 휴대폰 앱을 IoT 기기로 사용하는 IoT 튜토리얼도 찾아볼 수 있습니다.
### 마이크로컨트롤러
마이크로컨트롤러(줄여서 MCU라고도 함)는 다음과 같이 구성된 소형 컴퓨터입니다.:
🧠 하나 이상의 CPU(중앙 처리 장치) - 당시의 프로그램을 실행하는 마이크로컨트롤러의 '두뇌'
💾 메모리(RAM 및 프로그램 메모리) - 당신의 프로그램, 데이터 및 변수가 저장되는 위치
🔌 프로그래밍 가능한 입출력(I/O) 연결 - 센서 및 액추에이터와 같은 외부 주변 장치(연결 장치)와 통신
마이크로컨트롤러는 일반적으로 저렴한 컴퓨팅 장치이며, 사용자 지정 하드웨어에 사용되는 장치의 평균 가격은 약 0.50달러까지 떨어지며, 어떤 장치는 0.03달러만큼 저렴합니다. 개발자 키트는 미화 4달러부터 시작할 수 있으며, 기능을 추가할수록 비용도 증가합니다. [Wio Terminal](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) 센서, 액츄에이터, WiFi, 스크린을 갖춘 [Seeed studios](https://www.seeedstudio.com) 의 마이크로컨트롤러 개발자 키트로 미화 약 30달러의 가격으로 형성되어 있습니다.
![A Wio Terminal](../../../../images/wio-terminal.png)
> 💁 인터넷에서 마이크로컨트롤러를 검색할 때 **MCU**라는 용어를 검색하면 마이크로컨트롤러가 아닌 Marvel Cinematic Universe에 대한 많은 결과를 얻을 수 있으므로 주의해야 합니다.
마이크로컨트롤러는 PC나 맥과 같은 범용 컴퓨터가 아니라 제한된 수의 매우 특정한 작업을 수행하도록 프로그래밍되어 있습니다. 매우 구체적인 시나리오를 제외하고는 모니터, 키보드 및 마우스를 연결하여 범용 작업에 사용할 수 없습니다.
마이크로컨트롤러 개발자 키트는 보통 추가적인 센서와 작동기가 탑재되어 있습니다. 대부분의 보드에는 프로그래밍할 수 있는 하나 이상의 LED와 다양한 제조업체의 에코시스템을 사용하여 더 많은 센서 또는 액추에이터를 추가하는 표준 플러그와 같은 다른 장치 또는 내장 센서(일반적으로 온도 센서 등 가장 인기 있는 센서)가 있습니다. 일부 마이크로컨트롤러는 Bluetooth 또는 WiFi와 같은 무선 연결이 내장되어 있거나 이 연결을 추가하기 위해 보드에 추가 마이크로컨트롤러가 있습니다.
> 💁 마이크로컨트롤러는 보통 C/C++로 프로그래밍 됩니다.
### 싱글보드 컴퓨터
단일 보드 컴퓨터(single-board computer)는 하나의 작은 보드에 포함된 완전한 컴퓨터의 모든 요소를 포함하는 소형 컴퓨팅 장치입니다. 데스크탑 또는 노트북 PC 또는 Mac에 가까운 사양을 갖추고 있으며 전체 운영 체제를 실행하지만 크기가 작고 전력 사용량이 적으며 가격이 상당히 저렴한 장치입니다.
![A Raspberry Pi 4](../../../../images/raspberry-pi-4.jpg)
라즈베리 파이는 가장 인기 있는 싱글보드 컴퓨터 중 하나입니다.
마이크로컨트롤러와 마찬가지로 싱글보드 컴퓨터에는 CPU, 메모리, 입출력 핀이 있지만 모니터, 오디오 출력, USB 포트를 연결하여 키보드 마우스와 웹캠이나 외장 스토리지와 같은 표준 USB 장치를 연결할 수 있는 그래픽 칩과 같은 추가 기능이 있습니다. 프로그램은 메모리 칩 대신 운영 체제와 함께 SD 카드나 하드 드라이브에 저장됩니다.
> 🎓 싱글보드 컴퓨터는 센서 및 액추에이터와 상호 작용할 GPIO(일반용 입력/출력) 핀을 추가하여 읽고 있는 PC 또는 Mac의 더 작고 저렴한 버전이라고 생각할 수 있습니다.
싱글보드 컴퓨터는 모든 기능을 갖춘 컴퓨터이므로 모든 언어로 프로그래밍할 수 있습니다. IoT 장치는 일반적으로 파이썬으로 프로그래밍됩니다.
### 남은 수업 동안의 하드웨어 선택
이후의 모든 과정에는 IoT 디바이스를 사용하여 물리적 세계와 상호 작용하고 클라우드와 통신하는 과제가 포함됩니다. 각 레슨은 Arduino(Seeed Studios Wio Terminal 사용) 또는 단일 보드 컴퓨터, 물리적 장치(Lasberry Pi 4), PC 또는 Mac에서 실행되는 가상 단일 보드 컴퓨터 등 3가지 장치를 지원합니다.
모든 과제를 완료하는 데 필요한 하드웨어에 대한 자세한 내용은 [하드웨어 가이드](../../../hardware.md)에서 확인할 수 있습니다.
> 💁 과제를 완료하기 위해 IoT 하드웨어를 구입할 필요가 없으며 가상 싱글보드 컴퓨터로 모든 작업을 수행할 수 있습니다.
어떤 하드웨어를 선택할지는 여러분의 학교와 가정에서 사용할 수 있는 것과 여러분이 알고 있거나 배울 계획인 프로그래밍 언어에 달려 있습니다. 두 하드웨어 변형 모두 동일한 센서 생태계를 사용하기 때문에 한 경로에서 시작하면 대부분의 키트를 교체할 필요 없이 다른 경로로 변경할 수 있습니다. 가상 싱글보드 컴퓨터는 라즈베리 파이에서 학습하는 것과 같으며, 결국 장치와 센서를 얻게 되면 대부분의 코드를 파이로 전송할 수 있습니다.
### 아두이노 개발자 키트
마이크로컨트롤러 개발에 관심이 있다면 아두이노 기기를 이용해 과제를 완료할 수 있습니다. 이 수업은 아두이노 프레임워크, 사용 중인 센서와 액추에이터, 클라우드와 상호 작용하는 라이브러리와 관련된 코드만 가르치기 때문에 C/C++ 프로그래밍에 대한 기본적인 이해가 필요합니다.
과제는 [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=academic-17441-jabenn) 와 [PlatformIO extension for microcontroller development](https://platformio.org)를 이용할 것입니다. 또한 이 도구에 익숙한 경우, 지침이 제공되지 않는 Arduino IDE를 사용할 수도 있습니다.
### Single-board 컴퓨터 개발자 키트
싱글보드 컴퓨터를 사용하여 IoT 개발을 배우는 데 관심이 있다면 PC 또는 Mac에서 실행 중인 가상 장치인 라즈베리 파이를 사용하여 과제를 완료할 수 있습니다.
사용 중인 센서와 액추에이터, 클라우드와 상호 작용하는 라이브러리와 관련된 코드만 학습하므로 파이썬 프로그래밍에 대한 기본적인 이해가 필요합니다.
> 💁 만약 당신이 Python으로 코드를 알기 원한다면 : 다음의 두개의 비디오 시리즈를 확인해보세요 :
>
> * [입문자를 위한 파이썬](https://channel9.msdn.com/Series/Intro-to-Python-Development?WT.mc_id=academic-17441-jabenn)
> * [입문자를 위한 더 많은 파이썬](https://channel9.msdn.com/Series/More-Python-for-Beginners?WT.mc_id=academic-7372-jabenn)
과제에서는 [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=academic-17441-jabenn)을 이용할 것입니다..
Rasberry Pi를 사용하는 경우 Rasberry Pi OS의 전체 데스크톱 버전을 사용하여 Pi를 실행하고 [Rasberry Pi OS 버전의 VS Code](https://code.visualstudio.com/docs/setup/raspberry-pi?WT.mc_id=academic-17441-jabenn)를 사용하여 Pi에서 직접 모든 코딩을 수행하거나 [원격 SSH 확장](https://code.visualstudio.com/docs/remote/ssh?WT.mc_id=academic-17441-jabenn)을 사용하여 PC 또는 Mac의 헤드리스 장치 및 코드로 Pi를 실행할 수 있습니다. 직접 코드를 코딩하는 것처럼 코드를 편집, 디버그 및 실행합니다.
가상 디바이스 옵션을 사용하는 경우 컴퓨터에서 직접 코딩합니다. 센서와 액추에이터에 액세스하는 대신 도구를 사용하여 정의할 수 있는 센서 값을 제공하고 액추에이터의 결과를 화면에 표시합니다.
## 장치 설정
IoT 장치 프로그래밍을 시작하려면 먼저 소량의 설정을 수행해야 합니다. 사용할 기기에 따라 아래의 관련 지침을 따라보세요.
> 💁 아직 장치가 없는 경우 [하드웨어 가이드](../../../../hardware.md)를 참조하여 사용할 장치와 구입해야 할 추가 하드웨어를 결정해보세요. 모든 프로젝트를 가상 하드웨어에서 실행할 수 있으므로 하드웨어를 구입할 필요는 없습니다.
이러한 지침에는 사용할 하드웨어 또는 도구를 만든 사람이 제공하는 타사 웹 사이트에 대한 링크가 포함됩니다. 이렇게 하면 다양한 도구 및 하드웨어에 대한 최신 지침을 항상 사용할 수 있습니다.
관련 안내에 따라 장치를 설정하고 'Hello World' 프로젝트를 완료해보세요. 이것은 이 시작 부분의 4가지 레슨에 대한 IoT 야간조명을 만드는 첫 번째 단계가 될 것입니다.
* [Arduino - Wio Terminal](wio-terminal.md)
* [Single-board computer - Raspberry Pi](pi.md)
* [Single-board computer - Virtual device](virtual-device.md)
✅ 당신은 아두이노와 싱글보드 컴퓨터 모두에 VS code를 사용하게 될 것입니다. 사용해본적이 없다면 [VS Code site](https://code.visualstudio.com?WT.mc_id=academic-17441-jabenn)를 자세히 읽어보세요.
## IoT의 응용
IoT는 몇 가지 광범위한 그룹에 걸쳐 광범위한 사용 사례를 다루고 있습니다 :
* 소비자 IoT
* 상용 IoT
* 산업 IoT
* 사회 기반 시설 IoT
✅ 약간의 조사를 해보세요: 아래에 설명된 각 영역에 대해, 본문에 나와 있지 않은 구체적인 예를 하나 찾아보세요.
### 소비자 IoT
컨슈머 IoT는 소비자가 가정 주변에서 구매해 사용할 IoT 기기를 말합니다. 스마트 스피커, 스마트 난방 시스템, 로봇 청소기와 같은 이 장치들 중 일부는 엄청나게 유용합니다. 음성 제어 수도꼭지와 같이 유용성이 의심되는 경우도 있는데, 이는 음성 제어가 흐르는 물 소리 때문에 당신의 목소리를 들을 수 없기 때문에 끌 수 없음을 의미합니다.
소비자 IoT 기기들은 특히 장애를 가진 10억 명의 사람들에게 그들의 환경에서 더 많은 것을 성취할 수 있는 힘을 주고 있습니다. 로봇청소기는 스스로 진공청소기를 사용할 수 없는 거동이 불편한 사람들에게 깨끗한 바닥을 제공할 수 있고, 음성제어 오븐은 시력이 제한적이거나 운동기능이 있는 사람들이 목소리만으로 오븐을 데울 수 있게 하며, 건강 모니터는 환자들이 만성 상태를 그들의 상태에 대한 업데이트로 보다 규칙적이고 더 자세하게 스스로 모니터링할 수 있게 합니다. 예를 들어 COVID 대유행 기간 동안 가상 교육을 하는 학생들이 스마트 홈 장치에 타이머를 설정하여 학교 공부를 추적하거나 다가오는 학급 회의를 상기시키는 등 이러한 장치는 매우 보편화되고 있습니다.
✅ 개인 또는 가정에 어떤 소비자 IoT 기기를 가지고 있나요?
### 상용 IoT
상용 IoT는 직장에서 IoT를 사용하는 것을 포함합니다. 사무실 환경에서는 조명과 난방을 관리하기 위한 거주 감지기와 동작 감지기가 있어 필요하지 않을 때만 조명을 유지하고 열을 차단하여 비용과 탄소 배출량을 줄일 수 있습니다. 공장에서 사물인터넷(IoT) 기기는 작업자가 안전모를 쓰지 않거나 위험 수위에 도달한 소음 등 안전상의 위험을 감시할 수 있습니다. 소매업체에서는 사물인터넷(IoT) 기기가 냉장·냉동고가 필요 온도 범위를 벗어나면 점주에게 알려 냉장·냉동고 보관 온도를 측정하거나, 선반에 있는 품목을 모니터링해 직원들에게 판매된 농산물을 리필하도록 지시할 수 있습니다. 운송업계는 차량 위치 모니터링, 도로 사용자 충전을 위한 온로드 마일리지 추적, 운전자 시간 및 고장 준수 여부 추적, 적재 또는 하역 준비를 위해 차량 입고지 접근 시 직원에게 알리는 등의 IoT 의존도가 높아지고 있습니다.
✅ 당신의 학교나 직장에 어떤 상용 IoT 기기를 가지고 있나요?
### 산업 IoT (IIoT)
산업용 IoT 또는 IIoT는 대규모로 기계를 제어하고 관리하기 위해 IoT 장치를 사용하는 것입니다. 여기에는 공장에서 디지털 농업에 이르기까지 광범위한 사용 사례가 포함됩니다.
공장들은 IoT 기기를 다양한 방식으로 사용합니다. 기계는 온도, 진동, 회전 속도와 같은 것들을 추적하기 위해 여러 센서로 모니터링될 수 있습니다. 그런 다음 이 데이터를 모니터링하여 특정 공차를 벗어날 경우 기계가 중지되도록 할 수 있습니다. 예를 들어, 너무 뜨거울 경우 기계가 종료됩니다. 이 데이터는 시간이 지남에 따라 수집 및 분석하여 예측 정비를 수행할 수 있으며, 여기서 AI 모델은 장애로 이어지는 데이터를 살펴보고 다른 장애가 발생하기 전에 예측에 사용할 수 있습니다.
지구의 증가하는 인구, 특히 [지속 농업](https://wikipedia.org/wiki/Subsistence_agriculture)으로 생존하는 5억 가구 20억 인구의 경우 디지털 농업이 중요합니다. 디지털 농업은 몇 개의 한 자릿수 달러 센서에서 대규모 상업 설정에 이르기까지 다양합니다. 농부는 온도를 모니터링하고 [일별 성장 비율](https://wikipedia.org/wiki/Growing_degree-day) 을 사용하여 농작물이 언제 수확할 수 있는지 예측할 수 있습니다. 그들은 토양 수분 모니터링과 자동 식수 시스템을 연결하여 식물들에게 필요한 만큼의 물을 줄 수 있지만, 물을 낭비하지 않고 농작물이 마르지 않도록 더 이상 보장할 수는 없습니다. 농부들은 심지어 그것을 더 나아가서 드론, 위성 데이터, AI를 이용하여 거대한 농경지의 농작물 성장, 질병, 토양의 질 등을 감시하고 있습니다.
✅ 농부들에게 도움이 될 수 있는 다른 사물인터넷 기기들은 무엇일까요?
### 사회 기반 시설(인프라) IoT
인프라 IoT는 사람들이 일상적으로 사용하는 지역적 인프라와 세계적 인프라를 감시하고 제어하는 것입니다.
[Smart Cities](https://wikipedia.org/wiki/Smart_city) 는 IoT 기기를 사용하여 도시에 대한 데이터를 수집하고 도시 운영 방식을 개선하는 도시 지역입니다. 이 도시들은 보통 지방 정부, 학계, 지역 기업들 간의 협업으로 운영되며, 교통에서부터 주차, 오염에 이르기까지 다양한 것들을 추적하고 관리합니다. 예를 들어 덴마크 코펜하겐은 대기오염이 지역 주민들에게 중요하기 때문에 이를 측정해 데이터를 활용해 가장 깨끗한 자전거와 조깅 경로에 대한 정보를 제공합니다.
[스마트 전력망](https://wikipedia.org/wiki/Smart_grid) 은 개별 가정 수준에서 사용 데이터를 수집하여 전력 수요를 더 잘 분석할 수 있도록 합니다. 이 데이터는 발전소를 새로 지을 장소를 포함한 국가 차원에서의 의사 결정을 안내할 수 있으며, 사용자가 얼마나 많은 전력을 사용하고 있는지, 언제 사용하는지에 대한 통찰력과 심지어 야간 전기차 충전과 같은 비용 절감 방법에 대한 제안까지 사용자에게 제공하여 개인 차원에서의 의사 결정을 안내할 수 있습니다.
✅ 만약 당신이 살고 있는 곳의 사물인터넷 장치를 추가하여 무엇이든 측정할 수 있다면, 무엇을 하고 싶나요?
## 주변에 있을 수 있는 IoT 장치의 예
주변에 IoT 기기가 얼마나 많은지 알면 놀라실거에요. 집에서 작성 중이며 앱 컨트롤, 음성 컨트롤 또는 전화기를 통해 데이터를 전송하는 기능과 같은 스마트 기능을 갖춘 다음과 같은 장치들이 인터넷에 연결되어 있습니다.
* 다중 스마트 스피커
* 냉장고, 식기세척기, 오븐 및 전자레인지
* 태양 전지판용 전기 모니터
* 스마트 플러그
* 비디오 초인종 및 보안 카메라
* 여러 개의 스마트 룸 센서가 장착된 스마트 온도 조절기
* 차고 문 개폐기
* 가정용 엔터테인먼트 시스템 및 음성 제어 TV
* 조명
* 피트니스 및 건강 추적기
이러한 모든 유형의 장치에는 센서 및/또는 작동기가 있으며 인터넷과 통신합니다. 우리는 휴대폰으로 차고 문이 열려 있는지 알 수 있고, 스마트 스피커에게 문을 닫아달라고 부탁할 수 있습니다. 타이머도 설정할 수 있어서 밤에 열려 있으면 자동으로 닫힙니다. 초인종이 울리면 세계 어디에 있든 휴대폰으로 누가 있는지, 초인종 안에 내장된 스피커와 마이크를 통해 대화할 수 있습니다. 나는 내 혈당, 심박수, 수면 패턴을 모니터링 할 수 있고 내 건강을 증진시키기 위해 데이터에서 패턴을 찾을 수 있습니다. 우리는 클라우드를 통해 조명을 제어할 수 있고, 인터넷 연결이 끊어졌을 때 어둠 속에 앉아 있을 수 있습니다.
---
## 🚀 도전
집, 학교 또는 직장에 있는 IoT 기기를 가능한 한 많이 나열해보세요 - 생각보다 많을 에요!
## 강의 후 퀴즈
[강의 후 퀴즈](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/2)
## 복습 & 자기주도 학습
소비자 IoT 프로젝트의 이점과 실패에 대해 읽어보세요. 뉴스 사이트에서 개인 정보 보호 문제, 하드웨어 문제 또는 연결 부족으로 인한 문제와 같은 잘못된 기사를 확인해보세요.
예시 :
* 트위터 계정 **[Internet of Sh*t](https://twitter.com/internetofshit)** *(profanity warning)* 에서 소비자 IoT의 실폐사례로 좋은 몇가지 예시들을 확인해보세요.
* [c|net - My Apple Watch saved my life: 5 people share their stories](https://www.cnet.com/news/apple-watch-lifesaving-health-features-read-5-peoples-stories/)
* [c|net - ADT technician pleads guilty to spying on customer camera feeds for years](https://www.cnet.com/news/adt-home-security-technician-pleads-guilty-to-spying-on-customer-camera-feeds-for-years/) *(trigger warning - non-consensual voyeurism)*
## 과제
[IoT 프로젝트 조사](assignment.md)

@ -0,0 +1,266 @@
# IoT में गहराई से अध्ययन करें
![इस पाठ का एक संक्षिप्त विवरण](https://github.com/microsoft/IoT-For-Beginners/blob/main/sketchnotes/lesson-2.jpg?raw=true)
> स्केचनोट [नित्य नरसिम्हन](https://github.com/nitya) द्वारा बनाया गया है। एक बड़े संस्करण के लिए छवि पर क्लिक करें।
यह पाठ [Hello IoT series](https://youtube.com/playlist?list=PLmsFUfdnGr3xRts0TIwyaHyQuHaNQcb6-) के हिस्से के रूप में [Microsoft Reactor](https://developer.microsoft.com/reactor/?WT.mc_id=अकादमिक-17441-jabenn) से पढ़ाया गया था। पाठ को 2 वीडियो में पढ़ाया गया था - 1 घंटे का पाठ, और 1 घंटे का कार्यालय समय जिसमे पाठ के कुछ हिस्सों में गहराई से अध्ययन करते हैं और सवालों के जवाब देते हैं।
[![पाठ 2: IoT में एक गहरी डुबकी](https://img.youtube.com/vi/t0SySWw3z9M/0.jpg)](https://youtu.be/t0SySWw3z9M)
[![पाठ 2: IoT - कार्यालय समय में एक गहरी गोता](https://img.youtube.com/vi/tTZYf9EST1E/0.jpg)](https://youtu.be/tTZYf9EST1E)
> वीडियो देखने के लिए ऊपर की छवियों पर क्लिक करें
## पूर्व व्याख्यान प्रश्नोत्तरी
[व्याख्यान पूर्व प्रश्नोत्तरी](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/3)
## परिचय
यह पाठ पिछले पाठ में शामिल कुछ अवधारणाओं में गहराई से अध्ययन करता है।
इस पाठ में हम कवर करेंगे:
* [एक IoT एप्लिकेशन के अंश](#एक-IoT-एप्लिकेशन-के-अंश)
* [माइक्रोकंट्रोलर्स में गहराई से अध्ययन करें](#माइक्रोकंट्रोलर-में-गहराई-से-अध्ययन-करें)
* [सिंगल-बोर्ड कंप्यूटरों में गहराई से अध्ययन करें](#सिंगल-बोर्ड-कंप्यूटर-में-गहराई-से-अध्ययन-करें)
## एक IoT एप्लिकेशन के अंश
IoT एप्लिकेशन के दो घटक हैं *इंटरनेट* और *थिंग*। आइए इन दो अंशों को थोड़ा और विस्तार से देखें।
### थिंग
![एक रास्पबेरी पाई 4](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/raspberry-pi-4.jpg)
IoT का **थिंग** भाग एक ऐसे उपकरण को संदर्भित करता है जो भौतिक दुनिया के साथ इंटरैक्ट कर सकता है। ये उपकरण आमतौर पर छोटे, कम कीमत वाले कंप्यूटर होते हैं, जो कम गति पर चलते हैं और कम शक्ति का उपयोग करते हैं - उदाहरण के लिए, किलोबाइट रैम के साथ साधारण माइक्रोकंट्रोलर (पीसी में गीगाबाइट के विपरीत) केवल कुछ सौ मेगाहर्ट्ज़ पर चल रहे हैं (पीसी में गीगाहर्ट्ज़ के विपरीत), लेकिन कभी-कभी इतनी कम बिजली की खपत करते हुए कि वे बैटरी पर हफ्तों, महीनों या वर्षों तक चल सकते हैं।
ये उपकरण भौतिक दुनिया के साथ बातचीत करते हैं, या तो सेंसर का उपयोग करके अपने आसपास से डेटा इकट्ठा करते हैं या भौतिक परिवर्तन करने के लिए आउटपुट या एक्चुएटर्स को नियंत्रित करते हैं। इसका विशिष्ट उदाहरण एक स्मार्ट थर्मोस्टेट है - एक उपकरण जिसमें एक तापमान सेंसर होता है, एक वांछित तापमान जैसे डायल या टचस्क्रीन सेट करने का साधन, और एक हीटिंग या कूलिंग सिस्टम से एक कनेक्शन जिसे तापमान का पता चलने पर चालू किया जा सकता है वांछित सीमा से बाहर है। तापमान संवेदक यह पता लगाता है कि कमरा बहुत ठंडा है और एक एक्चुएटर हीटिंग को चालू कर देता है।
![एक IoT डिवाइस के इनपुट के रूप में तापमान और एक डायल, और आउटपुट के रूप में हीटर का नियंत्रण दिखाने वाला एक आरेख](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/basic-thermostat.png)
विभिन्न चीजों की एक विशाल श्रृंखला है जो IoT उपकरणों के रूप में कार्य कर सकती है, समर्पित हार्डवेयर से जो एक चीज को समझती है, सामान्य प्रयोजन के उपकरणों तक, यहां तक ​​कि आपका स्मार्टफोन भी! एक स्मार्टफोन अपने आसपास की दुनिया का पता लगाने के लिए सेंसर का उपयोग कर सकता है, और दुनिया के साथ बातचीत करने के लिए एक्ट्यूएटर्स का उपयोग कर सकता है - उदाहरण के लिए आपके स्थान का पता लगाने के लिए एक जीपीएस सेंसर का उपयोग करना और एक स्पीकर का उपयोग करके आपको गंतव्य पर नेविगेशन निर्देश देना।
✅अपने आस-पास मौजूद अन्य प्रणालियों के बारे में सोचें जो सेंसर से डेटा पढ़ती हैं और निर्णय लेने के लिए इसका उपयोग करती हैं। एक उदाहरण ओवन पर थर्मोस्टैट होगा। क्या आप और खोज सकते हैं?
### इंटरनेट
IoT एप्लिकेशन के **इंटरनेट** पक्ष में ऐसे एप्लिकेशन होते हैं जिन्हें IoT डिवाइस डेटा भेजने और प्राप्त करने के लिए कनेक्ट कर सकता है, साथ ही अन्य एप्लिकेशन जो IoT डिवाइस से डेटा को प्रोसेस कर सकते हैं और IoT डिवाइस एक्ट्यूएटर्स को कौन से अनुरोध भेजने के लिए निर्णय लेने में मदद करते हैं।
एक विशिष्ट सेटअप में किसी प्रकार की क्लाउड सेवा होगी जिससे IoT डिवाइस कनेक्ट होता है, और यह क्लाउड सेवा सुरक्षा जैसी चीज़ों को संभालती है, साथ ही IoT डिवाइस से संदेश प्राप्त करती है, और डिवाइस पर संदेश वापस भेजती है। यह क्लाउड सेवा तब अन्य अनुप्रयोगों से कनेक्ट होगी जो सेंसर डेटा को संसाधित या संग्रहीत कर सकते हैं, या निर्णय लेने के लिए अन्य सिस्टम के डेटा के साथ सेंसर डेटा का उपयोग कर सकते हैं।
डिवाइस हमेशा वाई-फ़ाई या वायर्ड कनेक्शन के माध्यम से सीधे इंटरनेट से कनेक्ट नहीं होते हैं। कुछ डिवाइस ब्लूटूथ जैसी तकनीकों पर एक-दूसरे से बात करने के लिए जाल नेटवर्किंग का उपयोग करते हैं, एक हब डिवाइस के माध्यम से जुड़ते हैं जिसमें इंटरनेट कनेक्शन होता है।
एक स्मार्ट थर्मोस्टेट के उदाहरण के साथ, थर्मोस्टैट होम वाईफाई का उपयोग करके क्लाउड में चल रही क्लाउड सेवा से जुड़ जाएगा। यह इस क्लाउड सेवा को तापमान डेटा भेजेगा, और वहां से इसे किसी प्रकार के डेटाबेस में लिखा जाएगा जिससे मकान मालिक फोन ऐप का उपयोग करके वर्तमान और पिछले तापमान की जांच कर सके। क्लाउड में एक अन्य सेवा को पता होगा कि मकान मालिक को कौन सा तापमान चाहिए, और हीटिंग सिस्टम को चालू या बंद करने के लिए कहने के लिए क्लाउड सेवा के माध्यम से IoT डिवाइस पर संदेश वापस भेजें।
![एक आईओटी डिवाइस के इनपुट के रूप में तापमान और एक डायल दिखाने वाला एक आरेख, आईओटी डिवाइस क्लाउड से 2 तरह से संचार करता है, जो बदले में एक फोन के लिए 2-तरफा संचार होता है, और आईओटी से आउटपुट के रूप में हीटर का नियंत्रण होता है। डिवाइस](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/mobile-controlled-thermostat.png)
एक और भी स्मार्ट संस्करण क्लाउड में AI का उपयोग अन्य IoT उपकरणों से जुड़े अन्य सेंसर से डेटा के साथ कर सकता है जैसे कि ऑक्यूपेंसी सेंसर जो यह पता लगाते हैं कि कौन से कमरे उपयोग में हैं, साथ ही डेटा जैसे मौसम और यहां तक ​​​​कि आपका कैलेंडर, इस पर निर्णय लेने के लिए कि कैसे तापमान को स्मार्ट तरीके से सेट करें। उदाहरण के लिए, यदि यह आपके कैलेंडर से पढ़ता है कि आप छुट्टी पर हैं, तो यह आपके हीटिंग को बंद कर सकता है, या आपके द्वारा उपयोग किए जाने वाले कमरों के आधार पर कमरे-दर-कमरे के आधार पर हीटिंग को बंद कर सकता है, डेटा से अधिक से अधिक सटीक होना सीखता है अधिक समय तक।
![एक आईओटी डिवाइस के इनपुट के रूप में कई तापमान सेंसर और एक डायल दिखाते हुए एक आरेख, क्लाउड के लिए 2-तरफा संचार वाला आईओटी डिवाइस, जिसके बदले में फोन, कैलेंडर और मौसम सेवा के लिए 2-तरफा संचार होता है, और IoT डिवाइस से आउटपुट के रूप में हीटर का नियंत्रण](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/smarter-thermostat.png)
✅कौन सा अन्य डेटा इंटरनेट से जुड़े थर्मोस्टेट को स्मार्ट बनाने में मदद कर सकता है?
### किनारे पर IoT
हालाँकि IoT में I का अर्थ इंटरनेट है, इन उपकरणों को इंटरनेट से कनेक्ट करने की आवश्यकता नहीं है। कुछ मामलों में, डिवाइस 'एज' डिवाइस से कनेक्ट हो सकते हैं - गेटवे डिवाइस जो आपके स्थानीय नेटवर्क पर चलते हैं, जिसका अर्थ है कि आप इंटरनेट पर कॉल किए बिना डेटा को प्रोसेस कर सकते हैं। यह तब तेज हो सकता है जब आपके पास बहुत अधिक डेटा या धीमा इंटरनेट कनेक्शन हो, यह आपको ऑफ़लाइन चलाने की अनुमति देता है जहां इंटरनेट कनेक्टिविटी संभव नहीं है जैसे कि जहाज पर या आपदा क्षेत्र में मानवीय संकट का जवाब देते समय, और आपको डेटा को निजी रखें। कुछ उपकरणों में क्लाउड टूल्स का उपयोग करके बनाए गए प्रोसेसिंग कोड होंगे और निर्णय लेने के लिए इंटरनेट कनेक्शन का उपयोग किए बिना डेटा एकत्र करने और प्रतिक्रिया देने के लिए इसे स्थानीय रूप से चलाएंगे।
इसका एक उदाहरण ऐप्पल होमपॉड, अमेज़ॅन एलेक्सा, या Google होम जैसे स्मार्ट होम डिवाइस हैं, जो क्लाउड में प्रशिक्षित एआई मॉडल का उपयोग करके आपकी आवाज सुनेंगे, लेकिन डिवाइस पर स्थानीय रूप से चल रहे हैं। जब कोई निश्चित शब्द या वाक्यांश बोला जाता है तो ये उपकरण 'जागृत' होंगे, और उसके बाद ही प्रसंस्करण के लिए इंटरनेट पर अपना भाषण भेजेंगे। डिवाइस उचित बिंदु पर भाषण भेजना बंद कर देगा जैसे कि जब यह आपके भाषण में विराम का पता लगाता है। वेक शब्द के साथ डिवाइस को जगाने से पहले आप जो कुछ भी कहते हैं, और डिवाइस के सुनना बंद करने के बाद आप जो कुछ भी कहते हैं वह इंटरनेट पर डिवाइस प्रदाता को नहीं भेजा जाएगा, और इसलिए निजी होगा।
✅अन्य परिदृश्यों के बारे में सोचें जहां गोपनीयता महत्वपूर्ण है इसलिए डेटा का प्रसंस्करण क्लाउड के बजाय किनारे पर बेहतर ढंग से किया जाएगा। एक संकेत के रूप में - उन IoT उपकरणों के बारे में सोचें जिनमें कैमरे या अन्य इमेजिंग डिवाइस हैं।
### आईओटी सुरक्षा
किसी भी इंटरनेट कनेक्शन के साथ, सुरक्षा एक महत्वपूर्ण विचार है। एक पुराना मजाक है कि 'आईओटी में एस सुरक्षा के लिए खड़ा है' - आईओटी में कोई 'एस' नहीं है, जिसका अर्थ है कि यह सुरक्षित नहीं है।
IoT डिवाइस क्लाउड सेवा से कनेक्ट होते हैं, और इसलिए केवल उस क्लाउड सेवा की तरह ही सुरक्षित होते हैं - यदि आपकी क्लाउड सेवा किसी डिवाइस को कनेक्ट करने की अनुमति देती है तो दुर्भावनापूर्ण डेटा भेजा जा सकता है, या वायरस के हमले हो सकते हैं। इसके बहुत ही वास्तविक दुनिया के परिणाम हो सकते हैं क्योंकि IoT डिवाइस अन्य उपकरणों को इंटरैक्ट और नियंत्रित करते हैं। उदाहरण के लिए, [स्टक्सनेट वर्म](https://wikipedia.org/wiki/Stuxnet) ने सेंट्रीफ्यूज में वाल्वों को खराब करने के लिए हेरफेर किया। हैकर्स ने [बेबी मॉनिटर तक पहुंचने के लिए खराब सुरक्षा](https://www.npr.org/sections/thetwo-way/2018/06/05/617196788/s-c-mom-says-baby-monitor-was-hacked-experts-say-many-devices-are-vulnerable) का भी फायदा उठाया है और अन्य घरेलू निगरानी उपकरण।
> 💁कभी-कभी IoT डिवाइस और एज डिवाइस डेटा को निजी और सुरक्षित रखने के लिए इंटरनेट से पूरी तरह से अलग नेटवर्क पर चलते हैं। इसे [एयर-गैपिंग](https://wikipedia.org/wiki/Air_gap_(networking)) के नाम से जाना जाता है।
## माइक्रोकंट्रोलर में गहराई से अध्ययन करें
पिछले पाठ में, हमने माइक्रोकंट्रोलर पेश किए थे। आइए अब उनमें गहराई से देखें।
### सी पी यू
सीपीयू माइक्रोकंट्रोलर का 'दिमाग' है। यह प्रोसेसर है जो आपके कोड को चलाता है और किसी भी कनेक्टेड डिवाइस से डेटा भेज सकता है और डेटा प्राप्त कर सकता है। सीपीयू में एक या अधिक कोर हो सकते हैं - अनिवार्य रूप से एक या अधिक सीपीयू जो आपके कोड को चलाने के लिए एक साथ काम कर सकते हैं।
सीपीयू एक सेकंड में कई लाख या अरबों बार टिक करने के लिए एक घड़ी पर भरोसा करते हैं। प्रत्येक टिक, या चक्र, सीपीयू द्वारा की जाने वाली क्रियाओं को सिंक्रनाइज़ करता है। प्रत्येक टिक के साथ, सीपीयू एक प्रोग्राम से एक निर्देश निष्पादित कर सकता है, जैसे बाहरी डिवाइस से डेटा पुनर्प्राप्त करना या गणितीय गणना करना। यह नियमित चक्र अगले निर्देश के संसाधित होने से पहले सभी कार्यों को पूरा करने की अनुमति देता है।
घड़ी का चक्र जितना तेज़ होता है, उतने ही अधिक निर्देश जो प्रत्येक सेकंड में संसाधित किए जा सकते हैं, और इसलिए सीपीयू जितना तेज़ होता है। CPU की गति [Hertz (Hz)](https://wikipedia.org/wiki/Hertz) में मापी जाती है, एक मानक इकाई जहां 1 Hz का अर्थ है प्रति सेकंड एक चक्र या घड़ी का टिक।
> 🎓CPU की गति अक्सर MHz या GHz में दी जाती है। 1MHz 1 मिलियन हर्ट्ज है, 1GHz 1 बिलियन हर्ट्ज है।
> 💁 CPU [fetch-decode-execute cycle](https://wikipedia.org/wiki/Instruction_cycle) का उपयोग करके प्रोग्राम निष्पादित करते हैं। प्रत्येक घड़ी की टिक के लिए, सीपीयू मेमोरी से अगला निर्देश प्राप्त करेगा, इसे डीकोड करेगा, फिर इसे निष्पादित करेगा जैसे कि 2 नंबर जोड़ने के लिए अंकगणितीय तर्क इकाई (एएलयू) का उपयोग करना। कुछ निष्पादन चलाने के लिए कई टिक लगेंगे, इसलिए अगला चक्र निर्देश पूरा होने के बाद अगले टिक पर चलेगा।
![फ़ेच डिकोड, रैम में संग्रहीत प्रोग्राम से फ़ेच लेने का निर्देश दिखाते हुए चक्रों को निष्पादित करता है, फिर इसे सीपीयू पर डिकोडिंग और निष्पादित करता है](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/fetch-decode-execute.png)
माइक्रोकंट्रोलर की घड़ी की गति डेस्कटॉप या लैपटॉप कंप्यूटर, या यहां तक ​​कि अधिकांश स्मार्टफ़ोन की तुलना में बहुत कम होती है। उदाहरण के लिए वाईओ टर्मिनल में एक सीपीयू है जो 120 मेगाहट्र्ज या 120,000,000 चक्र प्रति सेकेंड पर चलता है।
✅एक औसत पीसी या मैक में कई गीगाहर्ट्ज़ पर चलने वाले कई कोर के साथ एक सीपीयू होता है, जिसका अर्थ है कि घड़ी एक सेकंड में अरबों बार टिकती है। अपने कंप्यूटर की घड़ी की गति पर शोध करें और तुलना करें कि यह Wio टर्मिनल से कितनी बार तेज है।
प्रत्येक घड़ी चक्र शक्ति खींचता है और गर्मी उत्पन्न करता है। जितनी तेजी से टिक होते हैं, उतनी ही अधिक बिजली की खपत होती है और अधिक गर्मी उत्पन्न होती है। पीसी में गर्मी को दूर करने के लिए हीट सिंक और पंखे होते हैं, जिसके बिना वे गर्म हो जाते हैं और सेकंड के भीतर बंद हो जाते हैं। माइक्रोकंट्रोलर के पास अक्सर न तो होता है क्योंकि वे अधिक कूलर चलाते हैं और इसलिए बहुत धीमे होते हैं। पीसी की रन ऑफ मेन पावर या बड़ी बैटरी कुछ घंटों के लिए, माइक्रोकंट्रोलर छोटी बैटरी से दिनों, महीनों या वर्षों तक चल सकते हैं। माइक्रोकंट्रोलर में कोर भी हो सकते हैं जो अलग-अलग गति से चलते हैं, जब बिजली की खपत कम करने के लिए सीपीयू की मांग कम होती है, तो धीमी कम पावर कोर पर स्विच किया जाता है।
> 💁 कुछ पीसी और मैक तेज हाई पावर कोर और धीमी लो पावर कोर के समान मिश्रण को अपना रहे हैं, बैटरी बचाने के लिए स्विच कर रहे हैं। उदाहरण के लिए, नवीनतम Apple लैपटॉप में M1 चिप चल रहे कार्य के आधार पर बैटरी जीवन या गति को अनुकूलित करने के लिए 4 प्रदर्शन कोर और 4 दक्षता कोर के बीच स्विच कर सकती है।
✅थोड़ा शोध करें: सीपीयू के बारे में [विकिपीडिया सीपीयू लेख](https://wikipedia.org/wiki/Central_processing_unit) पर पढ़ें।
#### टास्क
वाईओ टर्मिनल की जांच करें।
यदि आप इन पाठों के लिए Wio Terminal का उपयोग कर रहे हैं, तो CPU खोजने का प्रयास करें। इंटर्नल की तस्वीर के लिए [Wio Terminal उत्पाद पृष्ठ](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) का *हार्डवेयर ओव्हरव्यू* अनुभाग ढूंढें और पीछे की ओर स्पष्ट प्लास्टिक विंडो के माध्यम से CPU को खोजने का प्रयास करें।
### मेमरी
माइक्रोकंट्रोलर में आमतौर पर दो प्रकार की मेमोरी होती है - प्रोग्राम मेमोरी और रैंडम-एक्सेस मेमोरी (RAM)।
प्रोग्राम मेमोरी गैर-वाष्पशील होती है, जिसका अर्थ है कि इसमें जो कुछ भी लिखा जाता है वह तब रहता है जब डिवाइस में कोई शक्ति नहीं होती है। यह वह मेमोरी है जो आपके प्रोग्राम कोड को स्टोर करती है।
RAM प्रोग्राम द्वारा चलाने के लिए उपयोग की जाने वाली मेमोरी है, जिसमें आपके प्रोग्राम द्वारा आवंटित चर और बाह्य उपकरणों से एकत्रित डेटा होता है। रैम अस्थिर है, जब बिजली चली जाती है तो सामग्री खो जाती है, प्रभावी रूप से आपके प्रोग्राम को रीसेट कर देती है।
> 🎓प्रोग्राम मेमोरी आपके कोड को स्टोर करती है और पावर न होने पर रहती है।
> 🎓RAM का उपयोग आपके प्रोग्राम को चलाने के लिए किया जाता है और बिजली न होने पर रीसेट हो जाता है
सीपीयू की तरह, एक माइक्रोकंट्रोलर पर मेमोरी एक पीसी या मैक से छोटे परिमाण के आदेश हैं। एक सामान्य पीसी में 8 गीगाबाइट (GB) RAM, या 8,000,000,000 बाइट्स हो सकते हैं, प्रत्येक बाइट में एक अक्षर या 0-255 की संख्या को संग्रहीत करने के लिए पर्याप्त स्थान होता है। एक माइक्रोकंट्रोलर में केवल किलोबाइट (KB) RAM होगी, जिसमें एक किलोबाइट 1,000 बाइट्स होगा। ऊपर बताए गए Wio टर्मिनल में 192KB RAM या 192,000 बाइट्स हैं - एक औसत PC से 40,000 गुना कम!
नीचे दिया गया चित्र 192KB और 8GB के बीच के सापेक्ष आकार के अंतर को दर्शाता है - केंद्र में छोटा बिंदु 192KB का प्रतिनिधित्व करता है।
![192KB और 8GB के बीच की तुलना - 40,000 गुना से अधिक बड़ी](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/ram-comparison.png)
प्रोग्राम स्टोरेज भी पीसी से छोटा होता है। एक विशिष्ट पीसी में प्रोग्राम स्टोरेज के लिए 500GB हार्ड ड्राइव हो सकती है, जबकि एक माइक्रोकंट्रोलर में केवल किलोबाइट्स या शायद कुछ मेगाबाइट्स (MB) स्टोरेज (1MB 1,000KB, या 1,000,000 बाइट्स) हो सकता है। Wio टर्मिनल में 4MB प्रोग्राम स्टोरेज है।
✅ थोड़ा शोध करें: इसे पढ़ने के लिए आप जिस कंप्यूटर का उपयोग कर रहे हैं उसमें कितनी रैम और स्टोरेज है? यह एक माइक्रोकंट्रोलर से कैसे तुलना करता है?
### इनपुट आउटपुट
माइक्रोकंट्रोलर्स को सेंसर से डेटा पढ़ने और एक्चुएटर्स को कंट्रोल सिग्नल भेजने के लिए इनपुट और आउटपुट (I/O) कनेक्शन की जरूरत होती है। उनमें आमतौर पर कई सामान्य-उद्देश्य इनपुट/आउटपुट (GPIO) पिन होते हैं। इन पिनों को सॉफ्टवेयर में इनपुट के रूप में कॉन्फ़िगर किया जा सकता है (अर्थात वे एक संकेत प्राप्त करते हैं), या आउटपुट (वे एक संकेत भेजते हैं)।
️🧠⬅️सेंसर से मूल्यों को पढ़ने के लिए इनपुट पिन का उपयोग किया जाता है
️🧠➡️आउटपुट पिन एक्चुएटर्स को निर्देश भेजते हैं
✅आप इसके बारे में अगले पाठ में और जानेंगे।
#### टास्क
वाईओ टर्मिनल की जांच करें।
यदि आप इन पाठों के लिए Wio Terminal का उपयोग कर रहे हैं, तो GPIO पिन खोजें। यह जानने के लिए कि कौन से पिन कौन से हैं, [Wio Terminal उत्पाद पृष्ठ](https://www.seeedstudio.com/Wio-Terminal-p-4509.html) के *पिनआउट डायग्राम* अनुभाग खोजें। Wio Terminal एक स्टिकर के साथ आता है जिसे आप पिन नंबर के साथ पीछे की तरफ माउंट कर सकते हैं, इसलिए इसे अभी जोड़ें यदि आपने पहले से नहीं किया है।
### भौतिक माप
माइक्रोकंट्रोलर आमतौर पर आकार में छोटे होते हैं, सबसे छोटे के साथ, [फ़्रीस्केल काइनेटिस KL03 MCU गोल्फ़ बॉल के डिंपल में फ़िट होने के लिए पर्याप्त छोटा होता है](https://www.edn.com/tiny-arm-cortex-m0-based-mcu-shrinks-package/)। बस एक पीसी में सीपीयू 40 मिमी x 40 मिमी माप सकता है, और इसमें हीट सिंक और पंखे शामिल नहीं हैं जो यह सुनिश्चित करने के लिए आवश्यक हैं कि सीपीयू बिना ओवरहीटिंग के कुछ सेकंड से अधिक समय तक चल सके, एक पूर्ण माइक्रोकंट्रोलर से काफी बड़ा। माइक्रोकंट्रोलर, केस, स्क्रीन, और कनेक्शन और घटकों की एक श्रृंखला के साथ Wio टर्मिनल डेवलपर किट एक खुला हुआ Intel i9 CPU से बहुत बड़ा नहीं है, और एक हीट सिंक और पंखे के साथ CPU से काफी छोटा है!
| डिवाइस | आकार |
| ----------------------------- | --------------------- |
| फ्रीस्केल काइनेटिस KL03 | 1.6 मिमी x 2 मिमी x 1 मिमी |
| वाईओ टर्मिनल | 72मिमी x 57मिमी x 12मिमी |
| इंटेल i9 सीपीयू, हीट सिंक और पंखा | 136 मिमी x 145 मिमी x 103 मिमी |
### फ्रेमवर्क और ऑपरेटिंग सिस्टम
उनकी कम गति और स्मृति आकार के कारण, माइक्रोकंट्रोलर शब्द के डेस्कटॉप अर्थ में एक ऑपरेटिंग सिस्टम (OS) नहीं चलाते हैं। ऑपरेटिंग सिस्टम जो आपके कंप्यूटर को चलाता है (Windows, Linux, या macOS) को माइक्रोकंट्रोलर के लिए पूरी तरह से अनावश्यक कार्यों को चलाने के लिए बहुत अधिक मेमोरी और प्रोसेसिंग पावर की आवश्यकता होती है। याद रखें कि माइक्रोकंट्रोलर्स को आमतौर पर एक या अधिक विशिष्ट कार्यों को करने के लिए प्रोग्राम किया जाता है, पीसी या मैक जैसे सामान्य-उद्देश्य वाले कंप्यूटर के विपरीत, जिसे उपयोगकर्ता इंटरफ़ेस का समर्थन करने, संगीत या फिल्में चलाने, दस्तावेज़ या कोड लिखने, गेम खेलने के लिए उपकरण प्रदान करने की आवश्यकता होती है, या इंटरनेट ब्राउज़ करें।
ओएस के बिना माइक्रोकंट्रोलर प्रोग्राम करने के लिए आपको कुछ टूलिंग की आवश्यकता होती है ताकि आप अपना कोड इस तरह से बना सकें कि माइक्रोकंट्रोलर चल सके, एपीआई का उपयोग करके जो किसी भी बाह्य उपकरणों से बात कर सके। प्रत्येक माइक्रोकंट्रोलर अलग होता है, इसलिए निर्माता सामान्य रूप से मानक ढांचे का समर्थन करते हैं जो आपको अपना कोड बनाने के लिए एक मानक 'नुस्खा' का पालन करने की अनुमति देते हैं और इसे किसी भी माइक्रोकंट्रोलर पर चलाते हैं जो उस ढांचे का समर्थन करता है।
आप ओएस का उपयोग करके माइक्रोकंट्रोलर प्रोग्राम कर सकते हैं - जिसे अक्सर रीयल-टाइम ऑपरेटिंग सिस्टम (आरटीओएस) के रूप में संदर्भित किया जाता है, क्योंकि इन्हें रीयल-टाइम में बाह्य उपकरणों से डेटा भेजने के लिए डिज़ाइन किया गया है। ये ऑपरेटिंग सिस्टम बहुत हल्के होते हैं और इस तरह की सुविधाएँ प्रदान करते हैं:
* मल्टी-थ्रेडिंग, आपके कोड को एक ही समय में कोड के एक से अधिक ब्लॉक चलाने की अनुमति देता है, या तो कई कोर पर या एक कोर को चालू करके
* इंटरनेट पर सुरक्षित रूप से संचार करने की अनुमति देने के लिए नेटवर्किंग
* स्क्रीन वाले उपकरणों पर यूजर इंटरफेस (यूआई) के निर्माण के लिए ग्राफिकल यूजर इंटरफेस (जीयूआई) घटक।
✅ कुछ अलग RTOS के बारे में पढ़ें: [Azure RTOS](https://azure.microsoft.com/services/rtos/?WT.mc_id=academic-17441-jabenn), [FreeRTOS](https://www.freertos.org), [ज़ेफिर](https://www.zephyrproject.org)
#### अरुडिनो
![Arduino logo](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/arduino-logo.svg)
[Arduino](https://www.arduino.cc) शायद सबसे लोकप्रिय माइक्रोकंट्रोलर फ्रेमवर्क है, खासकर छात्रों, शौक़ीन लोगों और निर्माताओं के बीच। Arduino एक ओपन-सोर्स इलेक्ट्रॉनिक्स प्लेटफॉर्म है जो सॉफ्टवेयर और हार्डवेयर को मिलाता है। आप Arduino से स्वयं या अन्य निर्माताओं से Arduino संगत बोर्ड खरीद सकते हैं, फिर Arduino फ्रेमवर्क का उपयोग करके कोड कर सकते हैं।
Arduino बोर्डों को C या C++ में कोड किया गया है। C या C++ का उपयोग करने से आपके कोड को बहुत छोटा संकलित किया जा सकता है और तेजी से चलाया जा सकता है, एक सीमित डिवाइस जैसे कि माइक्रोकंट्रोलर पर कुछ आवश्यक है। एक Arduino एप्लिकेशन के मूल को एक स्केच के रूप में संदर्भित किया जाता है और 2 कार्यों के साथ C/C++ कोड है - `setup` और `loop`। जब बोर्ड शुरू होता है, तो Arduino फ्रेमवर्क कोड एक बार `setup` फ़ंक्शन चलाएगा, फिर यह `loop` फ़ंक्शन को बार-बार चलाएगा, इसे तब तक लगातार चलाएगा जब तक कि बिजली बंद न हो जाए।
आप अपना setup कोड `setup` फ़ंक्शन में लिखेंगे, जैसे कि वाईफाई और क्लाउड सेवाओं से कनेक्ट करना या इनपुट और आउटपुट के लिए पिन इनिशियलाइज़ करना। तब आपके लूप कोड में प्रोसेसिंग कोड होगा, जैसे सेंसर से पढ़ना और मान को क्लाउड पर भेजना। आप सामान्य रूप से प्रत्येक लूप में देरी शामिल करेंगे, उदाहरण के लिए, यदि आप चाहते हैं कि हर 10 सेकंड में केवल सेंसर डेटा भेजा जाए तो आप लूप के अंत में 10 सेकंड की देरी जोड़ देंगे ताकि माइक्रोकंट्रोलर सो सके, बिजली बचा सके, फिर 10 सेकंड बाद जरूरत पड़ने पर लूप को फिर से चला सकें।
![पहले एक Arduino स्केच रनिंग सेटअप, फिर बार-बार लूप चलाना](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/arduino-sketch.png)
✅इस प्रोग्राम के आर्किटेक्चर को *इवेंट लूप* या *मैसेज लूप* के रूप में जाना जाता है। कई एप्लिकेशन हुड के तहत इसका उपयोग करते हैं और अधिकांश डेस्कटॉप एप्लिकेशन के लिए मानक हैं जो विंडोज, मैकओएस या लिनक्स जैसे ओएस पर चलते हैं। `loop` उपयोगकर्ता इंटरफ़ेस घटकों जैसे बटन, या कीबोर्ड जैसे उपकरणों के संदेशों को सुनता है, और उनका जवाब देता है। आप इस [इवेंट लूप पर लेख](https://wikipedia.org/wiki/Event_loop) में और अधिक पढ़ सकते हैं।
Arduino माइक्रोकंट्रोलर और I/O पिन के साथ इंटरैक्ट करने के लिए मानक पुस्तकालय प्रदान करता है, विभिन्न माइक्रोकंट्रोलर पर चलने के लिए हुड के तहत विभिन्न कार्यान्वयन के साथ। उदाहरण के लिए, [`delay` फ़ंक्शन](https://www.arduino.cc/reference/en/language/functions/time/delay/) एक निश्चित अवधि के लिए कार्यक्रम को रोक देगा, [`digitalRead` फ़ंक्शन](https://www.arduino.cc/reference/en/language/functions/digital-io/digitalread/) दिए गए पिन से `HIGH` या `LOW` का मान पढ़ेगा, चाहे किसी भी बोर्ड पर कोड चालू है। इन मानक पुस्तकालयों का मतलब है कि एक बोर्ड के लिए लिखे गए Arduino कोड को किसी अन्य Arduino बोर्ड के लिए पुन: संकलित किया जा सकता है और यह मानते हुए चलेगा कि पिन समान हैं और बोर्ड समान सुविधाओं का समर्थन करते हैं।
तृतीय-पक्ष Arduino पुस्तकालयों का एक बड़ा पारिस्थितिकी तंत्र है जो आपको अपने Arduino प्रोजेक्ट्स में अतिरिक्त सुविधाएँ जोड़ने की अनुमति देता है, जैसे सेंसर और एक्चुएटर्स का उपयोग करना या क्लाउड IoT सेवाओं से जुड़ना।
##### टास्क
वाईओ टर्मिनल की जांच करें।
यदि आप इन पाठों के लिए Wio Terminal का उपयोग कर रहे हैं, तो पिछले पाठ में आपके द्वारा लिखे गए कोड को दोबारा पढ़ें। `setup` और `loop` फ़ंक्शन ढूंढें। लूप फ़ंक्शन को बार-बार कॉल करने के लिए सीरियल आउटपुट की निगरानी करें। सीरियल पोर्ट पर लिखने के लिए `setup` फ़ंक्शन में कोड जोड़ने का प्रयास करें और देखें कि यह कोड केवल एक बार रीबूट करने पर ही कॉल किया जाता है। अपने डिवाइस को साइड में पावर स्विच के साथ रीबूट करने का प्रयास करें यह दिखाने के लिए कि हर बार डिवाइस रीबूट होने पर इसे कहा जाता है।
## सिंगल-बोर्ड कंप्यूटर में गहराई से अध्ययन करें
पिछले पाठ में, हमने सिंगल-बोर्ड कंप्यूटर पेश किए थे। आइए अब उनमें गहराई से देखें।
### रास्पबेरी पाई
![रास्पबेरी पाई लोगो](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/raspberry-pi-logo.png)
[रास्पबेरी पाई फाउंडेशन](https://www.raspberrypi.org) यूके की एक चैरिटी है जिसकी स्थापना 2009 में कंप्यूटर विज्ञान के अध्ययन को बढ़ावा देने के लिए की गई थी, खासकर स्कूल स्तर पर। इस मिशन के हिस्से के रूप में, उन्होंने एक सिंगल-बोर्ड कंप्यूटर विकसित किया, जिसे रास्पबेरी पाई कहा जाता है। रास्पबेरी पाई वर्तमान में 3 प्रकारों में उपलब्ध है - एक पूर्ण आकार का संस्करण, छोटा पाई ज़ीरो, और एक गणना मॉड्यूल जिसे आपके अंतिम IoT डिवाइस में बनाया जा सकता है।
![एक रास्पबेरी पाई 4](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/raspberry-pi-4.jpg)
पूर्ण आकार के रास्पबेरी पाई का नवीनतम पुनरावृत्ति रास्पबेरी पाई 4 बी है। इसमें एक क्वाड-कोर (4 कोर) सीपीयू है जो 1.5GHz, 2, 4, या 8GB RAM, गीगाबिट ईथरनेट, वाईफाई, 4k स्क्रीन को सपोर्ट करने वाले 2 HDMI पोर्ट, एक ऑडियो और कम्पोजिट वीडियो आउटपुट पोर्ट, USB पोर्ट (2 USB) पर चलता है। 2.0, 2 यूएसबी 3.0), 40 जीपीआईओ पिन, रास्पबेरी पाई कैमरा मॉड्यूल के लिए एक कैमरा कनेक्टर और एक एसडी कार्ड स्लॉट। यह सब एक बोर्ड पर है जो 88mm x 58mm x 19.5mm है और यह 3A USB-C बिजली की आपूर्ति द्वारा संचालित है। ये 35 अमेरिकी डॉलर से शुरू होते हैं, जो पीसी या मैक से काफी सस्ता है।
> 💁एक कीबोर्ड में निर्मित Pi4 के साथ एक सभी कंप्यूटर में एक Pi400 भी है।
![एक रास्पबेरी पाई ज़ीरो](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/raspberry-pi-zero.jpg)
पाई ज़ीरो बहुत छोटा है, कम शक्ति के साथ। इसमें सिंगल-कोर 1GHz CPU, 512MB RAM, WiFi (ज़ीरो W मॉडल में), एक सिंगल HDMI पोर्ट, एक माइक्रो-USB पोर्ट, 40 GPIO पिन, एक रास्पबेरी पाई कैमरा मॉड्यूल के लिए एक कैमरा कनेक्टर और एक SD है। कार्ड का स्थान। यह 65 मिमी x 30 मिमी x 5 मिमी मापता है, और बहुत कम शक्ति खींचता है। ज़ीरो यूएस $ 5 है, वाई-फाई यूएस $ 10 के साथ डब्ल्यू संस्करण के साथ।
>🎓 इन दोनों में सीपीयू एआरएम प्रोसेसर हैं, इंटेल/एएमडी x86 या x64 प्रोसेसर के विपरीत जो आपको अधिकांश पीसी और मैक में मिलते हैं। ये कुछ माइक्रोकंट्रोलर्स के साथ-साथ लगभग सभी मोबाइल फोन, माइक्रोसॉफ्ट सर्फेस एक्स और नए ऐप्पल सिलिकॉन-आधारित ऐप्पल मैक में पाए जाने वाले सीपीयू के समान हैं।
रास्पबेरी पाई के सभी वेरिएंट रास्पबेरी पाई ओएस नामक डेबियन लिनक्स का एक संस्करण चलाते हैं। यह बिना डेस्कटॉप के एक लाइट संस्करण के रूप में उपलब्ध है, जो 'हेडलेस' परियोजनाओं के लिए एकदम सही है, जहां आपको स्क्रीन की आवश्यकता नहीं है, या एक पूर्ण डेस्कटॉप वातावरण के साथ एक पूर्ण संस्करण, एक वेब ब्राउज़र, कार्यालय अनुप्रयोगों, कोडिंग टूल, और खेल चूंकि ओएस डेबियन लिनक्स का एक संस्करण है, आप डेबियन पर चलने वाले किसी भी एप्लिकेशन या टूल को इंस्टॉल कर सकते हैं और पीआई के अंदर एआरएम प्रोसेसर के लिए बनाया गया है।
#### टास्क
रास्पबेरी पाई की जांच करें।
यदि आप इन पाठों के लिए रास्पबेरी पाई का उपयोग कर रहे हैं, तो बोर्ड पर विभिन्न हार्डवेयर घटकों के बारे में पढ़ें।
* आप [रास्पबेरी पाई हार्डवेयर डॉक्यूमेंटेशन पेज](https://www.raspberrypi.org/documentation/hardware/raspberrypi/) पर इस्तेमाल किए गए प्रोसेसर के बारे में जानकारी पा सकते हैं। आप जिस पाई का उपयोग कर रहे हैं उसमें प्रयुक्त प्रोसेसर के बारे में पढ़ें।
* GPIO पिन का पता लगाएँ। [रास्पबेरी पाई GPIO दस्तावेज़ीकरण](https://www.raspberrypi.org/documentation/hardware/raspberrypi/gpio/README.md) पर उनके बारे में और पढ़ें। अपने पाई पर अलग-अलग पिन की पहचान करने के लिए [GPIO पिन यूसेज गाइड](https://www.raspberrypi.org/documentation/usage/gpio/README.md) का इस्तेमाल करें।
### प्रोग्रामिंग सिंगल-बोर्ड कंप्यूटर
सिंगल-बोर्ड कंप्यूटर पूर्ण कंप्यूटर हैं, जो एक पूर्ण OS चला रहे हैं। इसका मतलब यह है कि माइक्रोकंट्रोलर के विपरीत प्रोग्रामिंग भाषाओं, ढांचे और टूल की एक विस्तृत श्रृंखला है जिसका उपयोग आप उन्हें कोड करने के लिए कर सकते हैं, जो Arduino जैसे ढांचे में बोर्ड के समर्थन पर भरोसा करते हैं। अधिकांश प्रोग्रामिंग भाषाओं में पुस्तकालय होते हैं जो सेंसर और एक्चुएटर्स से डेटा भेजने और प्राप्त करने के लिए GPIO पिन तक पहुंच सकते हैं।
✅ आप किन प्रोग्रामिंग भाषाओं से परिचित हैं? क्या वे लिनक्स पर समर्थित हैं?
रास्पबेरी पाई पर IoT अनुप्रयोगों के निर्माण के लिए सबसे आम प्रोग्रामिंग भाषा पायथन है। पाई के लिए डिज़ाइन किए गए हार्डवेयर का एक विशाल पारिस्थितिकी तंत्र है, और इनमें से लगभग सभी में संबंधित कोड शामिल हैं जो उन्हें पायथन पुस्तकालयों के रूप में उपयोग करने के लिए आवश्यक हैं। इनमें से कुछ पारिस्थितिक तंत्र 'टोपी' पर आधारित होते हैं - तथाकथित क्योंकि वे एक टोपी की तरह पाई के ऊपर बैठते हैं और एक बड़े सॉकेट से 40 GPIO पिन से जुड़ते हैं। ये टोपियां अतिरिक्त क्षमताएं प्रदान करती हैं, जैसे स्क्रीन, सेंसर, रिमोट-नियंत्रित कार, या एडेप्टर आपको मानकीकृत केबल के साथ सेंसर प्लग-इन करने की अनुमति देते हैं
### पेशेवर IoT परिनियोजन में सिंगल-बोर्ड कंप्यूटर का उपयोग
एकल-बोर्ड कंप्यूटर का उपयोग पेशेवर IoT परिनियोजन के लिए किया जाता है, न कि केवल डेवलपर किट के रूप में। वे हार्डवेयर को नियंत्रित करने और मशीन लर्निंग मॉडल चलाने जैसे जटिल कार्यों को चलाने के लिए एक शक्तिशाली तरीका प्रदान कर सकते हैं। उदाहरण के लिए, एक [रास्पबेरी पाई 4 कंप्यूट मॉड्यूल](https://www.raspberrypi.org/blog/raspberry-pi-compute-module-4/) है जो रास्पबेरी पाई 4 की सारी शक्ति प्रदान करता है लेकिन एक में अधिकांश पोर्ट के बिना कॉम्पैक्ट और सस्ता फॉर्म फैक्टर, जिसे कस्टम हार्डवेयर में स्थापित करने के लिए डिज़ाइन किया गया है।
---
## 🚀चुनौती
पिछले पाठ में चुनौती थी कि आप अपने घर, स्कूल या कार्यस्थल में जितने हो सके उतने IoT उपकरणों को सूचीबद्ध करें। इस सूची में प्रत्येक डिवाइस के लिए, क्या आपको लगता है कि वे माइक्रोकंट्रोलर या सिंगल-बोर्ड कंप्यूटर, या यहां तक ​​कि दोनों के मिश्रण के आसपास बनाए गए हैं?
## व्याख्यान के बाद प्रश्नोत्तरी
[व्याख्यान के बाद प्रश्नोत्तरी](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/4)
## समीक्षा और आत्म अध्ययन
* Arduino प्लेटफॉर्म के बारे में अधिक समझने के लिए [Arduino गेटिंग स्टार्ट गाइड](https://www.arduino.cc/en/Guide/Introduction) पढ़ें।
* रास्पबेरी पाई के बारे में अधिक जानने के लिए [रास्पबेरी पाई 4 का परिचय](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/) पढ़ें।
* [इलेक्ट्रिकल इंजीनियरिंग जर्नल में सीपीयू, एमपीयू, एमसीयू और जीपीयू के अक्सर पूछे जाने वाले सवाल क्या हैं](https://www.eejournal.com/article/what-the-faq-are-cpus-mpus-mcus-and-gpus/) में कुछ अवधारणाओं और शब्दों के बारे में और जानें।
✅आप किस हार्डवेयर प्लेटफॉर्म का उपयोग करना चाहते हैं, या यदि आप इसके बजाय यह तय करने के लिए [हार्डवेयर गाइड](https://github.com/microsoft/IoT-For-Beginners/blob/main/hardware.md) में लिंक का पालन करके दिखाए गए लागतों के साथ इन गाइड का उपयोग करें वर्चुअल डिवाइस का उपयोग करें।
## कार्यभार
[माइक्रोकंट्रोलर और सिंगल-बोर्ड कंप्यूटरों की तुलना और तुलना करें](https://github.com/microsoft/IoT-For-Beginners/blob/main/1-getting-started/lessons/2-deeper-dive/assignment.md)

@ -207,7 +207,7 @@ For every device you listed, what sensors and actuators are they connected to? W
## Review & Self Study
* Read up on electricity and circuits on [ThingLearn](http://www.thinglearn.com/essentials/).
* Read up on electricity and circuits on [ThingLearn](http://thinglearn.jenlooper.com/curriculum/).
* Read about the different types of temperature sensors on the [Seeed Studios Temperature Sensors guide](https://www.seeedstudio.com/blog/2019/10/14/temperature-sensors-for-arduino-projects/)
* Read about LEDs on the [Wikipedia LED page](https://wikipedia.org/wiki/Light-emitting_diode)

@ -199,7 +199,7 @@
## مراجعة ودراسة ذاتية
* اقرأ عن الكهرباء والدوائر على <a href="http://www.thinglearn.com/essentials/">ThingLearn</a>.
* اقرأ عن الكهرباء والدوائر على <a href="http://thinglearn.jenlooper.com/curriculum/">ThingLearn</a>.
* اقرأ عن الأنواع المختلفة من مستشعرات درجة الحرارة في <a href="https://www.seeedstudio.com/blog/2019/10/14/temperature-sensors-for-arduino-projects/">دليل مستشعرات درجة الحرارة في الاستوديوها</a>
* اقرأ عن مصابيح LED على <a href="https://wikipedia.org/wiki/Light-emitting_diode">صفحة Wikipedia LED</a>

@ -194,7 +194,7 @@
## রিভিউ এবং স্ব-অধ্যয়ন
* [ThingLearn](http://www.thinglearn.com/essentials/) থেকে ইলেক্ট্রিসিটি ও সার্কিটের ব্যাপারে পড়া।
* [ThingLearn](http://thinglearn.jenlooper.com/curriculum/) থেকে ইলেক্ট্রিসিটি ও সার্কিটের ব্যাপারে পড়া।
* [Seeed Studios Temperature Sensors guide](https://www.seeedstudio.com/blog/2019/10/14/temperature-sensors-for-arduino-projects/) থেকে বিভিন্ন ধরণের তাপমাত্রা সেন্সরের ব্যাপারে জানা।
* এলইডি সম্পর্কে [Wikipedia LED page](https://wikipedia.org/wiki/Light-emitting_diode) থেকে আরো বিস্তারিত ধারণা লাভ করা।

@ -1,262 +1,262 @@
# Detect soil moisture
# Détecter l'humidité du sol
![A sketchnote overview of this lesson](../../../sketchnotes/lesson-6.jpg)
![Un aperçu de cette leçon sous forme d'illustré](../../../../sketchnotes/lesson-6.jpg)
> Sketchnote by [Nitya Narasimhan](https://github.com/nitya). Click the image for a larger version.
> Illustré par [Nitya Narasimhan](https://github.com/nitya). Click the image for a larger version.
## Pre-lecture quiz
## Quiz Pré-lecture
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/11)
[Quiz Pré-lecture](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/11)
## Introduction
In the last lesson we looked at measuring an ambient property and using it to predict plant growth. Temperature can be controlled, but it is expensive to do so, requiring controlled environments. The easiest ambient property to control for plants is water - something that is controlled everyday from large-scale irrigation systems to young kids with watering cans watering their gardens.
Dans la dernière leçon, nous avons étudié la mesure d'une propriété ambiante ainsi que son utilisation afin de prédire la croissance des plantes. La température peut être contrôlée, mais cette opération est coûteuse et nécessite des environnements contrôlés. La propriété ambiante la plus facile à contrôler pour les plantes est l'eau - un élément qui est contrôlé tous les jours, depuis les systèmes d'irrigation à grande échelle jusqu'aux jeunes enfants qui arrosent leur jardin avec un arrosoir.
![A child watering a garden](../../../images/child-watering-garden.jpg)
![Un enfant arrosant un jardin](../../../../images/child-watering-garden.jpg)
In this lesson you will learn about measuring soil moisture, and in the next lesson you will learn how to control an automated watering system. This lesson introduces a third sensor, you've already used a light sensor, a temperature sensor, so in this lesson you will also learn more about how sensors and actuators communicate with IoT devices to understand more about how a soil moisture sensor can send data to an IoT device.
Dans cette leçon, vous apprendrez à mesurer l'humidité du sol, et dans la leçon suivante, vous apprendrez à contrôler un système d'arrosage automatisé. Cette leçon introduit un troisième capteur, vous avez déjà utilisé un capteur de lumière, un capteur de température, donc dans cette leçon vous allez également en apprendre plus sur la façon dont les capteurs et les actionneurs communiquent avec les dispositifs IoT pour comprendre davantage comment un capteur d'humidité du sol peut envoyer des données à un dispositif IoT.
In this lesson we'll cover:
Dans cette leçon, nous aborderons:
* [Soil moisture](#soil-moisture)
* [How sensors communicate with IoT devices](#how-sensors-communicate-with-iot-devices)
* [Measure the moisture levels in soil](#measure-the-moisture-levels-in-soil)
* [Sensor calibration](#sensor-calibration)
* [Humidité du sol](#humidité-du-sol)
* [Comment les senseurs communiquent avec les composants IoT](#comment-les-senseurs-communiquent-avec-les-composants-IoT)
* [Mesurer les niveaux d'humidité dans le sol](#mesurer-les-niveaux-d-humidité-dans-le-sol)
* [Étalonnage du capteur](#étalonnage-du-capteur)
## Soil moisture
## Humidité du sol
Plants require water to grow. They absorb water throughout the entire plant, with the majority being absorbed by the root system. Water is used by the plant for three things:
Les plantes ont besoin d'eau pour se développer. Elles absorbent l'eau dans toute la plante, la majorité étant absorbée par le système racinaire. L'eau est utilisée par la plante pour trois choses :
* [Photosynthesis](https://wikipedia.org/wiki/Photosynthesis) - plants creates a chemical reaction with water, carbon dioxide and light to produce carbohydrates and oxygen.
* [Transpiration](https://wikipedia.org/wiki/Transpiration) - plants use water for diffusion of carbon dioxide from the air into the plant via pores in the leaves. This process also carries nutrients around the plant, and cools the plant, similar to how humans sweat.
* Structure - plants also need water to maintain their structure - they are 90% water (as opposed to humans at only 60%), and this water keeps the cells rigid. If a plant doesn't have enough water it will wilt and eventually die.
* [Photosynthèse](https://wikipedia.org/wiki/Photosynthesis) - Les plantes créent une réaction chimique avec l'eau, le dioxyde de carbone et la lumière pour produire des hydrates de carbone et de l'oxygène.
* [Transpiration](https://wikipedia.org/wiki/Transpiration) - Les plantes utilisent l'eau pour diffuser le dioxyde de carbone de l'air dans la plante via les pores des feuilles. Ce processus permet également de transporter les nutriments autour de la plante et de la refroidir, comme la transpiration humaine.
* Structure - les plantes ont également besoin d'eau pour maintenir leur structure - elles sont composées à 90 % d'eau (contrairement aux humains qui n'en ont que 60 %), et cette eau maintient les cellules rigides. Si une plante n'a pas assez d'eau, elle se flétrit et finit par mourir.
![Water is absorbed through plant roots then carried around the plant, being used for photosynthesis and plant structure](../../../images/transpiration.png)
![L'eau est absorbée par les racines des plantes, puis transportée dans la plante, utilisée pour la photosynthèse et la structure de la plante.](../../../../images/transpiration.png)
Do some research: how much water is lost through transpiration?
Faites des recherches : quelle quantité d'eau est perdue par transpiration ?
The root system provides water from moisture in the soil where the plant grows. Too little water in the soil and the plant cannot absorb enough to grow, too much water and roots cannot absorb enough oxygen needed to function. This leads to roots dying and the plant unable to get enough nutrients to survive.
Le système racinaire fournit de l'eau à partir de l'humidité du sol où pousse la plante. Trop peu d'eau dans le sol et la plante ne peut pas en absorber suffisamment pour se développer, trop d'eau et les racines ne peuvent pas absorber suffisamment d'oxygène nécessaire à leur fonctionnement. Les racines meurent alors et la plante ne peut pas obtenir suffisamment de nutriments pour survivre.
For a farmer to get the best plant growth, the soil needs to be not too wet and not too dry. IoT devices can help with this by measuring soil moisture, allowing a farmer to only water when needed.
Pour qu'un agriculteur obtienne la meilleure croissance des plantes, le sol doit être ni trop humide ni trop sec. Les dispositifs IoT peuvent y contribuer en mesurant l'humidité du sol, ce qui permet à l'agriculteur de n'arroser que lorsque cela est nécessaire.
### Ways to measure soil moisture
### Comment les senseurs communiquent avec les composants IoT
There are a range of different types of sensor you can use to measure soil moisture:
Il existe différents types de capteurs que vous pouvez utiliser pour mesurer l'humidité du sol :
* Resistive - a resistive sensor has 2 probes that go into the soil. An electric current is sent to one probe, and received by the other. The sensor then measures the resistance of the soil - measuring how much the current drops at the second probe. Water is a good conductor of electricity, so the higher the water content of the soil, the lower the resistance.
* Résistif - un capteur résistif possède deux sondes qui pénètrent dans le sol. Un courant électrique est envoyé à une sonde et reçu par l'autre. Le capteur mesure alors la résistance du sol - en mesurant de combien le courant chute au niveau de la deuxième sonde. L'eau est un bon conducteur d'électricité, donc plus la teneur en eau du sol est élevée, plus la résistance est faible.
![A resistive soil moisture sensor](../../../images/resistive-soil-moisture-sensor.png)
![Un capteur d'humidité du sol résistif](../../../../images/resistive-soil-moisture-sensor.png)
> 💁 You can build a resistive soil moisture sensor using two pieces of metal, such as nails, separated by a couple of centimeters, and measuring the resistance between them using a multimeter.
> 💁 Vous pouvez construire un capteur d'humidité du sol résistif en utilisant deux morceaux de métal, comme des clous, séparés de quelques centimètres, et en mesurant la résistance entre eux à l'aide d'un multimètre.
* Capacitive - a capacitive moisture sensor measures the amount of electric charge that can be stored across a positive and a negative electrical plate, or [capacitance](https://wikipedia.org/wiki/Capacitance). The capacitance of soil changes as the moisture level changes, and this can be converted to a voltage that can be measured by an IoT device. The wetter the soil, the lower the voltage that comes out.
* Capacitif - un capteur d'humidité capacitif mesure la quantité de charge électrique qui peut être stockée entre une plaque électrique positive et une plaque négative, ou [capacitance](https://wikipedia.org/wiki/Capacitance). La capacitance du sol change en fonction du niveau d'humidité, et cela peut être converti en une tension qui peut être mesurée par un appareil IoT. Plus le sol est humide, plus la tension qui en ressort est faible.
![A capacitive soil moisture sensor](../../../images/grove-capacitive-soil-moisture-sensor.png)
![Un capteur capacitif d'humidité du sol](../../../../images/grove-capacitive-soil-moisture-sensor.png)
These are both analog sensors, returning a voltage to indicate soil moisture. So how does this voltage get to your code? Before going any further with these sensors, let's look at how sensors and actuators communicate with IoT devices.
Ce sont tous deux des capteurs analogiques, qui renvoient une tension pour indiquer l'humidité du sol. Comment cette tension arrive-t-elle dans votre code ? Avant d'aller plus loin avec ces capteurs, voyons comment les capteurs et les actionneurs communiquent avec les appareils IoT.
## How sensors communicate with IoT devices
## Comment les senseurs communiquent avec les composants IoT
So far in these lessons you've learned about a number of sensors and actuators, and these have been communicating with your IoT dev kit if you've been doing the physical hardware labs. But how does this communication work? How does a resistance measurement from a soil moisture sensor become a number you can use from code?
Jusqu'à présent, dans ces leçons, vous avez appris à connaître un certain nombre de capteurs et d'actionneurs, et ceux-ci ont communiqué avec votre kit de développement IoT si vous avez fait les laboratoires de matériel physique. Mais comment cette communication fonctionne-t-elle ? Comment une mesure de résistance d'un capteur d'humidité du sol devient-elle un nombre utilisable dans le code ?
To communicate with most sensors and actuators you need some hardware, and a communication protocol - that is a well defined way for data to be sent and received. Take for example a capacitive soil moisture sensor:
Pour communiquer avec la plupart des capteurs et des actionneurs, il faut du matériel et un protocole de communication, c'est-à-dire une méthode bien définie d'envoi et de réception des données. Prenons l'exemple d'un capteur capacitif d'humidité du sol :
* How is this sensor connected to the IoT device?
* If it measures a voltage that is an analog signal, it will need an ADC to create a digital representation of the value, and this value is sent as an alternating voltage to send 0s and 1s - but how long is each bit sent for?
* If the sensor returns a digital value, that will be a stream of 0s and 1s, again how long is each bit sent for?
* If the voltage is high for 0.1s is that a single 1 bit, or 2 consecutive 1 bits, or 10?
* At what point does the number start? Is `00001101` 25, or are the first 5 bits the end of the previous value?
* Comment ce capteur est-il connecté à l'appareil IoT ?
* S'il mesure une tension qui est un signal analogique, il aura besoin d'un "ADC" pour créer une représentation numérique de la valeur, et cette valeur est envoyée sous forme de tension alternative pour envoyer des 0 et des 1 - mais pendant combien de temps chaque bit est-il envoyé ?
* Si le capteur renvoie une valeur numérique, il s'agira d'un flux de 0 et de 1. Là encore, pendant combien de temps chaque bit est-il envoyé ?
* Si la tension est élevée pendant 0,1 s, s'agit-il d'un seul bit, de deux bits consécutifs ou de dix bits ?
* A quel moment le nombre commence-t-il ? Est-ce que `00001101` 25, ou est-ce que les 5 premiers bits sont la fin de la valeur précédente ?
The hardware provides the physical connectivity over which the data is sent, the different communication protocols ensure that the data is sent or received in the correct way so it can be interpreted.
Le matériel fournit la connectivité physique sur laquelle les données sont envoyées, les différents protocoles de communication garantissent que les données sont envoyées ou reçues de manière correcte pour pouvoir être interprétées.
### General Purpose Input Output (GPIO) pins
### Broches d'entrée-sortie à usage général (GPIO)
GPIO is a set of pins you can use to connect hardware to your IoT device, and are often available on IoT developer kits such as the Raspberry Pi or Wio Terminal. You can use the various communication protocols covered in this section over the GPIO pins. Some GPIO pins provide a voltage, usually 3.3V or 5V, some pins are ground, and others can be programmatically set to either send a voltage (output), or receive a voltage (input).
GPIO est un ensemble de broches que vous pouvez utiliser pour connecter du matériel à votre dispositif IoT, et qui sont souvent disponibles sur les kits de développement IoT tels que le Raspberry Pi ou le Terminal Wio. Vous pouvez utiliser les différents protocoles de communication abordés dans cette section sur les broches GPIO. Certaines broches GPIO fournissent une tension, généralement 3,3 V ou 5 V, certaines broches sont des masses, et d'autres peuvent être configurées par programmation pour envoyer une tension (sortie) ou recevoir une tension (entrée).
> 💁 An electrical circuit needs to connect a voltage to ground via whatever circuitry you are using. You can think of voltage as the positive (+ve) terminal of a battery and ground as the negative (-ve) terminal.
> 💁 Un circuit électrique doit relier une tension à la terre via le circuit que vous utilisez. Vous pouvez considérer la tension comme la borne positive (+ve) d'une batterie et la terre comme la borne négative (-ve).
You can use GPIO pins directly with some digital sensors and actuators when you only care about on or off values - on referred to as high, off as low. Some examples are:
Vous pouvez utiliser les broches GPIO directement avec certains capteurs et actionneurs numériques lorsque vous ne vous préoccupez que des valeurs de marche ou d'arrêt - marche étant désignée comme haute, arrêt comme basse. Voici quelques exemples :
* Button. You can connect a button between a 5V pin and a pin set to input. When you press the button it completes a circuit between the 5V pin, through the button to the input pin. From code you can read the voltage at the input pin, and if it is high (5V) then the button is pressed, if it is low (0v) then the button is not pressed. Remember the actual voltage itself is not read, instead you get a digital signal of 1 or 0 depending on if the voltage is above a threshold or not.
* Bouton. Vous pouvez connecter un bouton entre une broche 5V et une broche définie comme entrée. Lorsque vous appuyez sur le bouton, un circuit est créé entre la broche 5V, le bouton et la broche d'entrée. A partir du code, vous pouvez lire la tension sur la broche d'entrée, et si elle est élevée (5V), le bouton est enfoncé, si elle est basse (0V), le bouton n'est pas enfoncé. Rappelez-vous que la tension réelle elle-même n'est pas lue, mais que vous obtenez un signal numérique de 1 ou 0 selon que la tension est supérieure ou non à un seuil.
![A button is sent 5 volts. When not pressed it returns 0 volts, or 0, when pressed it returns 5 volts, or 1](../../../images/button-with-digital.png)
![On envoie 5 volts à un bouton. Lorsqu'il n'est pas enfoncé, il renvoie 0 volt, ou 0, lorsqu'il est enfoncé, il renvoie 5 volts, ou 1](../../../../images/button-with-digital.png)
* LED. You can connect an LED between an output pin and a ground pin (using a resistor otherwise you'll burn out the LED). From code you can set the output pin to high and it will send 3.3V, making a circuit from the 3.3V pin, through the LED, to the ground pin. This will light the LED.
* LED. Vous pouvez connecter une LED entre une broche de sortie et une broche de masse (en utilisant une résistance, sinon vous allez brûler la LED). À partir du code, vous pouvez mettre la broche de sortie à un niveau élevé et elle enverra 3,3 V, créant un circuit de la broche 3,3 V à la broche de terre en passant par la DEL. Ceci allumera la LED.
![An LED is sent a signal of 0 (3.3V), which lights the LED. If it is sent 0 (0v), the LED is not lit.](../../../images/led-digital-control.png)
![On envoie à une LED un signal de 0 (3,3V), qui allume la LED. Si on lui envoie 0 (0v), la LED ne s'allume pas.](../../../../images/led-digital-control.png)
For more advanced sensors, you can use GPIO pins to send and receive digital data directly with digital sensors and actuators, or via controller boards with ADCs and DACs to talk to analog sensors and actuators.
Pour les capteurs plus avancés, vous pouvez utiliser les broches GPIO pour envoyer et recevoir des données numériques directement avec des capteurs et des actionneurs numériques, ou via des cartes de contrôle avec des ADC et des DAC pour parler aux capteurs et actionneurs analogiques.
> 💁 if you are using a Raspberry Pi for these labs, the Grove Base Hat has hardware to convert analog sensor signals to digital to send over GPIO.
> 💁 Si vous utilisez un Raspberry Pi pour ces travaux pratiques, le Grove Base Hat dispose d'un matériel permettant de convertir les signaux analogiques des capteurs en signaux numériques à envoyer via GPIO.
If you have an IoT device with GPIO pins, locate these pins and find a diagram indicating which pins are voltage, ground or programmable.
Si vous avez un dispositif IoT avec des broches GPIO, localisez ces broches et trouvez un diagramme indiquant quelles broches sont sous tension, reliées à la masse (ground) ou programmables.
### Analog pins
### Broches analogiques
Some devices, such as Arduino devices, provide analog pins. These are the same as GPIO pins, but instead of only supporting a digital signal, they have an ADC to convert voltage ranges to numerical values. Usually the ADC has a 10-bit resolution, meaning it converts voltages to a value of 0-1,023.
Certains appareils, tels que les appareils Arduino, fournissent des broches analogiques. Elles sont identiques aux broches GPIO, mais au lieu de supporter uniquement un signal numérique, elles disposent d'un ADC pour convertir les plages de tension en valeurs numériques. En général, l'ADC a une résolution de 10 bits, ce qui signifie qu'il convertit les tensions en une valeur de 0-1,023.
For example, on a 3.3V board, if the sensor returns 3.3V, the value returned would be 1,023. If the voltage returned was 1.65v, the value returned will be 511.
Par exemple, sur une carte 3.3V, si le capteur renvoie 3.3V, la valeur renvoyée sera de 1,023. Si la tension renvoyée est de 1,65 V, la valeur renvoyée sera de 511.
![A soil moisture sensor sent 3.3V and returning 1.65v, or a reading of 511](../../../images/analog-sensor-voltage.png)
![Un capteur d'humidité du sol envoie 3.3V et retourne 1.65v, soit une lecture de 511](../../../../images/analog-sensor-voltage.png)
> 💁 Back in nightlight - lesson 3, the light sensor returned a value from 0-1,023. If you are using a Wio Terminal, the sensor was connected to an analog pin. If you are using a Raspberry Pi, then the sensor was connected to an analog pin on the base hat that has an integrated ADC to communicate over the GPIO pins. The virtual device was set to send a value from 0-1,023 to simulate an analog pin.
> 💁 Dans la leçon 3 de la veilleuse, le capteur de lumière renvoyait une valeur comprise entre 0 et 1,023. Si vous utilisez un terminal Wio, le capteur était connecté à une broche analogique. Si vous utilisez un Raspberry Pi, le capteur a été connecté à une broche analogique sur le chapeau de base qui a un ADC intégré pour communiquer sur les broches GPIO. Le dispositif virtuel a été configuré pour envoyer une valeur de 0-1,023 pour simuler une broche analogique.
Soil moisture sensors rely on voltages, so will use analog pins and give values from 0-1,023.
Les capteurs d'humidité du sol reposent sur des tensions, ils utilisent donc des broches analogiques et donnent des valeurs comprises entre 0 et 1 023.
### Inter Integrated Circuit (I<sup>2</sup>C)
### Protocol "Inter Integrated Circuit" (I<sup>2</sup>C)
I<sup>2</sup>C, pronounced *I-squared-C*, is a multi-controller, multi-peripheral protocol, with any connected device able to act as a controller or peripheral communicating over the I<sup>2</sup>C bus (the name for a communication system that transfers data). Data is sent as addressed packets, with each packet containing the address of the connected device it is intended for.
I<sup>2</sup>C, prononcé *I-squared-C*, est un protocole multi-contrôleur, multi-périphérique, avec tout dispositif connecté capable d'agir comme un contrôleur ou un périphérique communiquant sur le bus I<sup>2</sup>C (le nom d'un système de communication qui transfère des données). Les données sont envoyées sous forme de paquets adressés, chaque paquet contenant l'adresse du périphérique connecté auquel il est destiné.
> 💁 This model used to be referred to as master/slave, but this terminology is being dropped due to its association with slavery. The [Open Source Hardware Association has adopted controller/peripheral](https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/), but you may still see references to the old terminology.
> 💁 Ce modèle était autrefois appelé "maître/esclave", mais cette terminologie est abandonnée en raison de son association avec l'esclavage. L'association [Open Source Hardware Association a adopté un contrôleur/périphérique](https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/), mais vous pouvez encore voir des références à l'ancienne terminologie.
Devices have an address that is used when they connect to the I<sup>2</sup>C bus, and is usually hard coded on the device. For example, each type of Grove sensor from Seeed has the same address, so all the light sensors have the same address, all the buttons have the same address that is different from the light sensor address. Some devices have ways to change the address, by changing jumper settings or soldering pins together.
Les dispositifs ont une adresse qui est utilisée lorsqu'ils se connectent au bus I<sup>2</sup>C, et qui est généralement écrite mot pour mot (hardcoded) sur le dispositif. Par exemple, chaque type de capteur Grove de Seeed a la même adresse, donc tous les capteurs de lumière ont la même adresse, tous les boutons ont la même adresse qui est différente de celle du capteur de lumière. Certains appareils permettent de modifier l'adresse, en changeant le réglage des cavaliers ou en soudant les broches ensemble.
I<sup>2</sup>C has a bus made of 2 main wires, along with 2 power wires:
I<sup>2</sup>C a un bus composé de 2 fils principaux, ainsi que de 2 fils d'alimentation :
| Wire | Name | Description |
| Fil | Nom | Description |
| ---- | --------- | ----------- |
| SDA | Serial Data | This wire is for sending data between devices. |
| SCL | Serial Clock | This wire sends a clock signal at a rate set by the controller. |
| VCC | Voltage common collector | The power supply for the devices. This is connected to the SDA and SCL wires to provide their power via a pull-up resistor that switches the signal off when no device is the controller. |
| GND | Ground | This provides a common ground for the electrical circuit. |
| SDA | Serial Data | Ce fil sert à envoyer des données entre les appareils. |
| SCL | Serial Clock | Ce fil envoie un signal d'horloge à un rythme défini par le contrôleur. |
| VCC | Voltage common collector | L'alimentation des périphériques. Elle est connectée aux fils SDA et SCL pour fournir leur alimentation via une résistance pull-up qui coupe le signal lorsqu'aucun dispositif n'est le contrôleur. |
| GND | Ground | Cela fournit une masse commune pour le circuit électrique. |
![I2C bus with 3 devices connected to the SDA and SCL wires, sharing a common ground wire](../../../images/i2c.png)
![Bus I2C avec 3 dispositifs connectés aux fils SDA et SCL, partageant un fil de terre commun.](../../../../images/i2c.png)
To send data, one device will issue a start condition to show it is ready to send data. It will then become the controller. The controller then sends the address of the device that it wants to communicate with, along with if it wants to read or write data. After the data has been transmitted, the controller sends a stop condition to indicate that it has finished. After this another device can become the controller and send or receive data.
Pour envoyer des données, un dispositif émet une condition de démarrage pour montrer qu'il est prêt à envoyer des données. Il devient alors le contrôleur. Le contrôleur envoie alors l'adresse du dispositif avec lequel il veut communiquer, et indique s'il veut lire ou écrire des données. Une fois que les données ont été transmises, le contrôleur envoie une condition d'arrêt pour indiquer qu'il a terminé. Après cela, un autre dispositif peut devenir le contrôleur et envoyer ou recevoir des données.
I<sup>2</sup>C has speed limits, with 3 different modes running at fixed speeds. The fastest is High Speed mode with a maximum speed of 3.4Mbps (megabits per second), though very few devices support that speed. The Raspberry Pi for example, is limited to fast mode at 400Kbps (kilobits per second). Standard mode runs at 100Kbps.
I<sup>2</sup>C a des limites de vitesse, avec 3 modes différents fonctionnant à des vitesses fixes. Le plus rapide est le mode High Speed avec une vitesse maximale de 3,4Mbps (mégabits par seconde), bien que très peu d'appareils supportent cette vitesse. Le Raspberry Pi, par exemple, est limité au mode rapide à 400Kbps (kilobits par seconde). Le mode standard fonctionne à 100Kbps.
> 💁 If you are using a Raspberry Pi with a Grove Base hat as your IoT hardware, you will be able to see a number of I<sup>2</sup>C sockets on the board you can use to communicate with I<sup>2</sup>C sensors. Analog Grove sensors also use I<sup>2</sup>C with an ADC to send analog values as digital data, so the light sensor you used simulated an analog pin, with the value sent over I<sup>2</sup>C as the Raspberry Pi only supports digital pins.
> 💁 Si vous utilisez un Raspberry Pi avec un chapeau Grove Base comme matériel IoT, vous pourrez voir un certain nombre de prises I<sup>2</sup>C sur la carte que vous pouvez utiliser pour communiquer avec des capteurs I<sup>2</sup>C. Les capteurs Analog Grove utilisent également l'I<sup>2</sup>C avec un ADC pour envoyer des valeurs analogiques sous forme de données numériques, de sorte que le capteur de lumière que vous avez utilisé a simulé une broche analogique, avec la valeur envoyée sur I<sup>2</sup>C car le Raspberry Pi ne prend en charge que les broches numériques.
### Universal asynchronous receiver-transmitter (UART)
### Récepteur-émetteur asynchrone universel (UART)
UART involves physical circuitry that allows two devices to communicate. Each device has 2 communication pins - transmit (Tx) and receive (Rx), with the Tx pin of the first device connected to the Rx pin of the second, and with the Tx pin of the second device connected to the Rx pin of the first. This allows data to be sent in both directions.
UART est un circuit physique qui permet à deux appareils de communiquer. Chaque périphérique dispose de 2 broches de communication - transmission (Tx) et réception (Rx), la broche Tx du premier périphérique étant connectée à la broche Rx du second, et la broche Tx du second périphérique étant connectée à la broche Rx du premier. Cela permet d'envoyer des données dans les deux sens.
* Device 1 transmits data from its Tx pin, which is received by device 2 on it's Rx pin
* Device 1 receives data on its Rx pin that is transmitted by device 2 from its Tx pin
* Le dispositif 1 transmet des données depuis sa broche Tx, qui sont reçues par le dispositif 2 sur sa broche Rx.
* Le dispositif 1 reçoit des données sur sa broche Rx qui sont transmises par le dispositif 2 depuis sa broche Tx.
![UART with the Tx pin on one chip connected to the Rx pin on another, and vice versa](../../../images/uart.png)
![UART avec la broche Tx d'une puce connectée à la broche Rx d'une autre, et vice versa.](../../../../images/uart.png)
> 🎓 The data is sent one bit at a time, and this is known as *serial* communication. Most operating systems and microcontrollers have *serial ports*, that is connections that can send and receive serial data that are available to your code.
> 🎓 Les données sont envoyées un bit à la fois, c'est ce qu'on appelle la communication *série*. La plupart des systèmes d'exploitation et des microcontrôleurs ont des *ports série*, c'est-à-dire des connexions permettant d'envoyer et de recevoir des données série qui sont à la disposition de votre code.
UART devices have a [baud rate](https://wikipedia.org/wiki/Symbol_rate) (also known as Symbol rate), which is the speed that data will be sent and received in bits per second. A common baud rate is 9,600, meaning 9,600 bits (0s and 1s) of data are sent each second.
Les dispositifs UART ont un [débit en bauds](https://wikipedia.org/wiki/Symbol_rate) (également connu sous le nom de taux de symbole), qui est la vitesse à laquelle les données sont envoyées et reçues en bits par seconde. Une vitesse de transmission courante est de 9 600 bauds, ce qui signifie que 9 600 bits (0 et 1) de données sont envoyés chaque seconde.
UART uses start and stop bits - that is it sends a start bit to indicate that it's about to send a byte (8 bits) of data, then a stop bit after it sends the 8 bits.
UART utilise des bits de départ et d'arrêt, c'est-à-dire qu'il envoie un bit de départ pour indiquer qu'il est sur le point d'envoyer un octet (8 bits) de données, puis un bit d'arrêt après avoir envoyé les 8 bits.
UART speed is dependent on hardware, but even the fastest implementations don't exceed 6.5 Mbps (megabits per second, or millions of bits, 0 or 1, sent per second).
La vitesse de l'UART dépend du matériel, mais même les implémentations les plus rapides ne dépassent pas 6,5 Mbps (mégabits par seconde, ou millions de bits, 0 ou 1, envoyés par seconde).
You can use UART over GPIO pins - you can set one pin as Tx and another as Rx, then connect these to another device.
Vous pouvez utiliser UART sur les broches GPIO - vous pouvez définir une broche comme Tx et une autre comme Rx, puis les connecter à un autre appareil.
> 💁 If you are using a Raspberry Pi with a Grove Base hat as your IoT hardware, you will be able to see a UART socket on the board you can use to communicate with sensors that use the UART protocol.
> 💁 Si vous utilisez un Raspberry Pi avec un "hat" de base Grove comme matériel IoT, vous pourrez voir une prise UART sur la carte que vous pouvez utiliser pour communiquer avec des capteurs qui utilisent le protocole UART.
### Serial Peripheral Interface (SPI)
SPI is designed for communicating over short distances, such as on a microcontroller to talk to a storage device such as flash memory. It is based on a controller/peripheral model with a single controller (usually the processor of the IoT device) interacting with multiple peripherals. The controller controls everything by selecting a peripheral and sending or requesting data.
SPI est conçu pour communiquer sur de courtes distances, comme sur un microcontrôleur pour parler à un périphérique de stockage tel que la mémoire flash. Il est basé sur un modèle contrôleur/périphérique avec un seul contrôleur (généralement le processeur du dispositif IoT) interagissant avec plusieurs périphériques. Le contrôleur contrôle tout en sélectionnant un périphérique et en envoyant ou en demandant des données.
> 💁 Like I<sup>2</sup>C, the terms controller and peripheral are recent changes, so you may see the older terms still used.
> 💁 Comme pour l'I<sup>2</sup>C, les termes contrôleur et périphérique sont des changements récents, vous verrez donc peut-être les anciens termes encore utilisés.
SPI controllers use 3 wires, along with 1 extra wire per peripheral. Peripherals use 4 wires. These wires are:
Les contrôleurs SPI utilisent 3 fils, ainsi qu'un fil supplémentaire par périphérique. Les périphériques utilisent 4 fils. Ces fils sont :
| Wire | Name | Description |
| Fil | Nom | Description |
| ---- | --------- | ----------- |
| COPI | Controller Output, Peripheral Input | This wire is for sending data from the controller to the peripheral. |
| CIPO | Controller Input, peripheral Output | This wire is for sending data from the peripheral to the controller. |
| SCLK | Serial Clock | This wire sends a clock signal at a rate set by the controller. |
| CS | Chip Select | The controller has multiple wires, one per peripheral, and each wire connects to the CS wire on the corresponding peripheral. |
| COPI | Controller Output, Peripheral Input | Ce fil sert à envoyer des données du contrôleur au périphérique. |
| CIPO | Controller Input, peripheral Output | Ce fil sert à envoyer des données du périphérique au contrôleur. |
| SCLK | Serial Clock | Ce fil envoie un signal d'horloge à un rythme défini par le contrôleur. |
| CS | Chip Select | Le contrôleur comporte plusieurs fils, un par périphérique, et chaque fil se connecte au fil CS du périphérique correspondant. |
![SPI with on controller and two peripherals](../../../images/spi.png)
![SPI avec un contrôleur et deux périphériques](../../../../images/spi.png)
The CS wire is used to activate one peripheral at a time, communicating over the COPI and CIPO wires. When the controller needs to change peripheral, it deactivates the CS wire connected to the currently active peripheral, then activates the wire connected to the peripheral it wants to communicate with next.
Le fil CS est utilisé pour activer un périphérique à la fois, en communiquant par les fils COPI et CIPO. Lorsque le contrôleur doit changer de périphérique, il désactive le fil CS connecté au périphérique actuellement actif, puis active le fil connecté au périphérique suivant avec lequel il veut communiquer.
SPI is *full-duplex*, meaning the controller can send and receive data at the same time from the same peripheral using the COPI and CIPO wires. SPI uses a clock signal on the SCLK wire to keep the devices in sync, so unlike sending directly over UART it doesn't need start and stop bits.
SPI est *full-duplex*, ce qui signifie que le contrôleur peut envoyer et recevoir des données en même temps depuis le même périphérique en utilisant les fils COPI et CIPO. SPI utilise un signal d'horloge sur le fil SCLK pour garder les périphériques synchronisés, donc contrairement à l'envoi direct sur UART, il n'a pas besoin de bits de départ et d'arrêt.
There are no defined speed limits for SPI, with implementations often able to transmit multiple megabytes of data per second.
Il n'y a pas de limites de vitesse définies pour SPI, les implémentations étant souvent capables de transmettre plusieurs mégaoctets de données par seconde.
IoT developer kits often support SPI over some of the GPIO pins. For example, on a Raspberry Pi you can use GPIO pins 19, 21, 23, 24 and 26 for SPI.
Les kits de développement IoT prennent souvent en charge SPI sur certaines des broches GPIO. Par exemple, sur un Raspberry Pi, vous pouvez utiliser les broches GPIO 19, 21, 23, 24 et 26 pour SPI.
### Wireless
### Sans fil
Some sensors can communicate over standard wireless protocols, such as Bluetooth (mainly Bluetooth Low Energy, or BLE), LoRaWAN (a **Lo**ng **Ra**nge low power networking protocol), or WiFi. These allow for remote sensors not physically connected to an IoT device.
Certains capteurs peuvent communiquer via des protocoles sans fil standard, tels que Bluetooth (principalement Bluetooth Low Energy, ou BLE), LoRaWAN (un protocole de réseau **Lo**ng **Ra**nge à faible consommation) ou WiFi. Ceux-ci permettent d'utiliser des capteurs distants qui ne sont pas physiquement connectés à un dispositif IoT.
One such example is in commercial soil moisture sensors. These will measure soil moisture in a field, then send the data over LoRaWan to a hub device, which will process the data or send it over the Internet. This allows the sensor to be away from the IoT device that manages the data, reducing power consumption and the need for large WiFi networks or long cables.
Les capteurs commerciaux d'humidité du sol en sont un exemple. Ceux-ci vont mesurer l'humidité du sol dans un champ, puis envoyer les données sur LoRaWan à un dispositif hub, qui va traiter les données ou les envoyer sur Internet. Cela permet au capteur d'être éloigné du dispositif IoT qui gère les données, ce qui réduit la consommation d'énergie et la nécessité de grands réseaux WiFi ou de longs câbles.
BLE is popular for advanced sensors such as fitness trackers work on the wrist. These combine multiple sensors and send the sensor data to an IoT device in the form of your phone via BLE.
BLE est populaire pour les capteurs avancés tels que les trackers de fitness fonctionnent au poignet. Ceux-ci combinent plusieurs capteurs et envoient les données du capteur à un dispositif IoT sous la forme de votre téléphone via BLE.
Do you have any bluetooth sensors on your person, in your house or in your school? These might include temperature sensors, occupancy sensors, device trackers and fitness devices.
Avez-vous des capteurs Bluetooth sur vous, dans votre maison ou dans votre école ? Il peut s'agir de capteurs de température, de capteurs d'occupation, de traqueurs d'appareils et d'appareils de fitness.
One popular way for commercial devices to connect is Zigbee. Zigbee uses WiFi to form mesh networks between devices, where each device connects to as many nearby devices as possible, forming a large number of connections like a spiders web. When one device wants to send a message to the Internet it can send it to the nearest devices, which then forward it on to other nearby devices and so on, until it reaches a coordinator and can be sent to the Internet.
Zigbee est un moyen populaire de connecter les appareils commerciaux. Zigbee utilise le WiFi pour former des réseaux maillés entre les appareils, où chaque appareil se connecte à autant d'appareils proches que possible, formant un grand nombre de connexions comme une toile d'araignée. Lorsqu'un appareil veut envoyer un message à l'internet, il peut l'envoyer aux appareils les plus proches, qui le transmettent ensuite à d'autres appareils proches et ainsi de suite, jusqu'à ce qu'il atteigne un coordinateur et puisse être envoyé à l'internet.
> 🐝 The name Zigbee refers to the waggle dance of honey bees after their return to the beehive.
> 🐝 Le nom Zigbee fait référence à la danse de l'agitation des abeilles à miel après leur retour à la ruche.
## Measure the moisture levels in soil
## Mesurer les niveaux d'humidité dans le sol
You can measure the moisture level in soil using a soil moisture sensor, an IoT device, and a house plant or nearby patch of soil.
Vous pouvez mesurer le niveau d'humidité du sol à l'aide d'un capteur d'humidité du sol, d'un dispositif IoT et d'une plante d'intérieur ou d'une parcelle de terre à proximité.
### Task - measure soil moisture
### Tâche - mesurer l'humidité du sol
Work through the relevant guide to measure soil moisture using your IoT device:
Suivez le guide correspondant pour mesurer l'humidité du sol à l'aide de votre appareil IoT :
* [Arduino - Wio Terminal](wio-terminal-soil-moisture.md)
* [Single-board computer - Raspberry Pi](pi-soil-moisture.md)
* [Single-board computer - Virtual device](virtual-device-soil-moisture.md)
* [Arduino - Terminal Wio](wio-terminal-soil-moisture.fr.md)
* [Ordinateur monocarte - Raspberry Pi](pi-soil-moisture.fr.md)
* [Ordinateur monocarte - Virtuel](virtual-device-soil-moisture.fr.md)
## Sensor calibration
## Étalonnage du capteur
Sensors rely on measuring electrical properties such as resistance or capacitance.
Les capteurs reposent sur la mesure de propriétés électriques telles que la résistance ou la capacité.
> 🎓 Resistance, measured in ohms (Ω) is how much opposition there is to the electric current travelling through something. When a voltage is applied to a material, the amount of current that passes through it is dependant on the resistance of the material. You can read more on the [electrical resistance page on Wikipedia](https://wikipedia.org/wiki/Electrical_resistance_and_conductance).
> 🎓 La résistance, mesurée en ohms (Ω), est la quantité d'opposition au courant électrique qui traverse quelque chose. Lorsqu'une tension est appliquée à un matériau, la quantité de courant qui le traverse dépend de la résistance du matériau. Vous pouvez en savoir plus sur la page [résistance électrique sur Wikipédia](https://wikipedia.org/wiki/Electrical_resistance_and_conductance).
> 🎓 Capacitance, measured in farads (F), is the ability of a component or circuit to collect and store electrical energy. You can read more on capacitance on the [capacitance page on Wikipedia](https://wikipedia.org/wiki/Capacitance).
> 🎓 La capacité, mesurée en farads (F), est la capacité d'un composant ou d'un circuit à collecter et à stocker l'énergie électrique. Pour en savoir plus sur la capacité, consultez la [page sur la capacité dans Wikipédia](https://wikipedia.org/wiki/Capacitance).
These measurements are not always useful - imagine a temperature sensor that gave you a measurement of 22.5KΩ! Instead the value measured needs to be converted into a useful unit by being calibrated - that is matching the values measured to the quantity measured to allow new measurements to be converted to the right unit.
Ces mesures ne sont pas toujours utiles - imaginez un capteur de température qui vous donne une mesure de 22.5KΩ ! Au lieu de cela, la valeur mesurée doit être convertie en une unité utile en étant étalonnée - c'est-à-dire en faisant correspondre les valeurs mesurées à la quantité mesurée pour permettre aux nouvelles mesures d'être converties dans la bonne unité.
Some sensors come pre-calibrated. For example the temperature sensor you used in the last lesson was already calibrated so that it can return a temperature measurement in °C. In the factory the first sensor created would be exposed to a range of known temperatures and the resistance measured. This would then be used to build a calculation that can convert from the value measured in Ω (the unit of resistance) to °C.
Certains capteurs sont livrés pré-calibrés. Par exemple, le capteur de température que vous avez utilisé dans la dernière leçon a déjà été calibré de façon à pouvoir fournir une mesure de température en °C. En usine, le premier capteur créé est exposé à une gamme de températures connues et la résistance est mesurée. Cette mesure est ensuite utilisée pour élaborer un calcul permettant de convertir la valeur mesurée en Ω (l'unité de résistance) en °C.
> 💁 The formula to calculate resistance from temperature is called the [SteinhartHart equation](https://wikipedia.org/wiki/SteinhartHart_equation).
> 💁 La formule permettant de calculer la résistance à partir de la température est appelée [équation de Steinhart-Hart](https://wikipedia.org/wiki/SteinhartHart_equation).
### Soil moisture sensor calibration
### Étalonnage du capteur d'humidité du sol
Soil moisture is measured using gravimetric or volumetric water content.
L'humidité du sol est mesurée par la teneur en eau gravimétrique ou volumétrique.
* Gravimetric is the weight of water in a unit weight of soil measured, as the number of kilograms of water per kilogram of dry soil
* Volumetric is the volume of water in a unit volume of soil measured, as the number of cubic metres of water per cubic metres of dry soil
* Gravimétrique : le poids de l'eau dans une unité de poids de sol mesurée, comme le nombre de kilogrammes d'eau par kilogramme de sol sec.
* Volumétrique : le volume d'eau dans une unité de volume de sol mesuré en nombre de mètres cubes d'eau par mètre cube de sol sec.
> 🇺🇸 For Americans, because of the consistency of the units, these can be measured in pounds instead of kilograms or cubic feet instead of cubic metres.
> 🇺🇸 Pour les Américains, en raison de la cohérence des unités, on peut les mesurer en livres au lieu de kilogrammes ou en pieds cubes au lieu de mètres cubes.
Soil moisture sensors measure electrical resistance or capacitance - this not only varies by soil moisture, but also soil type as the components in the soil can change its electrical characteristics. Ideally sensors should be calibrated - that is taking readings from the sensor and comparing them to measurements found using a more scientific approach. For example a lab can calculate the gravimetric soil moisture using samples of a specific field taken a few times a year, and these numbers used to calibrate the sensor, matching the sensor reading to the gravimetric soil moisture.
Les capteurs d'humidité du sol mesurent la résistance électrique ou la capacité - celle-ci varie non seulement en fonction de l'humidité du sol, mais aussi du type de sol, car les composants du sol peuvent modifier ses caractéristiques électriques. Idéalement, les capteurs doivent être étalonnés, c'est-à-dire qu'il faut prendre les lectures du capteur et les comparer aux mesures obtenues par une approche plus scientifique. Par exemple, un laboratoire peut calculer l'humidité gravimétrique du sol en utilisant des échantillons d'un champ spécifique prélevés plusieurs fois par an, et ces chiffres sont utilisés pour calibrer le capteur, en faisant correspondre la lecture du capteur à l'humidité gravimétrique du sol.
![A graph of voltage vs soil moisture content](../../../images/soil-moisture-to-voltage.png)
![Un graphique de la tension en fonction de la teneur en humidité du sol](../../../../images/soil-moisture-to-voltage.png)
The graph above shows how to calibrate a sensor . The voltage is captured for a soil sample that is then measured in a lab by comparing the moist weight to the dry weight (by measuring the weight wet, then drying in an oven and measuring dry). Once a few readings have been taken, this can be plotted on a graph and a line fitted to the points. This line can then be used to convert soil moisture sensor readings taken by an IoT device into actual soil moisture measurements.
Le graphique ci-dessus montre comment calibrer un capteur. La tension est capturée pour un échantillon de sol qui est ensuite mesuré dans un laboratoire en comparant le poids humide au poids sec (en mesurant le poids humide, puis en le séchant dans un four et en le mesurant sec). Une fois que quelques mesures ont été effectuées, elles peuvent être reportées sur un graphique et une ligne peut être ajustée aux points. Cette ligne peut ensuite être utilisée pour convertir les lectures du capteur d'humidité du sol prises par un dispositif IoT en mesures réelles de l'humidité du sol.
💁 For resistive soil moisture sensors, the voltage increases as soil moisture increases. For capacitive soil moisture sensors, the voltage decreases as soil moisture increases, so the graphs for these would slope downwards, not upwards.
💁 Pour les capteurs d'humidité du sol résistifs, la tension augmente avec l'humidité du sol. Dans le cas des capteurs d'humidité du sol capacitifs, la tension diminue lorsque l'humidité du sol augmente, de sorte que les graphiques de ces capteurs sont orientés vers le bas et non vers le haut.
![A soil moisture value interpolated from the graph](../../../images/soil-moisture-to-voltage-with-reading.png)
![Une valeur d'humidité du sol interpolée à partir du graphique](../../../../images/soil-moisture-to-voltage-with-reading.png)
The graph above shows a voltage reading from a soil moisture sensor, and by following that to the line on the graph, the actual soil moisture can be calculated.
Le graphique ci-dessus montre une lecture de tension d'un capteur d'humidité du sol, et en suivant cette lecture jusqu'à la ligne du graphique, l'humidité réelle du sol peut être calculée.
This approach means the farmer only needs to get a few lab measurements for a field, then they can use IoT devices to measure soil moisture - drastically speeding up the time to take measurements.
Cette approche signifie que l'agriculteur n'a besoin que d'obtenir quelques mesures de laboratoire pour un champ, puis il peut utiliser des dispositifs IoT pour mesurer l'humidité du sol - ce qui accélère considérablement le temps de prise de mesures.
---
## 🚀 Challenge
## 🚀 Défi
Resistive and capacitive soil moisture sensors have a number of differences. What are these differences, and which type (if any) is the best for a farmer to use? Does this answer change between developing and developed countries?
Les capteurs d'humidité du sol résistifs et capacitifs présentent un certain nombre de différences. Quelles sont ces différences, et quel type (le cas échéant) est le meilleur pour un agriculteur ? Cette réponse change-t-elle entre les pays en développement et les pays développés ?
## Post-lecture quiz
## Quiz post-lecture
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/12)
[Quiz post-lecture](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/12)
## Review & Self Study
## Révision et étude personnelle
Read up on the hardware and protocols used by sensors and actuators:
Renseignez-vous sur le matériel et les protocoles utilisés par les capteurs et les actionneurs :
* [GPIO Wikipedia page](https://wikipedia.org/wiki/General-purpose_input/output)
* [UART Wikipedia page](https://wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter)
* [SPI Wikipedia page](https://wikipedia.org/wiki/Serial_Peripheral_Interface)
* [I<sup>2</sup>C Wikipedia page](https://wikipedia.org/wiki/I²C)
* [Zigbee Wikipedia page](https://wikipedia.org/wiki/Zigbee)
* [GPIO - Wikipedia](https://wikipedia.org/wiki/General-purpose_input/output)
* [UART - Wikipedia](https://wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter)
* [SPI - Wikipedia](https://wikipedia.org/wiki/Serial_Peripheral_Interface)
* [I<sup>2</sup>C - Wikipedia](https://wikipedia.org/wiki/I²C)
* [Zigbee - Wikipedia](https://wikipedia.org/wiki/Zigbee)
## Assignment
## Devoir
[Calibrate your sensor](assignment.md)
[Calibrez votre capteur](assignment.fr.md)

@ -0,0 +1,47 @@
# Calibrez votre capteur
## Instructions
Dans cette leçon, vous avez recueilli les lectures de la sonde d'humidité du sol mesurées sous forme de valeurs comprises entre 0 et 1023. Pour les convertir en valeurs réelles d'humidité du sol, vous devez étalonner votre capteur. Pour ce faire, vous pouvez effectuer des relevés sur des échantillons de sol, puis calculer la teneur en eau gravimétrique du sol à partir de ces échantillons.
Vous devrez répéter ces étapes plusieurs fois pour obtenir les lectures nécessaires, avec une humidité différente du sol à chaque fois.
1. Relevez l'humidité du sol à l'aide du capteur d'humidité du sol. Notez cette mesure.
1. Prenez un échantillon du sol et pesez-le. Notez ce poids.
1. Séchez la terre - un four chaud à 110°C (230°F) pendant quelques heures est le meilleur moyen, vous pouvez le faire à la lumière du soleil, ou le placer dans un endroit chaud et sec jusqu'à ce que la terre soit complètement sèche. Elle doit être poudreuse et meuble.
> 💁 Dans un laboratoire, pour obtenir les résultats les plus précis, vous devez sécher dans un four pendant 48 à 72 heures. Si vous avez des étuves à votre école, voyez si vous pouvez les utiliser pour sécher plus longtemps. Plus le temps est long, plus l'échantillon est sec et plus les résultats sont précis.
1. Pesez à nouveau la terre.
> 🔥 Si vous l'avez séché dans un four, assurez-vous qu'il a d'abord refroidi !
L'humidité gravimétrique du sol est calculée comme suit :
![Le pourcentage d'humidité du sol est le poids humide moins le poids sec, divisé par le poids sec, multiplié par 100](../../../../images/gsm-calculation.png)
* W<sub>humide</sub> - le poids de la terre humide
* W<sub>sec</sub> - le poids du sol sec
Par exemple, disons que vous avez un échantillon de sol qui pèse 212 g humide et 197 g sec.
![Calcul rempli](../../../../images/gsm-calculation-example.png)
* W<sub>humide</sub> = 212g
* W<sub>sec</sub> = 197g
* 212 - 197 = 15
* 15 / 197 = 0.076
* 0.076 * 100 = 7.6%
Dans cet exemple, le sol a une humidité gravimétrique de 7,6 %.
Une fois que vous avez les lectures d'au moins 3 échantillons, tracez un graphique du pourcentage d'humidité du sol par rapport à la lecture du capteur d'humidité du sol et ajoutez la ligne qui correspond le mieux aux points. Vous pouvez ensuite utiliser ce graphique pour calculer la teneur en eau gravimétrique du sol pour une lecture de capteur donnée en lisant la valeur de la ligne.
## Grille d'évaluation
| Critère | Exemple | Adéquat | Nécessite amélioration |
| -------- | --------- | -------- | ----------------- |
| Recueillir les données d'étalonnage | Capturez au moins 3 échantillons d'étalonnage | Capturez au moins 2 échantillons d'étalonnage | Capturez au moins un échantillon d'étalonnage |
| Effectuer une lecture calibrée | Tracez avec succès le graphique d'étalonnage, effectuez une lecture du capteur et convertissez-la en teneur en eau gravimétrique du sol | Tracer avec succès le graphique d'étalonnage | Impossible de tracer le graphique |

@ -0,0 +1,94 @@
# Mesurer l'humidité du sol - Raspberry Pi
Dans cette partie de la leçon, vous allez ajouter un capteur capacitif d'humidité du sol à votre Raspberry Pi, et lire des valeurs à partir de celui-ci.
## Matériel
Le Raspberry Pi a besoin d'un capteur capacitif d'humidité du sol.
Le capteur que vous utiliserez est un [Capteur d'humidité du sol capacitif](https://www.seeedstudio.com/Grove-Capacitive-Moisture-Sensor-Corrosion-Resistant.html). Ce dernier mesure l'humidité du sol en détectant la capacité du sol, une propriété qui change en fonction de l'humidité du sol. Plus l'humidité du sol augmente, plus la tension diminue.
Il s'agit d'un capteur analogique, qui utilise donc une broche analogique et le ADC 10 bits du "Grove Base Hat" sur le Pi pour convertir la tension en un signal numérique de 1 à 1023. Celui-ci est ensuite envoyé sur I<sup>2</sup>C via les broches GPIO du Pi.
### Connecter le capteur d'humidité du sol
Le capteur d'humidité du sol Grove peut être connecté au Raspberry Pi.
#### Tâche - connecter le capteur d'humidité du sol
Connectez le capteur d'humidité du sol.
![Capteur d'humidité du sol d'un bosquet](../../../../images/grove-capacitive-soil-moisture-sensor.png)
1. Insérez une extrémité d'un câble Grove dans la prise du capteur d'humidité du sol. Il ne peut être inséré que dans un seul sens.
1. Lorsque le Raspberry Pi est hors tension, connectez l'autre extrémité du câble Grove à la prise analogique marquée **A0** sur le "Grove Base Hat" fixé au Pi. Cette prise est la deuxième en partant de la droite, sur la rangée de prises à côté des broches GPIO.
![Le capteur d'humidité du sol du bosquet connecté à la prise A0](../../../../images/pi-soil-moisture-sensor.png)
1. Insérez le capteur d'humidité du sol dans le sol. Il est doté d'une " ligne de position la plus élevée ", une ligne blanche qui traverse le capteur. Insérez le capteur jusqu'à cette ligne mais sans la dépasser.
![Le capteur d'humidité du sol The Grove dans le sol](../../../../images/soil-moisture-sensor-in-soil.png)
## Programmer le capteur d'humidité du sol
Le Raspberry Pi peut maintenant être programmé pour utiliser la sonde d'humidité du sol jointe.
### Tâche - programmer le capteur d'humidité du sol
Programmez l'appareil.
1. Allumez le Pi et attendez qu'il démarre.
1. Lancez VS Code, soit directement sur le Pi, soit en vous connectant via l'extension SSH à distance.
> ⚠️ Vous pouvez vous référer [aux instructions pour configurer et lancer VS Code dans la veilleuse - leçon 1 si nécessaire](../../../../1-getting-started/lessons/1-introduction-to-iot/pi.fr.md).
1. Depuis le terminal, créez un nouveau dossier dans le répertoire personnel de l'utilisateur `pi` appelé `soil-moisture-sensor`. Créez un fichier dans ce dossier appelé `app.py`.
1. Ouvrez ce dossier dans VS Code
1. Ajoutez le code suivant au fichier `app.py` pour importer certaines bibliothèques requises :
```python
import time
from grove.adc import ADC
```
L'instruction `import time` importe le module `time` qui sera utilisé plus tard dans ce devoir.
L'instruction `from grove.adc import ADC` importe le `ADC` des bibliothèques Python de Grove. Cette bibliothèque contient du code pour interagir avec le convertisseur analogique-numérique du chapeau de base Pi et lire les tensions des capteurs analogiques.
1. Ajoutez le code suivant en dessous pour créer une instance de la classe `ADC` :
```python
adc = ADC()
```
1. Ajoutez une boucle infinie qui lit depuis cet ADC sur la broche A0, et écrit le résultat sur la console. Cette boucle peut ensuite dormir pendant 10 secondes entre les lectures.
```python
while True:
soil_moisture = adc.read(0)
print("Soil moisture:", soil_moisture)
time.sleep(10)
```
1. Exécutez l'application Python. Vous verrez les mesures d'humidité du sol écrites dans la console. Ajoutez de l'eau au sol ou retirez le capteur du sol et observez le changement de valeur.
```output
pi@raspberrypi:~/soil-moisture-sensor $ python3 app.py
Soil moisture: 615
Soil moisture: 612
Soil moisture: 498
Soil moisture: 493
Soil moisture: 490
Soil Moisture: 388
```
Dans l'exemple de sortie ci-dessus, vous pouvez voir la chute de tension lorsque de l'eau est ajoutée.
> 💁 Vous pouvez trouver ce code dans le dossier [code/pi](../code/pi).
😀 Votre programme de capteurs d'humidité du sol a été un succès !

@ -0,0 +1,109 @@
# Mesurer l'humidité du sol - Matériel IoT Virtuel
Dans cette partie de la leçon, vous allez ajouter un capteur capacitif d'humidité du sol à votre dispositif IoT virtuel, et lire des valeurs à partir de celui-ci.
## Matériel virtuel
Le dispositif IoT virtuel utilisera un capteur d'humidité du sol capacitif Grove simulé. Ainsi, ce laboratoire est identique à l'utilisation d'un Raspberry Pi avec un capteur d'humidité du sol capacitif Grove physique.
Dans un dispositif IoT physique, le capteur d'humidité du sol serait un capteur capacitif qui mesure l'humidité du sol en détectant la capacité du sol, une propriété qui change en fonction de l'humidité du sol. Lorsque l'humidité du sol augmente, la tension diminue.
Il s'agit d'un capteur analogique, qui utilise donc un ADC 10 bits simulé pour rapporter une valeur de 1 à 1023.
### Ajouter le capteur d'humidité du sol à CounterFit
Pour utiliser un capteur d'humidité du sol virtuel, vous devez l'ajouter à l'application CounterFit.
#### Tâche - Ajout du capteur d'humidité du sol à CounterFit
Ajoutez le capteur d'humidité du sol à l'application CounterFit.
1. Créez une nouvelle application Python sur votre ordinateur dans un dossier appelé `soil-moisture-sensor` avec un seul fichier appelé `app.py` et un environnement virtuel Python, et ajoutez les paquets pip de CounterFit.
> ⚠️ Vous pouvez vous référer [aux instructions pour créer et configurer un projet Python CounterFit dans la leçon 1 si nécessaire](../../../../1-getting-started/lessons/1-introduction-to-iot/virtual-device.fr.md).
1. Assurez-vous que l'application web CounterFit est en cours d'exécution.
1. Créez un capteur d'humidité du sol :
1. Dans la case *Create sensor* du volet *Sensors*, déroulez la case *Sensor type* et sélectionnez *Soil Moisture*.
1. Laissez le paramètre *Units* sur *NoUnits*.
1. Assurez-vous que le paramètre *Pin* est réglée sur *0*.
1. Sélectionnez le bouton **Add** pour créer le capteur d'humidité sur la broche 0.
![The soil moisture sensor settings](../../../../images/counterfit-create-soil-moisture-sensor.png)
Le capteur d'humidité du sol sera créé et apparaîtra dans la liste des capteurs.
![Le capteur d'humidité du sol a créé](../../../../images/counterfit-soil-moisture-sensor.png)
## Programmez l'application du capteur d'humidité du sol
L'application du capteur d'humidité du sol peut maintenant être programmée en utilisant les capteurs CounterFit.
### Tâche - programmer l'application du capteur d'humidité du sol
Programmez l'application du capteur d'humidité du sol.
1. Assurez-vous que l'application "Soil-Moisture-Sensor" est ouverte dans VS Code.
1. Ouvrez le fichier `app.py`.
1. Ajoutez le code suivant au début de `app.py` pour connecter l'application à CounterFit :
```python
from counterfit_connection import CounterFitConnection
CounterFitConnection.init('127.0.0.1', 5000)
```
1. Ajoutez le code suivant au fichier `app.py` pour importer certaines bibliothèques requises :
```python
import time
from counterfit_shims_grove.adc import ADC
```
L'instruction `import time` importe le module `time` qui sera utilisé plus tard dans ce devoir.
L'instruction `from counterfit_shims_grove.adc import ADC` importe la classe `ADC` pour interagir avec un convertisseur analogique-numérique virtuel qui peut se connecter à un capteur CounterFit.
1. Ajoutez le code suivant en dessous pour créer une instance de la classe `ADC` :
```python
adc = ADC()
```
1. Ajoutez une boucle infinie qui lit à partir de cet ADC sur la broche 0 et écrit le résultat sur la console. Cette boucle peut ensuite dormir pendant 10 secondes entre les lectures.
```python
while True:
soil_moisture = adc.read(0)
print("Soil moisture:", soil_moisture)
time.sleep(10)
```
1. Depuis l'application CounterFit, modifiez la valeur de la sonde d'humidité du sol qui sera lue par l'application. Vous pouvez le faire de deux façons :
* Saisissez un nombre dans la case *Value* pour le capteur d'humidité du sol, puis sélectionnez le bouton **Set**. Le nombre que vous saisissez sera la valeur renvoyée par le capteur.
* Cochez la case *Random* et saisissez une valeur *Min* et *Max*, puis sélectionnez le bouton **Set**. Chaque fois que le capteur lit une valeur, il lit un nombre aléatoire entre *Min* et *Max*.
1. Exécutez l'application Python. Vous verrez les mesures d'humidité du sol écrites dans la console. Changez les paramètres *Value* ou *Random* pour voir la valeur changer.
```output
(.venv) ➜ soil-moisture-sensor $ python app.py
Soil moisture: 615
Soil moisture: 612
Soil moisture: 498
Soil moisture: 493
Soil moisture: 490
Soil Moisture: 388
```
> 💁 Vous pouvez trouver ce code dans le [code/virtual-device](../code/virtual-device) folder.
😀 Votre programme de capteurs d'humidité du sol a été un succès !

@ -0,0 +1,103 @@
# Mesurer l'humidité du sol - Terminal Wio
Dans cette partie de la leçon, vous allez ajouter un capteur capacitif d'humidité du sol à votre terminal Wio, et lire des valeurs à partir de celui-ci.
## Matériel
Le terminal Wio a besoin d'un capteur capacitif d'humidité du sol.
Le capteur que vous utiliserez est un [Capteur d'humidité du sol capacitif](https://www.seeedstudio.com/Grove-Capacitive-Moisture-Sensor-Corrosion-Resistant.html), qui mesure l'humidité du sol en détectant la capacité du sol, une propriété qui change en fonction de l'humidité du sol. Plus l'humidité du sol augmente, plus la tension diminue.
Il s'agit d'un capteur analogique, qui se connecte donc aux broches analogiques de la borne Wio, en utilisant un ADC intégré pour créer une valeur de 0-1,023.
### Connecter le capteur d'humidité du sol
Le capteur d'humidité du sol Grove peut être connecté au port analogique/numérique configurable des terminaux Wio.
#### Tâche - connecter le capteur d'humidité du sol
Connectez le capteur d'humidité du sol.
![Capteur d'humidité du sol de type Groove](../../../../images/grove-capacitive-soil-moisture-sensor.png)
1. Insérez une extrémité d'un câble Grove dans la prise du capteur d'humidité du sol. Il ne peut être inséré que dans un seul sens.
1. Le terminal Wio étant déconnecté de votre ordinateur ou de toute autre source d'alimentation, connectez l'autre extrémité du câble Grove à la prise Grove de droite du terminal Wio lorsque vous regardez l'écran. Il s'agit de la prise la plus éloignée du bouton d'alimentation.
![Le capteur d'humidité du sol du bosquet est connecté à la prise de droite](../../../../images/wio-soil-moisture-sensor.png)
1. Insérez le capteur d'humidité du sol dans le sol. Il est doté d'une " ligne de position la plus élevée ", une ligne blanche qui traverse le capteur. Insérez le capteur jusqu'à cette ligne mais sans la dépasser.
![Le capteur d'humidité du sol The Grove dans le sol](../../../../images/soil-moisture-sensor-in-soil.png)
1. Vous pouvez maintenant connecter le terminal Wio à votre ordinateur.
## Programmer le capteur d'humidité du sol
Le terminal Wio peut maintenant être programmé pour utiliser la sonde d'humidité du sol jointe.
### Tâche - programmer le capteur d'humidité du sol
Programmez l'appareil.
1. Créez un tout nouveau projet Wio Terminal en utilisant PlatformIO. Appelez ce projet `soil-moisture-sensor`. Ajoutez du code dans la fonction `setup` pour configurer le port série.
> ⚠️ Vous pouvez vous référer [aux instructions pour créer un projet PlatformIO dans le projet 1, leçon 1 si nécessaire](../../../../1-getting-started/lessons/1-introduction-to-iot/wio-terminal.fr.md).
1. Il n'y a pas de bibliothèque pour ce capteur, à la place vous pouvez lire la broche analogique en utilisant la fonction Arduino intégré [`analogRead`](https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/). Commencez par configurer la broche analogique pour l'entrée afin que les valeurs puissent être lues en ajoutant ce qui suit à la fonction `setup`.
```cpp
pinMode(A0, INPUT);
```
Ceci définit la broche `A0`, la broche combinée analogique/numérique, comme une broche d'entrée sur laquelle la tension peut être lue.
1. Ajoutez ce qui suit à la fonction `loop` pour lire la tension de cette broche :
```cpp
int soil_moisture = analogRead(A0);
```
1. Sous ce code, ajoutez le code suivant pour imprimer la valeur sur le port série :
```cpp
Serial.print("Soil Moisture: ");
Serial.println(soil_moisture);
```
1. Enfin, ajoutez un délai à la fin de 10 secondes :
```cpp
delay(10000);
```
1. Construisez et téléchargez le code sur le terminal Wio.
> ⚠️ Vous pouvez vous référer [aux instructions pour créer un projet PlatformIO dans le projet 1, leçon 1 si nécessaire](../../../../1-getting-started/lessons/1-introduction-to-iot/wio-terminal.fr.md).
1. Une fois téléchargé, vous pouvez surveiller l'humidité du sol à l'aide du moniteur série. Ajoutez un peu d'eau au sol, ou retirez le capteur du sol, et observez le changement de valeur.
```output
> Executing task: platformio device monitor <
--- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at http://bit.ly/pio-monitor-filters
--- Miniterm on /dev/cu.usbmodem1201 9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Soil Moisture: 526
Soil Moisture: 529
Soil Moisture: 521
Soil Moisture: 494
Soil Moisture: 454
Soil Moisture: 456
Soil Moisture: 395
Soil Moisture: 388
Soil Moisture: 394
Soil Moisture: 391
```
Dans l'exemple de sortie ci-dessus, vous pouvez voir la chute de tension lorsque de l'eau est ajoutée.
> 💁 Vous pouvez trouver ce code dans le fichier [code/wio-terminal](../code/wio-terminal).
😀 Votre programme de capteurs d'humidité du sol a été un succès !

@ -14,7 +14,7 @@ This is an analog sensor, so uses a simulated 10-bit ADC to report a value from
To use a virtual soil moisture sensor, you need to add it to the CounterFit app
#### Task - dd the soil moisture sensor to CounterFit
#### Task - Add the soil moisture sensor to CounterFit
Add the soil moisture sensor to the CounterFit app.
@ -32,7 +32,7 @@ Add the soil moisture sensor to the CounterFit app.
1. Ensure the *Pin* is set to *0*
1. Select the **Add** button to create the humidity sensor on Pin 0
1. Select the **Add** button to create the *Soil Moisture* sensor on Pin 0
![The soil moisture sensor settings](../../../images/counterfit-create-soil-moisture-sensor.png)

@ -1,5 +1,3 @@
[![French](https://img.shields.io/badge/-French-purple)](translations/README.fr.md)
# Agriculture et IoT
Les besoins en agriculture augmentent avec la croissance de la popualtion. La quantité de terres disponible ne change pas, bien que le climat lui, change. Ceci amène des défits de plus en plus importants aux fermiers, plus particulièrement pour les 2 milliards de [fermiers de subsistance](https://wikipedia.org/wiki/Subsistence_agriculture) qui dépendent de cette production afin de se nourrir ainsi que leur famille. Les technologies des objets connectés ont le potentiel d'aider ces fermiers à faire de meilleures décisions sur la production, notemment quoi faire pousser, quand récolter, accroître les récoltes, réduire la main d'oeuvre ou encore détecter et gérer les parasites.

@ -416,10 +416,11 @@ Earlier in this lesson you used curl to query a geofence to see if a point was l
The items in the `params` dictionary will match the key value pairs you used when calling the web API via curl.
1. Add the following line of code to call the web API:
1. Add the following lines of code to call the web API:
```python
response = requests.get(url, params=params)
response_body = json.loads(response.text)
```
This calls the URL with the parameters, and gets back a response object.

@ -1,9 +0,0 @@
# Dummy File
This file acts as a placeholder for the `translations` folder. <br>
**Please remove this file after adding the first translation**
For the instructions, follow the directives in the [translations guide](https://github.com/microsoft/IoT-For-Beginners/blob/main/TRANSLATIONS.md) .
## THANK YOU
We truly appreciate your efforts!

@ -0,0 +1,175 @@
# IoT ডিভাইস ব্যবহার করে ফল এর মান যাচাই
![A sketchnote overview of this lesson](../../../../sketchnotes/lesson-16.jpg)
> স্কেচনোটটি তৈরী করেছেন [Nitya Narasimhan](https://github.com/nitya)। বড় সংস্করণে দেখার জন্য ছবিটিতে ক্লিক করতে হবে।
## লেকচার-পূর্ববর্তী কুইজ
[লেকচার-পূর্ববর্তী কুইজ](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/31)
## সূচনা
পূর্ববর্তী লেসন এ আমরা ইমেজ ক্লাসিফায়ার নিয়ে জানলাম এবং আরো জেনেছি কিভাবে তাদেরকে প্রশিক্ষিত (train) করা যায় ভাল এবং খারাপ ফল সনাক্ত করার জন্য। এই ইমেজ ক্লাসিফায়ার IoT এপ্লিকেশন এ ব্যবহার করতে আমাদেরকে কোনো ধরনের ক্যামেরা দিয়ে ইমেজ ক্যাপচার করতে হবে এবং সেই ইমেজটি ক্লাউড এ পাঠাতে হবে।
এই লেসন এ আমরা ক্যামেরা সেন্সর নিয়ে জানবো এবং কিভাবে এগুলোকে IoT ডিভাইস এর সাথে ব্যবহার করে ইমেজ ক্যাপচার করতে হয় তা শিখবো। এছাড়াও আমরা দেখবো কিভাবে ইমেজ ক্লাসিফায়ারকে IoT ডিভাইস থেকে কল করতে হয়।
এই লেসন এ আমরা কভার করবোঃ
* [ক্যামেরা সেন্সর](#ক্যামেরা-সেন্সর)
* [IoT ডিভাইস ব্যবহার করে ইমেজ ক্যাপচার করা](#IoT-ডিভাইস-ব্যবহার-করে-ইমেজ-ক্যাপচার-করা)
* [আমাদের ইমেজ ক্লাসিফায়ার পাবলিশ করি](#আমাদের-ইমেজ-ক্লাসিফায়ার-পাবলিশ-করি)
* [IoT ডিভাইস থেকে ইমেজ ক্লাসিফাই করা](#IoT-ডিভাইস-থেকে-ইমেজ-ক্লাসিফাই-করা)
* [Model উন্নত করা](#Model-উন্নত-করা)
## ক্যামেরা সেন্সর
ক্যামেরা সেন্সর, তার নামের মতই এমন ক্যামেরা যা IoT ডিভাইস এর সাথে কানেক্ট করা যায়। এগুলো স্থিরচিত্র অথবা স্ট্রিমিং ভিডিও ক্যাপচার করতে পারে, কিছু ডিভাইস গুলো মূল ইমেজ ডাটা ফেরত পাঠাই , বাকি গুলো ইমেজ ডাটা কমপ্রেস করে JPEG অথবা PNG টাইপ এর ইমেজ ফাইল বানাবে। সাধারণত যে কামেরা গুলো IoT ডিভাইস গুলোর সাথে ব্যবহার করা হয় আমরা যেগুলো ব্যবহার করে অভ্যস্ত সেগুলো থেকে অনেক ছোট সাইজ এর এবং কম রেজোলিউশান এর, কিন্তু আমরা হাই রেজোলিউশান এর ক্যামেরা নিতে পারি যেগুলো আধুনিক ফোন গুলার সাথে টেক্কা দেয়। আমরা সব ধরনের ইন্টারচেঞ্জেবল লেন্স, কয়েকটা ক্যামেরা সেটাপ, ইনফ্রারেড থার্মাল ক্যামেরা অথবা ইউভি ক্যামেরা নিতে পারি।
![The light from a scene passes through a lens and is focused on a CMOS sensor](../../../../images/cmos-sensor.png)
বেশিরভাগ ক্যামেরা সেন্সর ইমেজ সেন্সর ব্যবহার করে যেখানে প্রত্যেক পিক্সেল হল ফটোডায়োড। একটা লেন্স ইমেজ সেন্সর এর উপর ইমেজ টাকে ফোকাস করে এবং হাজার অথবা লক্ষ লক্ষ ফটোডায়োড প্রত্যেকে তার উপর আপতিত আলো ডিটেক্ট করে এবং পিক্সেল ডাটা হিসাবে রেকর্ড করে।
> 💁 লেন্স ইমেজ কে উল্টায়, পরে ক্যামেরা সেন্সর আবার ঠিক ভাবে ইমেজটাকে উল্টায়। ঠিক একই রকম আমাদের চোখে হয় - আমরা যা দেখি তা চোখের পিছনে উল্টো ভাবে ডিটেক্ট করে এবুং ব্রেন সেটাকে ঠিক করে।
> 🎓 ইমেজ সেন্সরটা একটিভ-পিক্সেল সেন্সর (APS) হিসেবে পরিচিত, এবং সবচেয়ে জনপ্রিয় টাইপ এর APS হল কমপ্লিমেন্টারি মেটাল-অক্সাইড সেমিকন্ডাক্টর সেন্সর, অথবা CMOS। আমরা শুনে থাকতে পারি ক্যামেরা সেন্সর এ CMOS সেন্সর ব্যবহার এর টার্ম টা।
ক্যামেরা সেন্সর হল ডিজিটাল সেন্সর , ইমেজ ডাটা কে ডিজিটাল ডাটা হিসেবে পাঠায়, সাধারণত যে লাইব্রেরি কমিউনিকেশন প্রদান করে তার সাহায্য নিয়ে, ক্যামেরা গুলো কানেক্ট করে SPI এর মত প্রোটকল ব্যবহার করে যা তাদের বড় পরিমাণে ডাটা পাঠাতে অনুমোদন দেয় - ইমেজ গুলো temperature সেন্সর এর মত সেন্সর থেকে পাওয়া সিংগেল নাম্বার থেকে যথেষ্ট পরিমাণে বড়।
✅ IoT ডিভাইস গুলোর ইমেজ সাইজ এর সীমাবদ্ধতা কি কি? সীমাবদ্ধতাগুলো চিন্তা করি বিশেষ করে মাইক্রোকন্ট্রোলার হার্ডওয়ার এর উপর।
## IoT ডিভাইস ব্যবহার করে ইমেজ ক্যাপচার করা
আমরা আমাদের IoT ডিভাইস ক্যাপচার এবং ইমেজ ক্লাসিফাই করতে ব্যবহার করতে পারি।
### কাজ - IoT ডিভাইস ব্যবহার করে ইমেজ ক্যাপচার করা
নিম্নের কোন একটি প্রাসঙ্গিক গাইড এর মাধ্যমে IoT ডিভাইস ব্যবহার করে ইমেজ ক্যাপচার করিঃ
* [Arduino - Wio Terminal](../wio-terminal-camera.md)
* [Single-board computer - Raspberry Pi](../pi-camera.md)
* [Single-board computer - Virtual device](../virtual-device-camera.md)
## আমাদের ইমেজ ক্লাসিফায়ার পাবলিশ করি
আমরা শেষ লেসন এ ইমেজ ক্লাসিফায়ার ট্রেন করেছিলাম। IoT ডিভাইস এটা ব্যবহার করার আগে, আমাদের model তা পাবলিশ করতে হবে।
### Model Iteration
যখন আমাদের মডেলে শেষ লেসন এ ট্রেনিং হচ্ছিলো, আমরা হয়ত খেয়াল করছিলাম যে **Performance** ট্যাব সাইড এ Iteration গুলো দেখায়। যখন আমরা প্রথম model টা ট্রেন করি তখন আমরা দেখে থাকতে পারি *Iteration 1* ট্রেইনিং এ। যখন আমরা model টাকে প্রেডিকশন ইমেজ ব্যবহার করে আরো উন্নত করি, তখন আমরা দেখে থাকতে পারি *Iteration 2* ট্রেইনিং এ।
প্রতেকবার আমরা যখন model টাকে ট্রেইন করি, আমরা নতুন Iteration পাই। এভাবে আমরা বিভিন্ন ডাটাসেট এর উপর ট্রেইন করা আমাদের model এর বিভিন্ন ভার্সন ট্র্যাক করতে পারি। যখন আমরা **Quick Test** করি, এখানে আমরা Iteration সিলেক্ট করার একটি ড্রপডাউন মেনু পাই, যেন আমরা বিভিন্ন Iteration এর রেজাল্ট তুলনা করতে পারি।
যখন আমরা একটি Iteration নিয়ে সন্তুষ্ট হই, আমরা এটাকে পাবলিশ করতে পারি এক্সটার্নাল এপ্লিকেশন থেকে ব্যবহার সহজলভ্য করার জন্য। এভাবে আমরা আমাদের ডিভাইস দিয়ে ব্যবহার করা একটি পাবলিক ভার্সন পেতে পারি, পরে আরো নতুন কিছু Iteration এর উপর নতুন ভার্সন নিয়ে কাজ করতে পারি, পরে যখন আমরা এটা নিয়ে সন্তুষ্ট হব তখন এটা পাবলিশ করতে পারি।
### কাজ - Iteration পাবলিশ করা
Iteration গুলো কাস্টম ভিসন পোর্টাল থেকে পাবলিশ করতে হয়।
1. [CustomVision.ai](https://customvision.ai) তে কাস্টম ভিসন পোর্টাল লঞ্চ করি এবং সাইন ইন করি যদি ইতিমধ্যে এটা খুলে না থাকি। পরে আমাদের `fruit-quality-detector` প্রোজেক্ট খুলি।
1. উপরের অপশন থেকে **Performance** ট্যাব সিলেক্ট করি।
1. সাইড এর *Iterations* লিস্ট থেকে সর্বশেষ Iteration সিলেক্ট করি।
1. Iteration এর জন্য **Publish** বাটন সিলেক্ট করি।
![The publish button](../../../../images/custom-vision-publish-button.png)
1. *Publish Model* ডায়লগ এ, *Prediction resource* এ আগের লেসন এ আমাদের তৈরি রিসোর্স `fruit-quality-detector-prediction` সেট করি। নাম হিসেবে `Iteration2` রাখি, এবং **Publish** বাটন সিলেক্ট করি।
1. একবার পাবলিশ করা হলে, **Prediction URL** বাটন সিলেক্ট করি। এটা প্রেডিকশন এপিআই এর ডিটেলস দেখাবে, এবং আমাদের IoT ডিভাইস থেকে model কে কল করতে এগুলো দরকার হবে। নিচের সেকশন কে *If you have an image file* হিসেবে লেবেল করা এবং এই ডিটেইল গুলো আমরা চাই। দেখানো URL এর কপি করি যেটা কিছু টা এরকম হবেঃ
```output
https://<location>.api.cognitive.microsoft.com/customvision/v3.0/Prediction/<id>/classify/iterations/Iteration2/image
```
যেখানে `<location>` হবে কাস্টম ভিসন পোর্টাল রিসোর্স তৈরি করার সময় ব্যবহার করা লোকেশন, এবং `<id>` হবে অনেকগুলো লেটার এবং নাম্বার দিয়ে তৈরি করা লম্বা আইডি।
এছাড়াও *Prediction-Key* ভ্যালু এর একটি কপি নিই। এটা একটি সিকিউরড কী (KEY) যেটা model কে কল করার সময় পাস করা হয়। শুধুমাত্র যে আপ্লিকেশন গুলো এই কি পাস করবে তাদেরকে model টা ব্যবহার করতে দেয়া হবে, অন্য সব আপ্লিকেশন কে প্রত্যাখ্যান হবে।
![The prediction API dialog showing the URL and key](../../../../images/custom-vision-prediction-key-endpoint.png)
✅ যখন একটি নতুন Iteration পাবলিশ করা হয়, তখন এটার অন্য নাম থাকে। IoT ডিভাইস এর ব্যবহার করা Iteration আমরা কিভাবে পরিবর্তন করা যায় সেটা আমরা কিভাবে চিন্তা করতে পারি।
## IoT ডিভাইস থেকে ইমেজ ক্লাসিফাই করা
আমরা এখন এই কানেকশন ডিটেইলস গুলো IoT ডিভাইস থেকে ইমেজ ক্লাসিফায়ার কল করার জন্য ব্যবহার করতে পারি।
### কাজ - আমাদের IoT ডিভাইস থেকে ইমেজ ক্লাসিফাই করা
প্রাসঙ্গিক গাইড এর মাধ্যমে কাজ IoT ডিভাইস ব্যবহার করে ইমেজ ক্যাপচার করিঃ
* [Arduino - Wio Terminal](../wio-terminal-classify-image.md)
* [Single-board computer - Raspberry Pi/Virtual IoT device](../single-board-computer-classify-image.md)
## Model উন্নত করা
আমরা যেনে থাকতে পারি যে, IoT ডিভাইস এর সাথে কানেক্টেড থাকা ক্যামেরা থেকে আমরা আশানুরূপ রেজাল্ট নাও পেতে পারি। আমাদের কম্পিউটার থেকে আপলোড করা ইমেজ ব্যবহার করা প্রেডিকশন গুলো সবসময় সঠিক হয় না। এটার কারন হল Model যে ডাটার উপর ট্রেইন করা হয়েছে তার থেকে ভিন্ন ডাটা প্রেডিকশন এর জন্য ব্যবহার করা।
ইমেজ ক্লাসিফায়ার থেকে সবচেয়ে ভাল রেজাল্ট এর জন্য, আমরা প্রেডিকশন এর জন্য ব্যবহার করা ইমেজ এর মত যথাসম্ভব অনুরূপ ইমেজ উপর আমাদের model ট্রেইন করতে চাবো। উদাহরণ স্বরূপ, আমরা যদি ট্রেইনিং এর ইমেজ ক্যাপচার এর জন্য ফোন ক্যামেরা ব্যবহার করি, সেটার ইমেজ কোয়ালিটি, শার্পনেস, এবং কালার একট IoT ডিভাইস এর সাথে কানেক্টেড ক্যামেরা থেকে ভিন্ন হবে।
![2 banana pictures, a low resolution one with poor lighting from an IoT device, and a high resolution one with good lighting from a phone](../../../../images/banana-picture-compare.png)
উপরের ইমেজ এ, বামের কলার ছবি একটি রাস্পবেরি পাই ক্যামেরা থেকে নেয়া হয়েছিল, ডানের টা একই কলার ছবি আইফোন ক্যামেরা থেকে নেয়া হয়েছিল। এখানের কোয়ালিটির দিক থেকে লক্ষণীয় ভিন্নতা আছে - আইফোন এর ছবি টা শার্পার, উজ্জ্বল কালার সহ এবং বেশি কন্ট্রাস্ট এর।
✅ আমাদের IoT ডিভাইস দিয়ে ক্যাপচার করা ইমেজ এর ভুল প্রেডিকশন এর জন্য আর কি কি কারন থাকতে পারে? একটা IoT ডিভাইস যে পরিবেশে ব্যবহার করা হতে পারে সেটা নিয়ে চিন্তা করি, কি কি ফ্যাক্টর ক্যাপচার করা ইমেজ কে প্রভাবিত করতে পারে।
মডেল কে উন্নত করার জন্য, আমরা IoT ডিভাইস থেকে ক্যাপচার করা ইমেজ দিয়ে রিট্রেইন করতে পারি।
---
### কাজ - মডেল উন্নত করা
1. আমাদের IoT ডিভাইস দিয়ে পাকা এবং কাঁচা ফলের কিছু ইমেজ ক্লাসিফাই করি।
1. কাস্টম ভিসন পোর্টাল এ, *Predictions* ট্যাব এর ইমেজ ব্যবহার করে রিট্রেইন করি।
> ⚠️আমরা [এই সিরিজের ১ম লেসন থেকে ক্লাসিফায়ার retain করার জন্য প্রয়োজনীয় নির্দেশনা](../1-train-fruit-detector/README.md#retrain-your-image-classifier) দেখতে পারি, যদি প্রয়োজন হয়।
1. যদি আমাদের ইমেজ ট্রেইনিং এ ব্যবহার করা আসল ইমেজ থেকে দেখতে অনেক ভিন্ন হয়, আমরা আসল ইমেজ গুলো *Training Images* ট্যাব সিলেক্ট করে এবং **Delete** বাটন সিলেক্ট করে ডিলিট করতে পারি। ইমেজ সিলেক্ট করার জন্য, আমাদের কার্সর তা এর উপর মুভ করি এবং একটি টিক আসবে, টিক টা সিলেক্ট অথবা ডিসিলেক্ট করি ইমেজ সিলেক্ট অথবা ডিসিলেক্ট করার জন্য।
1. একটি নতুন Iteration ট্রেইন করি এবং উপরের ধাপ ব্যবহার করে পাবলিশ করি।
1. আমাদের কোড এর endpoint URL আপডেট করি, এবং অ্যাপ তা পুনরায় রান করি।
1. প্রেডিকশন এর রেসাল্ট নিয়ে সন্তুষ্ট না হওয়া পর্যন্ত এই ধাপ গুলো Iteration করি।
---
## 🚀 চ্যালেঞ্জ
ইমেজ এর রেজোলিউশন অথবা আলোর উপস্থিতি এখানে প্রেডিকশন কে কতটুকু প্রভাবিত করে?
আমাদের ডিভাইস এর কোড এ ইমেজ এর রেজোলিউশন পরিবর্তন করার চেষ্টা করি এবং দেখি এটা ইমেজ এর কোয়ালিটি তে কোন পার্থক্য আনে কিনা। এছাড়াও আলো চেঞ্জ করেও চেষ্টা করে দেখতে পারি।
যদি আমরা এই প্রোডাকশন ডিভাইসটি কোন ফার্ম অথবা ফ্যাক্টরি তে বিক্রয়ের জন্য তৈরী করি, আমরা কিভাবে নিশ্চিত করতে পারি যে এটা সব সময় ধারাবাহিকভাবে ভালো ফলাফল দিবে?
## লেকচার-পরবর্তী কুইজ
[লেকচার-পরবর্তী কুইজ](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/32)
## রিভিউ ও স্ব-অধ্যয়ন
আমরা আমাদের কাস্টম ভিসন মডেল পোর্টাল ব্যবহার করে ট্রেইন করেছি। এটা ইমেজ এর সহজলভ্যতার উপর নির্ভর করে - এবং বাস্তব জগতে আমরা আমাদের ক্যামেরা ডিভাইস এর সাথে মিলে এমন ট্রেইনিং ডাটা হয়ত পাবো না। আমরা এটার বদলে আমাদের ডিভাইস থেকে সরাসরি ট্রেইনিং করতে পারি করতে এপিআই ব্যবহার করে, IoT ডিভাইস থেকে ক্যাপচার করা ইমেজ দিয়ে মডেল ট্রেইন করার জন্য।
* ট্রেইনিং এপিআই সম্পর্কে আরো জানতে [using the Custom Vision SDK quick start](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/quickstarts/image-classification?WT.mc_id=academic-17441-jabenn&tabs=visual-studio&pivots=programming-language-python) দেখতে পারি।
## এসাইনমেন্ট
[ক্লাসিফিকেশন রেজাল্টের প্রতিক্রিয়া জানানো](assignment.bn.md)

@ -0,0 +1,13 @@
# ক্লাসিফিকেশন রেজাল্টের প্রতিক্রিয়া জানানো
## নির্দেশাবলী
আমাদের ডিভাইস ইমেজ ক্লাসিফাই করেছে, এবং প্রেডিকশনের মান গুলো আছে। আমাদের ডিভাইস এই তথ্য গুলো দিয়ে কিছু করতে পারে - এটা প্রসেসিং এর জন্য IoT Hub এ পাঠাতে পারে অন্য সিস্টেম গুলো দিয়ে, অথবা এটা একটা actuator কন্ট্রোল করতে পারে যেমন LED আলোকিত হবে যখন ফল কাঁচা।
আমাদের ডিভাইস এ আমাদের মত করে প্রতিক্রিয়া জানাতে পারে এমন ভাবে কোড করি - হয় IoT Hub এ ডাটা পাঠাবে , actuator কন্ট্রোল করবে, অথবা দুটো কে একত্রিত করবে এবং IoT Hub এ ডাটা পাঠাবে কিছু সার্ভারলেস কোড দিয়ে যেটা নির্ধারণ করবে ফল টা পাকা নাকি না এবং actuator কন্ট্রোল করার একটি কমান্ড ফেরত পাঠাবে।
## এসাইনমেন্ট মূল্যায়ন মানদন্ড
| ক্রাইটেরিয়া | দৃষ্টান্তমূলক (সর্বোত্তম) | পর্যাপ্ত (মাঝারি) | উন্নতি প্রয়োজন (নিম্নমান) |
| --------- | ------------------ | -------------- | -------------------- |
| প্রেডিকশনের প্রতিক্রিয়া জানানো | প্রেডিকশনের প্রতিক্রিয়া বাস্তবায়ন করতে পেরেছে যেটা একই মানের প্রেডিকশনের সাথে ধারাবাহিকভাবে ভাবে কাজ করতে পারে | প্রেডিকশনের উপর নির্ভরশীল না এমন প্রতিক্রিয়া বাস্তবায়ন করতে পেরেছে, যেমন IoT Hub এ মূল ডাটা প্রেরণ করতে পারে| ডিভাইস টাকে প্রেডিকশনের প্রতিক্রিয়া দেখানোর প্রোগ্রাম করতে পারে নাই |

@ -1,9 +0,0 @@
# Dummy File
This file acts as a placeholder for the `translations` folder. <br>
**Please remove this file after adding the first translation**
For the instructions, follow the directives in the [translations guide](https://github.com/microsoft/IoT-For-Beginners/blob/main/TRANSLATIONS.md) .
## THANK YOU
We truly appreciate your efforts!

@ -0,0 +1,615 @@
# Edge এ Fruit Detector পরিচালনা করা
![A sketchnote overview of this lesson](../../../../sketchnotes/lesson-17.jpg)
> স্কেচনোটটি তৈরী করেছি [Nitya Narasimhan](https://github.com/nitya)। বড় সংস্করণে দেখার জন্য ছবিটিতে ক্লিক করতে হবে।
এই ভিডিওটি আইওটি ডিভাইসে চলমান ইমেজ ক্লাসিফায়ারগুলির একটি সংক্ষিপ্ত বিবরণ দেয়, যে বিষয়টি এই পাঠেই অন্তর্ভুক্ত।
[![Custom Vision AI on Azure IoT Edge](https://img.youtube.com/vi/_K5fqGLO8us/0.jpg)](https://www.youtube.com/watch?v=_K5fqGLO8us)
> 🎥 উপরের ছবিতে ক্লিক করে ভিডিওটি দেখে নিই
## লেকচার-পূর্ববর্তী কুইজ
[লেকচার-পূর্ববর্তী কুইজ](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/33)
## সূচনা
গত পাঠে আমরা পাকা এবং কাঁচা ফলের শ্রেণিবিন্যাস করতে ইমেজ ক্লাসিফায়ার ব্যবহার করেছি, ইন্টারনেটে আমাদের আইওটি ডিভাইসে ক্যামেরা দ্বারা ধারণ করা একটি ছবি ক্লাউড সার্ভিসে পাঠিয়েছি। এই কাজগুলি হতে সময় নেয়, অর্থ ব্যয় হয় এবং আমরা যে ধরণের ছবি ব্যবহার করছি, তার উপর নির্ভর করে গোপনীয়তা সুংক্রান্ত বিষয়ের প্রভাব থাকতে পারে।
এই পাঠে আমরা শিখবো কিভাবে মেশিন লার্নিং (এমএল) মডেলগুলি Edge এ চালানো যায় - ক্লাউডের পরিবর্তে আমাদের নিজের নেটওয়ার্কে চলমান আইওটি ডিভাইসে। আমরা ক্লাউড কম্পিউটিং বনাম Edge কম্পিউটিং এর সুবিধা এবং অসুবিধা সম্বন্ধে জানবো, কিভাবে আমাদের AI মডেলকে Edge এ স্থাপন করবো এবং কিভাবে আমাদের IoT ডিভাইস থেকে এটি অ্যাক্সেস করবো সেটিও দেখবো।
এই পাঠে আমরা শিখবো :
* [Edge computing](#edge-computing)
* [Azure IoT Edge](#Azure-IoT-Edge)
* [IoT Edge device রেজিস্টার করা](#IoT-Edge-device-রেজিস্টার-করা)
* [IoT Edge device সেটাপ করা](#IoT-Edge-device-সেটাপ-করা)
* [মডেল এক্সপোর্ট করা](#মডেল-এক্সপোর্ট-করা)
* [ডেপ্লয়মেন্টের জন্য কন্টেইনার প্রস্তুতকরণ](#ডেপ্লয়মেন্টের-জন্য-কন্টেইনার-প্রস্তুতকরণ)
* [কন্টেইনার ডেপ্লয় করা](#কন্টেইনার-ডেপ্লয়-করা)
* [আমাদের IoT Edge device ব্যবহার করা](#আমাদের-IoT-Edge-device-ব্যবহার-করা)
## Edge computing
Edge কম্পিউটিংয়ের ধারণা টি এমন যে যেখানে ডেটা তৈরী বা যেখান থেকেই গৃহীত হয়, সেখানকার কাছাকাছি ডেটা প্রসেস করতে পারা। ক্লাউডে এই প্রসেসিং এর পরিবর্তে, এটি ক্লাউডের Edge এ স্থানান্তরিত হয় - যেটি কিনা আমাদের অভ্যন্তরীণ নেটওয়ার্ক।
![An architecture diagram showing internet services in the cloud and IoT devices on a local network](../../../../images/cloud-without-edge.png)
এ পর্যন্ত পাঠগুলিতে আমরা শিখেছি কীভাবে আমাদের কাছের ডিভাইসগুলি তথ্য সংগ্রহ এবং ক্লাউডে ডেটা পাঠানোর জন্য বিশ্লেষণ করে, ক্লাউডে সার্ভারহীন ফাংশন বা এআই মডেল কীভাবে চালানো হয়।
![An architecture diagram showing IoT devices on a local network connecting to edge devices, and those edge devices connect to the cloud](../../../../images/cloud-with-edge.png)
Edge কম্পিউটিং এ মূলত কিছু ক্লাউড পরিষেবা বা সার্ভিসকে ক্লাউড থেকে সরিয়ে এবং IoT ডিভাইস যে নেটওয়ার্কে চলমান সেই একই নেটওয়ার্কের কোন কম্পিউটারে নিয়ে আসা। শুধুমাত্র প্রয়োজন হলেই ক্লাউডের সাথে যোগাযোগ করা হবে। উদাহরণস্বরূপ, আমরা কোন ফল পাকা কিনা তা বিশ্লেষণ করতে Edge এর ডিভাইসে এআই মডেল চালাতে পারি এবং শুধুমাত্র বিশ্লেষণগুলি ক্লাউডে ফেরত পাঠাতে পারি, যেমন ফলের পাকা বনাম কাঁচা ফলের সংখ্যা।
✅ আমরা এতদিন পর্যন্ত শেখা আইওটি অ্যাপ্লিকেশনগুলি সম্পর্কে চিন্তা করি। তাদের কোন অংশগুলি Edge এ নিয়ে আসা যেতে পারে।
### সুবিধা
Edge কম্পিউটিং এর সুবিধা গুলো হলো:
1. **দ্রততা** - সময়-সংবেদনশীল (time-sensitive) তথ্যের জন্য খুবই সুবিধাজনক কারণ সমগ্র ইন্টারনেট জুড়ে সংযোগ করার পরিবর্তে লোকাল ডিভাইসেই কাজগুলি করা হয়। এটি উচ্চ গতিতে তা করতে সক্ষম হয় কারণ অভ্যন্তরীণ নেটওয়ার্কগুলি ইন্টারনেট সংযোগের তুলনায় যথেষ্ট দ্রুত গতিতে চলতে পারে, যার ডেটা অনেক কম দূরত্বে ভ্রমণ করে।
> 💁 ইন্টারনেট সংযোগের জন্য অপটিক্যাল ক্যাবল ব্যবহার করা হলেও , আলোর গতিতে ডেটা পরিবহণের সুযোগ দেয়া হলেও, ডেটা ক্লাউড প্রোভাইডারদের কাছে পৌছতে সময় নিতে পারে। উদাহরণস্বরূপ, যদি আমরা ইউরোপ থেকে মার্কিন যুক্তরাষ্ট্রে ক্লাউড পরিষেবাদিতে ডেটা পাঠাই তবে অপটিক্যাল ক্যাবলে আটলান্টিক অতিক্রম করতে ডেটার জন্য কমপক্ষে 28ms সময় লাগে (এখানে তাও উপেক্ষা করা হচ্ছে - ট্রান্সঅ্যাটলান্টিক কেবলে ডেটা পাওয়া, বৈদ্যুতিক থেকে আলোকীয় সংকেতে রূপান্তর এবং তারপর আবার অপটিক্যাল ক্যাবল থেকে ক্লাউড প্রোভাইডারের কাছে পৌছানোর মত বিষয়গুলো)।
Edge কম্পিউটিংয়ের জন্য কম নেটওয়ার্ক ট্র্যাফিকের প্রয়োজন হয়, এতে করে ইন্টারনেট সংযোগের সীমিত ব্যান্ডউইথের সমস্যা বা এর মধ্যে যানজটের ফলে আমাদের ডেটা পরিবহন ধীর হওয়ার ঝুঁকি হ্রাস করে।
1. **দূরবর্তী সংযোগ নিয়ন্ত্রণ** - Edge কম্পিউটিং কাজ করে যখন আমাদের কোন ইন্টারনেট সংযোগ থাকেনা বা খুবই সীমিত পর্যায়ের হয়। উদাহরণস্বরূপ যখন পরিবেশগত দূর্যোগ ঘটে, তখন ইন্টারনেটের কোন একসেস থাকেনা।
1. **অল্প খরচ** - Edge ডিভাইসে ডেটা সংগ্রহ, সঞ্চয়, বিশ্লেষণ এবং ট্রিগারিং কার্যক্রম সম্পাদন করা ক্লাউড পরিষেবার ব্যবহার হ্রাস করে যা আমাদের আইওটি অ্যাপ্লিকেশনের সামগ্রিক খরচ কমাতে পারে। Edge কম্পিউটিংয়ের জন্য ডিজাইন করা ডিভাইসে সাম্প্রতিক অনেক উন্নয়ন হয়েছে, সম্প্রতি এআই এক্সিলারেটর বোর্ড যেমন [NVIDIA জেটসন ন্যানো](https://developer.nvidia.com/embedded/jetson-nano-developer-kit) এর আবির্ভাব ঘটেছে, যা GPU-ভিত্তিক হার্ডওয়্যার ব্যবহার করে AI ওয়ার্কলোডগুলি চালাতে পারে যে ডিভাইসগুলির দাম US $100 এরও কম।
1. **গোপনীয়তা এবং নিরাপত্তা** - Edge কম্পিউটিং এর ক্ষেত্রে ডেটা আমাদের নেটওয়ার্কে থাকে এবং ক্লাউডে আপলোড করা হয় না। এটি প্রায়শই সংবেদনশীল এবং ব্যক্তিগতভাবে শনাক্তযোগ্য তথ্যের জন্য অধিকতর কল্যাণজনক। এছাড়াও ডেটা বিশ্লেষণ করার পরে ডেটা সংরক্ষণ করার প্রয়োজন হয় না, যা ডেটা ফাঁসের ঝুঁকি অনেক কমিয়ে দেয়। উদাহরণগুলির মধ্যে রয়েছে মেডিকেল ডেটা এবং সিসিটিভি ক্যামেরা ফুটেজ।
1. **অনিরাপদ ডিভাইসগুলি পরিচালনা করা** - যদি আমাদের জানামতে নিরাপত্তা ত্রুটিযুক্ত কোন ডিভাইস থাকে যা আমরা সরাসরি আমাদের নেটওয়ার্ক বা ইন্টারনেটের সাথে সংযুক্ত করতে চাই না, সেগুলিকে একটি পৃথক নেটওয়ার্কে গেটওয়ে আইওটি Edge ডিভাইসে সংযুক্ত করতে পারি। এই Edge ডিভাইসটি আমাদের বৃহত্তর নেটওয়ার্ক বা ইন্টারনেটের সাথেও সংযোগ স্থাপন করতে পারে এবং ডেটা প্রবাহকে সামনে পেছনে পরিচালনা করতে পারে।
1. **অসামঞ্জস্যপূর্ণ ডিভাইসের জন্য সাপোর্ট** - যদি আমাদের এমন ডিভাইস থাকে যা IoT হাবের সাথে সংযোগ করতে পারে না, উদাহরণস্বরূপ এমন ডিভাইস যা শুধুমাত্র HTTP সংযোগ ব্যবহার করে সংযোগ করতে পারে বা যে ডিভাইসগুলিতে কেবলমাত্র ব্লুটুথ সংযোগ আছে- সেক্ষেত্রে আমরা একটি IoT Edge ডিভাইসকে গেটওয়ে ডিভাইস হিসাবে ব্যবহার করতে পারি , IoT Hub- এ বার্তা পাঠানোর জন্য।
✅ কিছু গবেষণা করি: Edge কম্পিউটিং এর অন্য কোন কোন সুবিধা থাকতে পারে?
### অসুবিধা
Edge কম্পিউটিংয়ের আবার কিছু অসুবিধাও রয়েছে, যেসব ক্ষেত্রে ক্লাউড ভালো অপশন হতে পারে:
1. **স্কেল এবং ফ্লেক্সিবিলিটি** - ক্লাউড কম্পিউটিং এ সার্ভার এবং অন্যান্য রিসোর্স সংযোজন বা হ্রাস করে রিয়েল -টাইমে নেটওয়ার্ক এবং ডেটা প্রয়োজনের সাথে সামঞ্জস্য করতে পারে। কিন্তু Edge এর সুবিধা কম্পিউটারে যোগ করার জন্য ম্যানুয়ালি আরো ডিভাইস যোগ করা প্রয়োজন।
1. **নির্ভরযোগ্যতা এবং সহনশীলতা** - ক্লাউড কম্পিউটিং এ অপ্রয়োজনীয় অতিরিক্ত রিসোর্স এবং দুর্যোগকালীন পরিস্থিতি এড়ানোর জন্য প্রায়ই একাধিক স্থানে একাধিক সার্ভার সরবরাহ করে। Edge এ একই মাত্রার অপ্রয়োজনীয়তার জন্য বড় বিনিয়োগ এবং কনফিগারেশনের কাজ প্রয়োজন।
1. **রক্ষণাবেক্ষণ** - ক্লাউড পরিষেবা প্রদানকারীরারাই সিস্টেম রক্ষণাবেক্ষণ এবং আপডেট প্রদান করে।
✅ কিছু গবেষণা করি: Edge কম্পিউটিংয়ে অন্য কোন অসুবিধা থাকতে পারে?
ক্লাউড ব্যবহার করার অসুবিধার মধ্যে দেখা যায় - আমরা ক্লাউড সরবরাহকারীদের দক্ষতা এবং স্কেলের উপর নির্ভর করতে পারবোনা, বরং আমাদেরকে এই ডিভাইসগুলি নিজেই তৈরি এবং পরিচালনা করতে হবে।
Edge কম্পিউটিংয়ের দ্বারা কিছু ঝুঁকি প্রশমিত করা যায়। উদাহরণস্বরূপ, যদি আমাদের যন্ত্রপাতি সহ কারখানায় যেখান থেকে ডেটা সংগ্রহ করা হয়, সেখানেই একটি Edge ডিভাইস থাকে, তাহলে আমাদেরকে দুর্যোগ পরিস্থিতি সম্পর্কে ভাবতে হবে না। যদি কারখানার বিদ্যুৎ চলে যায় তাহলে আমাদের ব্যাকআপ Edge ডিভাইসের প্রয়োজন হবে না কারণ মেশিনগুলি ডেটা তৈরির পর, Edge ডিভাইসের প্রক্রিয়াগুলিও বিদ্যুৎবিহীন পরিচালনা করা যাবে।
IoT সিস্টেমের জন্য, আমরা প্রায়ই ক্লাউড এবং Edge কম্পিউটিং এর মিশ্রণ এর কৌশল গ্রহণ করি যেখানে সিস্টেম এর গ্রাহকদের এবং এর রক্ষণাবেক্ষণকারীদের প্রয়োজনের উপর ভিত্তি করে প্রতিটি সেবার সুবিধা পাওয়া যায়।
## Azure IoT Edge
![The Azure IoT Edge logo](../../../../images/azure-iot-edge-logo.png)
Azure IoT Edge হল একটি পরিষেবা যা আমাদেরকে কাজের চাপকে ক্লাউডের বাইরে এবং Edge এ সরিয়ে নিতে সাহায্য করতে পারে। আমরা একটি Edge ডিভাইস হিসাবে একটি ডিভাইস সেট আপ, এবং ক্লাউড থেকে আমরা যে Edge ডিভাইসে কোড স্থাপন করতে পারি। এটি আমাদেরকে ক্লাউড এবং Edge এর ক্ষমতাগুলির সর্বোচ্চ ব্যবহার নিশ্চিত করে।
> 🎓 *Workloads* বলতে সেসকল সার্ভিস বোঝায় যেগুলো কোন ধরনের কাজ করে, যেমন এআই মডেল, অ্যাপ্লিকেশন বা সার্ভারলেস ফাংশন।
উদাহরণস্বরূপ, আমরা ক্লাউডে একটি ইমেজ ক্লাসিফায়ার প্রশিক্ষণ দিতে পারি, তারপর ক্লাউড থেকে এটি একটি Edge ডিভাইসে স্থাপন করি। আমাদের আইওটি ডিভাইস তারপর ইন্টারনেটে ছবি পাঠানোর পরিবর্তে Edge ডিভাইসে ইমেজ পাঠায় শ্রেণীবিন্যাসের জন্য। যদি আমাদের মডেলের পরিবর্তন বা উন্নয়ন প্রয়োজন হয়, তাহলে আমরা এটিকে ক্লাউডে প্রশিক্ষণ দিতে পারি এবং আইওটি Edge ব্যবহার করে Edge ডিভাইসে মডেলটিকে আমরা আপডেট করতে পারি।
> 🎓 IoT Edge- এ যে সফটওয়্যারটি মোতায়েন করা হয় তা *মডিউল* নামে পরিচিত। ডিফল্টরূপে IoT Edge মডিউল চালায় যা IoT Hub- এর সাথে যোগাযোগ করে, যেমন `edgeAgent` এবং` edgeHub` মডিউল। যখন আমরা একটি ইমেজ ক্লাসিফায়ার স্থাপন করি, এটি একটি অতিরিক্ত মডিউল হিসাবে স্থাপন করা হয়।
আইওটি Edge আইওটি হাবের মধ্যেই তৈরি করা হয়েছে, তাই আমরা একই স্তরের সুরক্ষা সহ আইওটি ডিভাইসগুলি পরিচালনা করতে যে পরিষেবাটি ব্যবহার করি, সেই একই সার্ভিস দিয়ে আমরা Edge ডিভাইসগুলি পরিচালনা করতে পারি।
আইওটি Edge *কনটেইনার* থেকে কোড চালায় - এটি স্বয়ংসম্পূর্ণ অ্যাপ্লিকেশন যা আমাদের কম্পিউটারে বাকি অ্যাপ্লিকেশন থেকে বিচ্ছিন্নভাবে চালানো হয়। যখন আমরা একটি কন্টেইনার চালাই তখন এটি আমাদের কম্পিউটারের ভিতরে একটি পৃথক কম্পিউটারের মতো কাজ করে, যার নিজস্ব সফ্টওয়্যার, পরিষেবা এবং অ্যাপ্লিকেশনগুলি চলছে। বেশিরভাগ সময় কনটেইনার আমাদের কম্পিউটারে কিছু অ্যাক্সেস করতে পারে না যতক্ষণ না আমরা কন্টেইনারের সাথে একটি ফোল্ডারের মতো জিনিস ভাগ করা বেছে নেই। কন্টেইনার তারপর একটি খোলা পোর্টের মাধ্যমে সার্ভিসগুলি প্রকাশ করে যা আমরা আমাদের নেটওয়ার্কে সংযোগ করতে বা প্রকাশ করতে পারি।
![A web request redirected to a container](../../../../images/container-web-browser.png)
উদাহরণস্বরূপ, আমরা পোর্ট 80, ডিফল্ট HTTP পোর্টে চলমান একটি ওয়েব সাইটকে একটি কন্টেইনার রাখতে পারি এবং আমরা এটি আমাদের কম্পিউটার থেকে পোর্ট 80 তেও প্রকাশ করতে পারি।
✅ কিছু গবেষণা করি: Docker বা Moby এর মতো সার্ভিস এবং কন্টেইনার সম্পর্কে আরো পড়ি।
আমরা ইমেজ ক্লাসিফায়ার ডাউনলোড করার জন্য কাস্টম ভিশন ব্যবহার করতে পারি এবং সেগুলোকে কনটেইনার হিসেবে স্থাপন করতে পারি, হয় সরাসরি কোনো ডিভাইসে চালানো অথবা আইওটি Edge এর মাধ্যমে মোতায়েন করা যেতে পারে। একবার একটা কন্টেইনার চলতে থাকলে, ক্লাউড সংস্করণের মতো একই REST API ব্যবহার করে এটি একসেস করা যেতে পারে, তবে endpoint টি কন্টেইনার চালানোর জন্য Edge ডিভাইসের দিকে নির্দেশ করে।
## IoT Edge device রেজিস্টার করা
একটি আইওটি Edge ডিভাইস ব্যবহার করার জন্য, এটি আইওটি হাব -এ রেজিস্ট্রেশন হওয়া প্রয়োজন।
### Task - IoT Edge device রেজিস্টার করা
1. `fruit-quality-detector` রিসোর্স গ্রুপে আইওটি হাব তৈরী করি। এটাকে ইউনিক একটা নাম দেয়া যেতে পারে, যেমনঃ `fruit-quality-detector`
1. একটি IoT Edge device রেজিস্ট্রেশন করি, নাম দিই `fruit-quality-detector-edge`। এটি করার কমান্ডটি একটি non-edge ডিভাইস নিবন্ধনের জন্য ব্যবহৃত কমান্ডের অনুরূপ, তবে `--edge-enabled` ফ্ল্যাগটি পাস করা যাবেনা।
```sh
az iot hub device-identity create --edge-enabled \
--device-id fruit-quality-detector-edge \
--hub-name <hub_name>
```
`<hub_name>` এর স্থলে আমাদের আইওটি হাবের নাম বসাই।
1. নিম্নলিখিত কমান্ড ব্যবহার করে আমাদের ডিভাইসের জন্য সংযোগ স্ট্রিং নিই:
```sh
az iot hub device-identity connection-string show --device-id fruit-quality-detector-edge \
--output table \
--hub-name <hub_name>
```
`<hub_name>` এর স্থলে আমাদের আইওটি হাবের নাম বসাই।
আউটপুটে দেখানো কানেকশন স্ট্রিং এর কপি রাখি।
## IoT Edge device সেটাপ করা
একবার IoT হাব এ এজ ডিভাইস রেজিস্ট্রেশন তৈরি করে নিলে, আমরা এজ ডিভাইস সেট আপ করতে পারবো।
### Task - Install and start the IoT Edge Runtime
**IoT Edge runtime কেবল Linux container এ রান করে।** এটি লিনাক্সে চলবে অথবা লিনাক্স ভার্চুয়াল মেশিন ব্যবহার করে উইন্ডোজে চালানো যাবে।
* আমরা যদি আমাদের আইওটি ডিভাইস হিসাবে রাস্পবেরি পাই ব্যবহার করি, তাহলে এটি লিনাক্সের একটি সাপোর্টেড সংস্করণ চালায় এবং আইওটি Edge রানটাইম হোস্ট করতে পারে। এক্ষেত্রে আমরা [Microsoft docs এর লিনাক্স গাইডের জন্য Azure আইওটি Edge ইনস্টলেশন](https://docs.microsoft.com/azure/iot-edge/how-to-install-iot-edge?WT.mc_id=academic-17441-jabenn) পড়ে দেখতে পারি।
> 💁 মনে রাখতে হবে, রাস্পবেরি পাই ওএস ডেবিয়ান লিনাক্সের একটি রূপ।
* আমরা যদি রাস্পবেরি পাই ব্যবহার না করি, কিন্তু একটি লিনাক্স কম্পিউটার থাকে, তাহলে আমরা IoT Edge রানটাইম চালাতে পারবো। এক্ষেত্রে আমরা [লিনাক্স গাইডের জন্য Azure আইওটি এজ ইনস্টলেশন](https://docs.microsoft.com/azure/iot-edge/how-to-install-iot-edge?WT.mc_id=academic-17441-jabenn) পড়ে দেখতে পারি।
* উইন্ডোজে আমরা IoT Edge runtime ইন্সটল করতে পারি Linux Virtual Machine ব্যবহার করে, যার জন্য [উইন্ডোজে IoT Edge runtime পরিচালনা ](https://docs.microsoft.com/azure/iot-edge/quickstart?WT.mc_id=academic-17441-jabenn#install-and-start-the-iot-edge-runtime) পড়তে পারি। *Deploy a module* সেকশনে যাওয়ার পর কাজ বন্ধ করতে হবে।
* macOS ব্যবহারকারী হল্র ক্লাউডে virtual machine (VM) তৈরী করতে পারি। IoT Edge িন্সটল করা লিনাক্স ভিএম আমরা ডেপ্লয় করতে পারি। এজন্য [IoT Edge এর জন্য ভার্চুয়াল মেশিন](vm-iotedge.md) পড়ে দেখতে পারি।
## মডেল এক্সপোর্ট করা
Edge এ ক্লাসিফায়ার চালানোর জন্য, এটি কাস্টম ভিশন থেকে এক্সপোর্ট করতে হবে। কাস্টম ভিশন দুই ধরণের মডেল তৈরি করতে পারে - স্ট্যান্ডার্ড মডেল এবং কমপ্যাক্ট মডেল। কম্প্যাক্ট মডেলগুলি মডেলের আকার কমাতে বিভিন্ন কৌশল ব্যবহার করে, এটি আইওটি ডিভাইসে ডাউনলোড এবং মোতায়েনের জন্য যথেষ্ট ছোট করে তোলে।
যখন আমরা ইমেজ ক্লাসিফায়ার তৈরি করি, তখন আমরা *Food* ডোমেইন ব্যবহার করেছিলাম, মডেলটির একটি সংস্করণ যা Food ইমেজগুলিতে প্রশিক্ষণের জন্য অপ্টিমাইজ করা হয়েছে। কাস্টম ভিশনে, আমরা আমাদের প্রকল্পের ডোমেইন পরিবর্তন করতে, আমাদের প্রশিক্ষণ তথ্য ব্যবহার করে নতুন ডোমেনের সাথে একটি নতুন মডেলকে প্রশিক্ষণ দিতে হবে। কাস্টম ভিশন দ্বারা সমর্থিত সমস্ত ডোমেইন স্ট্যান্ডার্ড এবং কমপ্যাক্ট হিসাবে পাওয়া যায়।
### কাজ - মডেলটিকে Food (compact) domain এ ট্রেইনিং প্রদান
1. Custom Vision portal এ যাওয়ার জন্য [CustomVision.ai](https://customvision.ai) তে ক্লিক করি এবং সাইন ইন করে নিই যদি আগে থেকে সাইন ইন করা না থাকে। এখন `fruit-quality-detector` প্রজেক্টটি চালু করি।
1. এখন **Settings** সিলেক্ট করি (এই ⚙ চিহ্ন)
1. *Domains* লিস্ট থেকে, নির্বাচন করি *Food (compact)*
1. তারপর *Export Capabilities* থেকে *Basic platforms (Tensorflow, CoreML, ONNX, ...)* সিলেক্ট করি।
1. Settings পেইজের একদম নীচে থাকা **Save Changes** এ সিলেক্ট করি।
1. এখন **Train** এ ক্লিক করে, *Quick training* অপশনটি নির্বাচন করে মডেলকে ট্রেইন করি।
### Task - মডেল এক্সপোর্ট করা
মডেলটি একবার ট্রেইন হয়ে গেলে কন্টেইনার সহ এক্সপোর্ট করতে হবে।
1. **Performance** ট্যাবে গিয়ে কম্প্যাক্ট ডোমেইনের গত ইটারেশন টি তে যাই।
1. সেখানে উপরের দিকে **Export** বাটনে ক্লিক করি।
1. **DockerFile** সিলেক্ট করি, তারপর আমাদের Edge ডিভাইসের সাথে মিলে এমন একটি ভার্সন নির্বাচন করি:
* Linux computer, Windows computer বা Virtual Machine এ IoT Edge ব্যবহার করলে, *Linux* ভার্সনটি সিলেক্ট করি।
* Raspberry Pi এ IoT Edge ব্যবহার করলে , *ARM (Raspberry Pi 3)* ভার্সনটি সিলেক্ট করি।
> 🎓 Docker হলো কনটেইনার পরিচালনার জন্য সবচেয়ে জনপ্রিয় ট্যুলগুলির মধ্যে একটি এবং ডকার ফাইল হল কন্টেইনার সেট আপ করার জন্য নির্দেশাবলীর একটি সেট।
1. এবার **Export** এ ক্লিক করলে Custom Vision এর প্রয়োজনীয় ফাইলগুলি তৈরী হয়ে যাবে। তারপর **Download** এ ক্লিক করে জিপ ফাইল আকারে এগুলো ডাউনলোড করি।
1. কম্পিউটারে সেভ করার পর ফোল্ডারটি unzip করি।
## ডেপ্লয়মেন্টের জন্য কন্টেইনার প্রস্তুতকরণ
![Containers are built then pushed to a container registry, then deployed from the container registry to an edge device using IoT Edge](../../../../images/container-edge-flow.png)
একবার মডেলটি ডাউনলোড করার পরে, এটি একটি কনটেইনার বিল্ড করা প্রয়োজন, তারপর একটি কনটেইনার রেজিস্ট্রিতে পুশ করতে হবে - যা একটি অনলাইন স্টোরেজ যেখানে আমরা তা সংরক্ষণ করতে পারি। IoT Edge তারপর রেজিস্ট্রি থেকে কন্টেইনারটি ডাউনলোড করে আমাদের ডিভাইসে পুশ করতে পারবে।
![THe Azure Container Registry logo](../../../../images/azure-container-registry-logo.png)
এই পাঠের জন্য যে কন্টেইনার রেজিস্ট্রি ব্যবহার করব তা হল Azure Container Registry। এটি কোন ফ্রী সার্ভিস নয়, তাই অর্থের অপচয় রোধ করার জন্য কাজ শেষ হওয়ার পর আমাদেরকে [clean up your project](../../../clean-up.md) অনুসরণ করে এটি বন্ধ করে দিতে হবে।
> 💁 Azure Container Registry ব্যবহারের খরচ আমরা [Azure Container Registry pricing page](https://azure.microsoft.com/pricing/details/container-registry/?WT.mc_id=academic-17441-jabenn) থেকে দেখতে পারি ।
### কাজ - Docker ইন্সটল করা
ক্লাসিফায়ার বিল্ড এবং ডেপলয় করার জন্য আমাদেরকে [Docker](https://www.docker.com/) ইন্সটল করে রাখতে হবে।
1. [Docker install page](https://www.docker.com/products/docker-desktop) থেকে দেখে নিই কীভাবে এটি ইন্সটল করতে হবে।
### কাজ - container registry resource তৈরী
1. Azure Container Registry resource তৈরীর জন্য টার্মিনাল বা কমান্ড প্রম্পট থেকে নীচের কমান্ড রান দিই:
```sh
az acr create --resource-group fruit-quality-detector \
--sku Basic \
--name <Container registry name>
```
`<Container registry name>` এর স্থলে একটি ইউনিক নাম দিই কেবল অক্ষর ও সংখ্যা ব্যবহার করে। এক্ষেত্রে `fruitqualitydetector`এর কাছাকাছি কোন নাম দেয়াই সমীচীন হবে। কন্টেইনার রেজিস্ট্রি তে একসেস করার জন্য URL এর একটি অংশে এই নাম ব্যবহৃত হবে। তাই নামটিকে ইউনিক হতে হবে।
1. নিম্নের কমান্ড ব্যবহার করে Azure Container Registry তে লগিন করি:
```sh
az acr login --name <Container registry name>
```
`<Container registry name>` এর স্থলে কন্টেনার রেজিস্ট্রি এর নাম বসাই
1. Container registry টি admin mode এ সেট করি যাতে পাসওয়ার্ড সেট করা যায়ঃ
```sh
az acr update --admin-enabled true \
--name <Container registry name>
```
`<Container registry name>` এর স্থলে কন্টেনার রেজিস্ট্রি এর নাম বসাই।
1. নিম্নের কমান্ড দিয়ে পাসওয়ার্ড সেট করি:
```sh
az acr credential renew --password-name password \
--output table \
--name <Container registry name>
```
`<Container registry name>` এর স্থলে কন্টেনার রেজিস্ট্রি এর নাম বসাই
`PASSWORD` এর ভ্যালুটি কপি করে কোথাও সংরক্ষণ করে রাখি কেননা পরে এটির প্রয়োজন হবে
### কাজ - কন্টেইনার তৈরী করা
আমরা কাস্টম ভিশন থেকে যা ডাউনলোড করেছিলাম তা একটি ডকারফাইল যা কন্টেইনারটি কীভাবে তৈরি করা উচিত তার নির্দেশাবলী, অ্যাপ্লিকেশন কোড সহ কাস্টম ভিশন মডেল হোস্ট করার প্রয়োজনীয় ফাইল এবং REST API রয়েছে। আমরা DockerFile থেকে একটি ট্যাগযুক্ত কন্টেইনার তৈরি করতে Docker ব্যবহার করতে পারি, তারপর কন্টেইনার রেজিস্ট্রিতে এটি পুশ করে দিই।
> 🎓 কনটেইনারগুলিকে একটি ট্যাগ দেওয়া হয় যা তাদের জন্য একটি নাম এবং সংস্করণ নির্ধারণ করে। যখন একটি কন্টেইনার আপডেট করার প্রয়োজন তখন আমরা এটি একই ট্যাগ দিয়ে তৈরি করতে পারি কিন্তু ভিন্ন ভার্সনে।
1. টার্মিনাল বা কমান্ড প্রম্পট থেকে ন্যাভিগেট করে কা্সটম ভিশনের unzipped model এ যাই।
1. নিম্নের কমান্ড দিয়ে ইমেজগুলো বিল্ড এবং ট্যাগ করি:
```sh
docker build --platform <platform> -t <Container registry name>.azurecr.io/classifier:v1 .
```
এখন `<platform>` এর স্থলে যে প্লাটফর্মে কন্টেইনার রান করবে, সেটি দিই। রাস্পবেরি পাই হলে `linux/arm64`, য়ার অন্যসব কিছুতেই `linux/amd64` দিতে হবে।
> 💁 একই ডিভাইস থেকে IoT Edge চালানো এবং এই কমান্ডঅগুলো রান করা হলে, `--platform <platform>` অংশটি বাদ দেয়া যেতে পারে কেননা ডিফল্ট হিসেবে এটি কমান্ড চলমান ডিভাইস্টিকে সিলেক্ট করে রাখে।
`<Container registry name>` এর স্থলে কন্টেনার রেজিস্ট্রি এর নাম বসাই
> 💁 লিনাক্স ব্যবহারকারী করে হলে, এই কমান্ড রান করার জন্য `sudo` যোগ করতে হতে পারে।
Docker এখানে ইমেজ তৈরি করবে, প্রয়োজনীয় সব সফটওয়্যার কনফিগার করবে। তারপর ছবিটি `classifier:v1` হিসেবে ট্যাগ করা হবে।
```output
➜ d4ccc45da0bb478bad287128e1274c3c.DockerFile.Linux docker build --platform linux/amd64 -t fruitqualitydetectorjimb.azurecr.io/classifier:v1 .
[+] Building 102.4s (11/11) FINISHED
=> [internal] load build definition from Dockerfile
=> => transferring dockerfile: 131B
=> [internal] load .dockerignore
=> => transferring context: 2B
=> [internal] load metadata for docker.io/library/python:3.7-slim
=> [internal] load build context
=> => transferring context: 905B
=> [1/6] FROM docker.io/library/python:3.7-slim@sha256:b21b91c9618e951a8cbca5b696424fa5e820800a88b7e7afd66bba0441a764d6
=> => resolve docker.io/library/python:3.7-slim@sha256:b21b91c9618e951a8cbca5b696424fa5e820800a88b7e7afd66bba0441a764d6
=> => sha256:b4d181a07f8025e00e0cb28f1cc14613da2ce26450b80c54aea537fa93cf3bda 27.15MB / 27.15MB
=> => sha256:de8ecf497b753094723ccf9cea8a46076e7cb845f333df99a6f4f397c93c6ea9 2.77MB / 2.77MB
=> => sha256:707b80804672b7c5d8f21e37c8396f319151e1298d976186b4f3b76ead9f10c8 10.06MB / 10.06MB
=> => sha256:b21b91c9618e951a8cbca5b696424fa5e820800a88b7e7afd66bba0441a764d6 1.86kB / 1.86kB
=> => sha256:44073386687709c437586676b572ff45128ff1f1570153c2f727140d4a9accad 1.37kB / 1.37kB
=> => sha256:3d94f0f2ca798607808b771a7766f47ae62a26f820e871dd488baeccc69838d1 8.31kB / 8.31kB
=> => sha256:283715715396fd56d0e90355125fd4ec57b4f0773f306fcd5fa353b998beeb41 233B / 233B
=> => sha256:8353afd48f6b84c3603ea49d204bdcf2a1daada15f5d6cad9cc916e186610a9f 2.64MB / 2.64MB
=> => extracting sha256:b4d181a07f8025e00e0cb28f1cc14613da2ce26450b80c54aea537fa93cf3bda
=> => extracting sha256:de8ecf497b753094723ccf9cea8a46076e7cb845f333df99a6f4f397c93c6ea9
=> => extracting sha256:707b80804672b7c5d8f21e37c8396f319151e1298d976186b4f3b76ead9f10c8
=> => extracting sha256:283715715396fd56d0e90355125fd4ec57b4f0773f306fcd5fa353b998beeb41
=> => extracting sha256:8353afd48f6b84c3603ea49d204bdcf2a1daada15f5d6cad9cc916e186610a9f
=> [2/6] RUN pip install -U pip
=> [3/6] RUN pip install --no-cache-dir numpy~=1.17.5 tensorflow~=2.0.2 flask~=1.1.2 pillow~=7.2.0
=> [4/6] RUN pip install --no-cache-dir mscviplib==2.200731.16
=> [5/6] COPY app /app
=> [6/6] WORKDIR /app
=> exporting to image
=> => exporting layers
=> => writing image sha256:1846b6f134431f78507ba7c079358ed66d944c0e185ab53428276bd822400386
=> => naming to fruitqualitydetectorjimb.azurecr.io/classifier:v1
```
### কাজ - কন্টেইনারকে কন্টেইনার রেজিস্ট্রিতে পুশ করা
1. কন্টেইনারকে কন্টেইনার রেজিস্ট্রিতে পুশ করার জন্য নিম্নের কমান্ড রান দিই:
```sh
docker push <Container registry name>.azurecr.io/classifier:v1
```
`<Container registry name>` এর স্থলে কন্টেনার রেজিস্ট্রি এর নাম বসাই
> 💁 লিনাক্স ব্যবহারকারী করে হলে, এই কমান্ড রান করার জন্য `sudo` যোগ করতে হতে পারে।
কন্টেইনারটি পুশ হয়ে যাবে।
```output
➜ d4ccc45da0bb478bad287128e1274c3c.DockerFile.Linux docker push fruitqualitydetectorjimb.azurecr.io/classifier:v1
The push refers to repository [fruitqualitydetectorjimb.azurecr.io/classifier]
5f70bf18a086: Pushed
8a1ba9294a22: Pushed
56cf27184a76: Pushed
b32154f3f5dd: Pushed
36103e9a3104: Pushed
e2abb3cacca0: Pushed
4213fd357bbe: Pushed
7ea163ba4dce: Pushed
537313a13d90: Pushed
764055ebc9a7: Pushed
v1: digest: sha256:ea7894652e610de83a5a9e429618e763b8904284253f4fa0c9f65f0df3a5ded8 size: 2423
```
1. Push ঠিকমত হয়েছে কিনা তা ভেরিফাই করার জন্য কন্টেইনারের লিস্ট দেখতে পারি:
```sh
az acr repository list --output table \
--name <Container registry name>
```
`<Container registry name>` এর স্থলে কন্টেনার রেজিস্ট্রি এর নাম বসাই
```output
➜ d4ccc45da0bb478bad287128e1274c3c.DockerFile.Linux az acr repository list --name fruitqualitydetectorjimb --output table
Result
----------
classifier
```
ক্লাসিফায়ারের লিস্ট চলে আসবে।
## কন্টেইনার ডেপ্লয় করা
কন্টেইনার এখন আইওটি এজ ডিভাইসে স্থাপন করা যেতে পারে। ডেপ্লয় করার জন্য একটি deployment manifest কে ডিফাইন করতে হবে - এটি একটি JSON ডকুমেন্ট যা Edgeডিভাইসে মডিউলগুলি তালিকাভুক্ত করে।
### কাজ - deployment manifest তৈরী করা
1. আমাদের কম্পিউটারে `deployment.json` নামে একটি ফাইল তৈরী করি।
1. নিম্নের অংশটুকু সেই ফাইলে যোগ করি:
```json
{
"content": {
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.1",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
"loggingOptions": "",
"registryCredentials": {
"ClassifierRegistry": {
"username": "<Container registry name>",
"password": "<Container registry password>",
"address": "<Container registry name>.azurecr.io"
}
}
}
},
"systemModules": {
"edgeAgent": {
"type": "docker",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.1",
"createOptions": "{}"
}
},
"edgeHub": {
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.1",
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}"
}
}
},
"modules": {
"ImageClassifier": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "<Container registry name>.azurecr.io/classifier:v1",
"createOptions": "{\"ExposedPorts\": {\"80/tcp\": {}},\"HostConfig\": {\"PortBindings\": {\"80/tcp\": [{\"HostPort\": \"80\"}]}}}"
}
}
}
}
},
"$edgeHub": {
"properties.desired": {
"schemaVersion": "1.1",
"routes": {
"upstream": "FROM /messages/* INTO $upstream"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
}
}
}
}
```
> 💁 এই ফাইলটি [code-deployment/deployment](code-deployment/deployment) folder এ পাওয়া যাবে।
৩টি `<Container registry name>` এর জায়গায় আমাদের ব্যবহৃত container registry এর নাম বসাই। ১টি `ImageClassifier` মডিউলে, বাকি ২টি `registryCredentials` অংশে রয়েছে।
এখন `<Container registry password>` অংশের `registryCredentials` সেকশনে পাসওয়ার্ড দিই।
1. যে ফোল্ডারে deployment manifest রয়েছে সেখানে নিম্নের কমান্ড রান করি:
```sh
az iot edge set-modules --device-id fruit-quality-detector-edge \
--content deployment.json \
--hub-name <hub_name>
```
`<hub_name>` এর স্থলে আমাদের IoT Hub এর নাম বসাই।
Edge ডিভাইসে ইমেজ ক্লাসিফায়ার মডিউলটি ডেপ্লয় হয়ে যাবে।
### কাজ - ক্লাসিফায়ারটি চলছে কিনা তা ভেরিফাই করা
1. IoT edge device এ কানেক্ট করা:
* Raspberry Pi ব্যবহারকারী হলে, কানেক্ট করতে হবে হয় ssh দিয়ে terminal থেকে থেকে অথবা কোন VS Code থেকে কোন remote SSH session ব্যবহার করে।
* উইন্ডোজে Linux container ব্যবহারকারী হলে, [verify successful configuration guide](https://docs.microsoft.com/azure/iot-edge/how-to-install-iot-edge-on-windows?WT.mc_id=academic-17441-jabenn&view=iotedge-2018-06&tabs=powershell#verify-successful-configuration) টি অনুসরণ করতে হবে।
* Virtual machine ব্যবহারকারী হলে, `adminUsername` এবং `password` সেট করার সময়ই SSH করে রাখা যায়
```sh
ssh <adminUsername>@<IP address>
```
অথবা:
```sh
ssh <adminUsername>@<DNS Name>
```
পাসওয়ার্ড চাইলে, তা প্রবেশ করাই।
1. কানেক্ট হয়ে গেলে, IoT Edge module গুলো দেখার জন্য নিম্নের কমান্ড রান দিই :
```sh
iotedge list
```
> 💁 এখানে `sudo` কমান্ড ব্যবহারের প্রয়োজন হতে পারে।
রানিং মডিউলগুলো দেখা যাবে:
```output
jim@fruit-quality-detector-jimb:~$ iotedge list
NAME STATUS DESCRIPTION CONFIG
ImageClassifier running Up 42 minutes fruitqualitydetectorjimb.azurecr.io/classifier:v1
edgeAgent running Up 42 minutes mcr.microsoft.com/azureiotedge-agent:1.1
edgeHub running Up 42 minutes mcr.microsoft.com/azureiotedge-hub:1.1
```
1. Image classifier module এর লগ হিস্টোরি দেখতে নিম্নের কমান্ড রান দিই :
```sh
iotedge logs ImageClassifier
```
> 💁 এই কমান্ড এর সাথে `sudo` ব্যবহারের প্রয়োজন হতে পারে।
```output
jim@fruit-quality-detector-jimb:~$ iotedge logs ImageClassifier
2021-07-05 20:30:15.387144: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-07-05 20:30:15.392185: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2394450000 Hz
2021-07-05 20:30:15.392712: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ed9ac83470 executing computations on platform Host. Devices:
2021-07-05 20:30:15.392806: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
Loading model...Success!
Loading labels...2 found. Success!
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
```
### কাজ - ইমেজ ক্লাসিফায়ার টেস্ট করা
1. CURL দিয়ে image classifier টেস্ট করা যায় যেখানে IP address বা আমাদের কম্পিউটারের হোস্ট নেইম ব্যবহার করা হবে যেটিতে IoT Edge agent চলমান রয়েছে। IP address খুজে বের করি:
* IoT Edge যে মেশিনে রান হুচ্ছে সেটি থেকে কাজ করলে, হোস্ট নেম হবে `localhost`
* VM (ভার্চুয়াল মেশিন) থেকে কাজ করলে IP address অথবা ভিএম এর DNS name দিতে হবে।
* অন্যথায় IoT Edge যে মেশিনে চলছে সেটির আইপি এড্রেস জানার অন্য, যা করতে হবে তা হলো:
* Windows 10 এ [find your IP address guide](https://support.microsoft.com/windows/find-your-ip-address-f21a9bbc-c582-55cd-35e0-73431160a1b9?WT.mc_id=academic-17441-jabenn) অনুসরণ করি।
* macOS হলে [how to find you IP address on a Mac guide](https://www.hellotech.com/guide/for/how-to-find-ip-address-on-mac) অনুসরণ করি।
* linux হলে, [how to find your IP address in Linux guide](https://opensource.com/article/18/5/how-find-ip-address-linux) থেকে প্রাইভেট এড্রেসের অংশটি অনুসরণ করি।
1. কন্টেইনারকে লোকাল ফাইল দিয়ে টেস্ট করতে নীচের curl কমান্ড ব্যবহার করি:
```sh
curl --location \
--request POST 'http://<IP address or name>/image' \
--header 'Content-Type: image/png' \
--data-binary '@<file_Name>'
```
`<IP address or name>` এর জায়গায় আমাদের IP address বা host name দিই যেটি থেকে IoT Edge চলছে এবং `<file_Name>` ঙ্গের জায়গায় যে ফাইল দিয়ে টেস্ট করা হবে, সেটির নাম দিই।
আউটপুটে প্রেডিকশন রেজাল্ট দেখা যাবে।
```output
{
"created": "2021-07-05T21:44:39.573181",
"id": "",
"iteration": "",
"predictions": [
{
"boundingBox": null,
"probability": 0.9995615482330322,
"tagId": "",
"tagName": "ripe"
},
{
"boundingBox": null,
"probability": 0.0004384400090202689,
"tagId": "",
"tagName": "unripe"
}
],
"project": ""
}
```
> 💁 এখানে একটি প্রেডিকশন কী (key) সরবরাহ করার প্রয়োজন নেই, কারণ এটি Azure রিসোর্স ব্যবহার করছে না। পাবলিক এন্ডপয়েন্ট এবং এপিআই কী (key) -এর উপর নির্ভর না করে, এর পরিবর্তে অভ্যন্তরীণ নিরাপত্তার প্রয়োজনের ভিত্তিতে অভ্যন্তরীণ নেটওয়ার্কে নিরাপত্তা কনফিগার করা হবে।
## আমাদের IoT Edge device ব্যবহার করা
এখন যেহেতু ইমেজ ক্লাসিফায়ার একটি আইওটি এজ ডিভাইসে স্থাপন করা হয়েছে, এটি আমাদের আইওটি ডিভাইস থেকে ব্যবহার করতে পারবো।
### কাজ - আমাদের IoT Edge device ব্যবহার
IoT Edge classifier দিয়ে ছবি ক্লাসিফাই করতে, নিম্নের গাইডগুলো অনুসরণ করি:
* [Arduino - Wio Terminal](../wio-terminal.md)
* [Single-board computer - Raspberry Pi/Virtual IoT device](../single-board-computer.md)
### Model retraining
IoT Edge- এ ইমেজ ক্লাসিফায়ার চালানোর একটি সমস্যা হল এগুলি কাস্টম ভিশন প্রজেক্টের সাথে সংযুক্ত নয়। যদি কাস্টম ভিশনে **Predictions** ট্যাবটি দেখি, তবে এজ-ভিত্তিক ক্লাসিফায়ার ব্যবহার করে শ্রেণীবদ্ধ করা ছবিগুলি দেখতে পাব না।
সত্যি বলতে গেলে এটি একেবারে প্রত্যাশিত একটি আচরণ - ছবিগুলি ক্লাউডে শ্রেণিবিন্যাসের জন্য পাঠানো হয় না, তাই সেগুলি ক্লাউডে পাওয়া যাবে না। আইওটি এজ ব্যবহার করার একটি সুবিধা হল গোপনীয়তা, নিশ্চিত করা যে ছবিগুলি আমাদের নেটওয়ার্ক এর বাইরে যাবেনা। আবার এটি অফলাইনে কাজ করতে সক্ষম হচ্ছে, তাই যখন ডিভাইসে ইন্টারনেট সংযোগ নেই তখন ছবি আপলোড করার উপর নির্ভর করে না। নেতিবাচক দিকটি হলো যে আমাদের মডেলের উন্নতি ঠিকমত হচ্ছেনা - আমাদেরকে ইমেজ ক্লাসিফায়ারের উন্নতি এবং পুনরায় প্রশিক্ষণের জন্য ম্যানুয়ালি পুনরায় ক্লাসিফাই করা যায় এমন ছবি সংরক্ষণের অন্য উপায় বাস্তবায়ন করতে হবে।
✅ ক্লাসিফায়ার পুনরায় প্রশিক্ষণ দেওয়ার জন্য ছবি আপলোড করার উপায় সম্পর্কে চিন্তা করি।
---
## 🚀 চ্যালেঞ্জ
Edge ডিভাইসে AI মডেল চালানো ক্লাউডের তুলনায় দ্রুততর হতে পারে - কারণ সেখানে network hop ছোট । তবে হার্ডওয়্যার এর ফলে তা ধীরও হতে পারে ,আর তাই মডেলটি ক্লাউডের মতো শক্তিশালী নাও হতে পারে।
সময়ক্ষেপন এর নোট নিই এবং তুলনা করি আমাদের Edge ডিভাইসে কাজ, ক্লাউডে কাজ করার চেয়ে দ্রুত বা ধীর - কোনটি ঘটে? পার্থক্য এর কারণ, বা পার্থক্য না থাকলে সেটি সম্পর্কে চিন্তা করি। বিশেষ হার্ডওয়্যার ব্যবহার করে Edge ডিভাইসে এআই মডেলগুলি দ্রুত চালানোর উপায়গুলি গবেষণা করি।
## লেকচার-পরবর্তী কুইজ
[লেকচার-পরবর্তী কুইজ](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/34)
## রিভিউ এবং স্ব-অধ্যয়ন
* কন্টেইনার সম্পর্কে জানতে পড়তে পারি - [OS-level virtualization page on Wikipedia](https://wikipedia.org/wiki/OS-level_virtualization)
* Edge computing সম্পর্কে জানতে হলে, পড়তে পারি - [what is edge computing and why does it matter? article on NetworkWorld](https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html)
* IoT Edge এ চলমান AI service সম্পর্কে জানতে হলে, পড়তে পারি - [learn how to use Azure IoT Edge on a pre-built AI service on the Edge to do language detection episode of Learn Live on Microsoft Channel9](https://channel9.msdn.com/Shows/Learn-Live/Sharpen-Your-AI-Edge-Skills-Episode-4-Learn-How-to-Use-Azure-IoT-Edge-on-a-Pre-Built-AI-Service-on-t?WT.mc_id=academic-17441-jabenn)
## এসাইনমেন্ট
[Edge এ বিভিন্ন সার্ভিস পরিচালনা করা](assignment.bn.md)

@ -0,0 +1,14 @@
# Edge এ বিভিন্ন সার্ভিস পরিচালনা করা
## নির্দেশাবলী
Edge এ যে কেবল ইমেজ ক্লাসিফায়ার চালানো যায় তা কিন্তু নয়, বরং যেকোন কাজ যা একটি কন্টেইনারে প্যাকেজ করা যায় তা IoT Edge ডিভাইসে স্থাপন করা যেতে পারে। সার্ভারলেস কোড যা Azure Functions হিসাবে চলে, যেমন আগের লেসনগুলিতে তৈরি ট্রিগারগুলি কন্টেইনারে চালানো যেতে পারে এবং এর জন্য IoT Edge এও তা চলবে।
পূর্ববর্তী পাঠগুলির মধ্যে একটি বেছে নিই এবং IoT Edge কন্টেইনারে Azure Functions অ্যাপটি চালানোর চেষ্টা করি। কিভাবে একটি ভিন্ন Functions App প্রজেক্ট ব্যবহার করে করা যায় তার জন্য [টিউটোরিয়াল: Azure Functions কে IoT Edge modules হিসেবে ডেপ্লয় করা](https://docs.microsoft.com/azure/iot-edge/tutorial-deploy-function?WT.mc_id=academic-17441-jabenn&view=iotedge-2020-11) দেখতে পারি।
## এসাইনমেন্ট মূল্যায়ন মানদন্ড
| ক্রাইটেরিয়া | দৃষ্টান্তমূলক (সর্বোত্তম) | পর্যাপ্ত (মাঝারি) | উন্নতি প্রয়োজন (নিম্নমান) |
| --------- | ------------------ | -------------- | -------------------- |
| Azure Functions কে IoT Edge এ ডেপ্লয় করা | IoT Edge এ একটি Azure Functions App ডেপ্লয় করে, আইওটি ডেটা থেকে ট্রিগার চালানোর জন্য আইওটি ডিভাইসের সাথে এটি ব্যবহার করতে সফল হয়েছিল | IoT Edge এ একটি Functions App স্থাপন করতে সক্ষম হয়েছিল, কিন্তু ট্রিগারটি দিয়ে কাজ সম্পন্ন করতে পারেনি | IoT Edge এ একটি Functions App স্থাপন করতে ব্যার্থ ছিল|

@ -0,0 +1,19 @@
# खुदरा - स्टॉक स्तरों को प्रबंधित करने के लिए IoT का उपयोग करना
उपभोक्ताओं तक पहुंचने से पहले फ़ीड के लिए अंतिम चरण खुदरा है - बाजार, किराने का सामान, सुपरमार्केट और स्टोर जो उपभोक्ताओं को उत्पाद बेचते हैं। ये स्टोर यह सुनिश्चित करना चाहते हैं कि उपभोक्ताओं के देखने और खरीदने के लिए इनके पास अलमारियों पर उत्पादन हो।
खाद्य भंडारों में, विशेष रूप से बड़े सुपरमार्केट में, सबसे अधिक मैनुअल, समय लेने वाले कार्यों में से एक यह सुनिश्चित करना है कि अलमारियों को स्टॉक किया गया है या नहीं और यह सुनिश्चित करने के लिए अलग-अलग अलमारियों की जाँच करना कि किसी भी अंतराल को स्टोर रूम से उपज से भरा गया है या नहीं।
IoT इसमें मदद कर सकता है, स्टॉक गिनने के लिए IoT उपकरणों पर चलने वाले AI मॉडल का उपयोग करके, मशीन लर्निंग मॉडल का उपयोग करके जो न केवल छवियों को वर्गीकृत करते हैं, बल्कि व्यक्तिगत वस्तुओं का पता लगा सकते हैं और उन्हें गिन सकते हैं।
इन 2 पाठों में आप सीखेंगे कि स्टॉक की गणना करने के लिए छवि-आधारित AI मॉडल को कैसे प्रशिक्षित किया जाए, और कैसे इन मॉडलों को IoT उपकरणों पर चलाया जाए।
> 💁 ये पाठ कुछ क्लाउड संसाधनों का उपयोग करेंगे। यदि आप इस परियोजना के सभी पाठों को पूरा नहीं करते हैं, तो सुनिश्चित करें कि आप [अपना प्रोजेक्ट साफ़ करें](../clean-up.md)।
## विषय
1. [स्टॉक डिटेक्टर को प्रशिक्षित करें](./lessons/1-train-stock-detector/README.md)
1. [IoT डिवाइस से स्टॉक की जांच करें](./lessons/2-check-stock-device/README.md)
## क्रेडिट
सभी पाठ [जिम बेनेट] द्वारा के साथ लिखे गए थे (https://GitHub.com/JimBobBennett)

@ -19,7 +19,7 @@ In this lesson you will learn about language understanding models, how to create
In this lesson we'll cover:
* [Language understanding](#language-understanding)
* [Create a language understanding model](create-a-language-understanding-model)
* [Create a language understanding model](#create-a-language-understanding-model)
* [Intents and entities](#intents-and-entities)
* [Use the language understanding model](#use-the-language-understanding-model)

@ -103,21 +103,21 @@ Each language supports a range of different voices, and you can make a REST requ
```python
def play_speech(speech):
with wave.open(speech, 'rb') as wave_file:
stream = audio.open(format=audio.get_format_from_width(wave_file.getsampwidth()),
channels=wave_file.getnchannels(),
rate=wave_file.getframerate(),
output_device_index=speaker_card_number,
output=True)
with wave.open(speech, 'rb') as wave_file:
stream = audio.open(format=audio.get_format_from_width(wave_file.getsampwidth()),
channels=wave_file.getnchannels(),
rate=wave_file.getframerate(),
output_device_index=speaker_card_number,
output=True)
data = wave_file.readframes(4096)
while len(data) > 0:
stream.write(data)
data = wave_file.readframes(4096)
stream.stop_stream()
stream.close()
while len(data) > 0:
stream.write(data)
data = wave_file.readframes(4096)
stream.stop_stream()
stream.close()
```
This code uses a PyAudio stream, the same as capturing audio. The difference here is the stream is set as an output stream, and data is read from the audio data and pushed to the stream.

@ -42,7 +42,7 @@ Text translation has been a computer science problem that has been researched fo
Text translation started out as a technology known as Machine Translation (MT), that can translate between different language pairs. MT works by substituting words in one language with another, adding techniques to select the correct ways of translating phrases or parts of sentences when a simple word-for-word translation doesn't make sense.
> 🎓 When translators support translating between one language and another, these are know as *language pairs*. Different tools support different language pairs, and these may not be complete. For example, a translator may support English to Spanish as a language pair, and Spanish to Italian as a language pair, but not English to Italian.
> 🎓 When translators support translating between one language and another, these are known as *language pairs*. Different tools support different language pairs, and these may not be complete. For example, a translator may support English to Spanish as a language pair, and Spanish to Italian as a language pair, but not English to Italian.
For example, translating "Hello world" from English into French can be performed with a substitution - "Bonjour" for "Hello", and "le monde" for "world", leading to the correct translation of "Bonjour le monde".

@ -12,6 +12,7 @@
[![Chinese](https://img.shields.io/badge/-Chinese-yellow)](translations/README.zh-cn.md)
[![Turkish](https://img.shields.io/badge/-Turkish-darkgreen)](translations/README.tr.md)
[![French](https://img.shields.io/badge/-French-purple)](translations/README.fr.md)
[![Japanese](https://img.shields.io/badge/-Japanese-red)](translations/README.ja.md)
# IoT for Beginners - A Curriculum
@ -29,13 +30,15 @@ The projects cover the journey of food from farm to table. This includes farming
Meet the team!
[![Promo video](./images/iot-for-beginners.png)](https://youtu.be/-wippUJRi5k)
[![Promo video](./images/IOT.gif)](https://youtu.be/-wippUJRi5k)
**Gif by** [Mohit Jaisal](https://linkedin.com/in/mohitjaisal)
> 🎥 Click the image above for a video about the project!
> **Teachers**, we have [included some suggestions](for-teachers.md) on how to use this curriculum. If you would like to create your own lessons, we have also included a [lesson template](lesson-template/README.md).
> **Students**, to use this curriculum on your own, fork the entire repo and complete the exercises on your own, starting with a pre-lecture quiz, then reading the lecture and completing the rest of the activities. Try to create the projects by comprehending the lessons rather than copying the solution code; however that code is available in the /solutions folders in each project-oriented lesson. Another idea would be to form a study group with friends and go through the content together. For further study, we recommend [Microsoft Learn](https://docs.microsoft.com/users/jimbobbennett/collections/ke2ehd351jopwr?WT.mc_id=academic-17441-jabenn).
> **[Students](https://aka.ms/student-page)**, to use this curriculum on your own, fork the entire repo and complete the exercises on your own, starting with a pre-lecture quiz, then reading the lecture and completing the rest of the activities. Try to create the projects by comprehending the lessons rather than copying the solution code; however that code is available in the /solutions folders in each project-oriented lesson. Another idea would be to form a study group with friends and go through the content together. For further study, we recommend [Microsoft Learn](https://docs.microsoft.com/users/jimbobbennett/collections/ke2ehd351jopwr?WT.mc_id=academic-17441-jabenn).
For a video overview of this course, check out this video:

@ -19,6 +19,10 @@ where _[language]_ is a two letter language abbreviation following the ISO 639-1
> Important: when translating text in this repo, please ensure that you do not use machine translation. We will verify translations via the community, so please only volunteer for translations in languages where you are proficient.
## Links
When translating, please update links to the translated files. If a file hasn't been translated, keep the link to the English version. As each file is in a `translations` folder, you will also need to update the link depth for hyperlinks and images.
## Quizzes
Add your translation to the quiz-app by adding a file here: https://github.com/microsoft/IoT-For-Beginners/tree/main/quiz-app/src/assets/translations. Please don't localize the words 'true' or 'false' however. thanks!

@ -55,7 +55,7 @@ All the device code for Raspberry Pi is in Python. To complete all the assignmen
### Raspberry Pi hardware
* [Raspberry Pi](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/)
> 💁 Versions from the Pi 2B and above should work with the assignments in these lessons.
> 💁 Versions from the Pi 2B and above should work with the assignments in these lessons. If you are planning on running VS Code directly on the Pi, then a Pi 4 with 2GB or more of RAM is needed. If you are going to access the Pi remotely then any Pi 2B and above will work.
* microSD Card (You can get Raspberry Pi kits that come with a microSD Card), along with a connector to use the SD card with your computer if you don't have one built-in.
* USB power supply (You can get Raspberry Pi 4 kits that come with a power supply). If you are using a Raspberry Pi 4 you need a USB-C power supply, earlier devices need a micro-USB power supply.

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -3,11 +3,12 @@
<head>
<meta charset="UTF-8">
<title>Document</title>
<title>IoT for beginners</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="icon" type="image/png" href="images/favicon.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
</head>
@ -23,4 +24,4 @@
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
</body>
</html>
</html>

179
package-lock.json generated

@ -380,18 +380,6 @@
"node": ">=6"
}
},
"node_modules/clipboard": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz",
"integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==",
"dev": true,
"optional": true,
"dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
@ -587,13 +575,6 @@
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
"node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==",
"dev": true,
"optional": true
},
"node_modules/depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
@ -1031,16 +1012,6 @@
"node": ">=8"
}
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
"dev": true,
"optional": true,
"dependencies": {
"delegate": "^3.1.2"
}
},
"node_modules/got": {
"version": "9.6.0",
"resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
@ -1577,12 +1548,23 @@
"dev": true
},
"node_modules/node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dev": true,
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/normalize-path": {
@ -1841,12 +1823,12 @@
}
},
"node_modules/prismjs": {
"version": "1.23.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz",
"integrity": "sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==",
"version": "1.27.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz",
"integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==",
"dev": true,
"optionalDependencies": {
"clipboard": "^2.0.0"
"engines": {
"node": ">=6"
}
},
"node_modules/process-nextick-args": {
@ -2126,13 +2108,6 @@
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
"integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=",
"dev": true,
"optional": true
},
"node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
@ -2345,13 +2320,6 @@
"node": ">=8"
}
},
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
"dev": true,
"optional": true
},
"node_modules/tinydate": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz",
@ -2391,6 +2359,12 @@
"node": ">=0.6"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
"dev": true
},
"node_modules/tweezer.js": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/tweezer.js/-/tweezer.js-1.5.0.tgz",
@ -2566,6 +2540,22 @@
"node": ">= 0.4.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=",
"dev": true
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dev": true,
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
@ -3081,18 +3071,6 @@
"integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==",
"dev": true
},
"clipboard": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz",
"integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==",
"dev": true,
"optional": true,
"requires": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
@ -3257,13 +3235,6 @@
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
"delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==",
"dev": true,
"optional": true
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
@ -3615,16 +3586,6 @@
"ini": "1.3.7"
}
},
"good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
"dev": true,
"optional": true,
"requires": {
"delegate": "^3.1.2"
}
},
"got": {
"version": "9.6.0",
"resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
@ -4053,10 +4014,13 @@
"dev": true
},
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
"dev": true
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
}
},
"normalize-path": {
"version": "3.0.0",
@ -4245,13 +4209,10 @@
"dev": true
},
"prismjs": {
"version": "1.23.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz",
"integrity": "sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==",
"dev": true,
"requires": {
"clipboard": "^2.0.0"
}
"version": "1.27.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz",
"integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==",
"dev": true
},
"process-nextick-args": {
"version": "2.0.1",
@ -4482,13 +4443,6 @@
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
"integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=",
"dev": true,
"optional": true
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
@ -4663,13 +4617,6 @@
"integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==",
"dev": true
},
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
"dev": true,
"optional": true
},
"tinydate": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz",
@ -4697,6 +4644,12 @@
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
"dev": true
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
"dev": true
},
"tweezer.js": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/tweezer.js/-/tweezer.js-1.5.0.tgz",
@ -4838,6 +4791,22 @@
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
"dev": true
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=",
"dev": true
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dev": true,
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",

@ -6673,9 +6673,9 @@
}
},
"node_modules/follow-redirects": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
"version": "1.14.8",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
"integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==",
"dev": true,
"funding": [
{
@ -10219,45 +10219,6 @@
"node": ">=6.9.0"
}
},
"node_modules/postcss-discard-comments/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-discard-comments/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-discard-comments/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-discard-duplicates": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz",
@ -10294,45 +10255,6 @@
"node": ">=6.9.0"
}
},
"node_modules/postcss-discard-overridden/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-discard-overridden/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-discard-overridden/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-load-config": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.2.tgz",
@ -10394,51 +10316,12 @@
"node": ">=6.9.0"
}
},
"node_modules/postcss-merge-longhand/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-merge-longhand/node_modules/postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
"node_modules/postcss-merge-longhand/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-merge-longhand/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-merge-rules": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz",
@ -10504,51 +10387,12 @@
"node": ">=6.9.0"
}
},
"node_modules/postcss-minify-gradients/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-minify-gradients/node_modules/postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
"node_modules/postcss-minify-gradients/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-minify-gradients/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-minify-params": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz",
@ -10566,51 +10410,12 @@
"node": ">=6.9.0"
}
},
"node_modules/postcss-minify-params/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-minify-params/node_modules/postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
"node_modules/postcss-minify-params/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-minify-params/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-minify-selectors": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz",
@ -10626,24 +10431,6 @@
"node": ">=6.9.0"
}
},
"node_modules/postcss-minify-selectors/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
@ -10658,27 +10445,6 @@
"node": ">=8"
}
},
"node_modules/postcss-minify-selectors/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-minify-selectors/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-modules-extract-imports": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz",
@ -10691,45 +10457,6 @@
"node": ">= 6"
}
},
"node_modules/postcss-modules-extract-imports/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-modules-extract-imports/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-modules-extract-imports/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-modules-local-by-default": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz",
@ -10758,45 +10485,6 @@
"node": ">= 6"
}
},
"node_modules/postcss-modules-scope/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-modules-scope/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-modules-scope/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-modules-values": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz",
@ -13661,9 +13349,9 @@
}
},
"node_modules/url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
"dependencies": {
"querystringify": "^2.1.1",
@ -20466,9 +20154,9 @@
}
},
"follow-redirects": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
"version": "1.14.8",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
"integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==",
"dev": true
},
"for-in": {
@ -23283,34 +22971,6 @@
"dev": true,
"requires": {
"postcss": "^7.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"postcss-discard-duplicates": {
@ -23338,34 +22998,6 @@
"dev": true,
"requires": {
"postcss": "^7.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"postcss-load-config": {
@ -23415,37 +23047,11 @@
"stylehacks": "^4.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
@ -23506,37 +23112,11 @@
"postcss-value-parser": "^3.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
@ -23554,37 +23134,11 @@
"uniqs": "^2.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
@ -23600,17 +23154,6 @@
"postcss-selector-parser": "^3.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"postcss-selector-parser": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
@ -23621,21 +23164,6 @@
"indexes-of": "^1.0.1",
"uniq": "^1.0.1"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
@ -23646,34 +23174,6 @@
"dev": true,
"requires": {
"postcss": "^7.0.5"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"postcss-modules-local-by-default": {
@ -23696,34 +23196,6 @@
"requires": {
"postcss": "^7.0.6",
"postcss-selector-parser": "^6.0.0"
},
"dependencies": {
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"postcss-modules-values": {
@ -26111,9 +25583,9 @@
}
},
"url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",

@ -9,8 +9,10 @@
[![GitHub stars](https://img.shields.io/github/stars/microsoft/IoT-For-Beginners.svg?style=social&label=Star)](https://GitHub.com/microsoft/IoT-For-Beginners/stargazers/)
[![English](https://img.shields.io/badge/-English-red)](../README.md)
[![Chinese](https://img.shields.io/badge/-Chinese-yellow)](README.zh-cn.md)
[![Turkish](https://img.shields.io/badge/-Turkish-darkgreen)](README.tr.md)
[![Chinese](https://img.shields.io/badge/-Chinese-yellow)](translations/README.zh-cn.md)
[![Turkish](https://img.shields.io/badge/-Turkish-darkgreen)](translations/README.tr.md)
[![French](https://img.shields.io/badge/-French-purple)](translations/README.fr.md)
# বিগিনারদের জন্য আইওটি - একটি সুবিন্যস্ত পাঠ্যক্রম
@ -24,7 +26,7 @@
**হৃদয়ের অন্তঃস্থল থেকে কৃতজ্ঞতা জানাই এই কোর্সের রচয়িতা [Jen Fox](https://github.com/jenfoxbot), [Jen Looper](https://github.com/jlooper), [Jim Bennett](https://github.com/jimbobbennett) এবং স্কেচনোট শিল্পী [Nitya Narasimhan](https://github.com/nitya)কে ।**
**ধন্যবাদ জানাতে চাই আমাদের সেসকল [Microsoft Learn Student Ambassadors](https://studentambassadors.microsoft.com?WT.mc_id=academic-17441-jabenn)দের, যারা এই কারিক্যুলামটি রিভিউ এবং অনুবাদে কাজ করেছে - [Aditya Garg](https://github.com/AdityaGarg00),[Anurag Sharma](https://github.com/Anurag-0-1-A), [Arpita Das](https://github.com/Arpiiitaaa), [Aryan Jain](https://www.linkedin.com/in/aryan-jain-47a4a1145/), [Bhavesh Suneja](https://github.com/EliteWarrior315),[Faith Hunja](https://faithhunja.github.io/), [Lateefah Bello](https://www.linkedin.com/in/lateefah-bello/), [Manvi Jha](https://github.com/Severus-Matthew), [Mireille Tan](https://www.linkedin.com/in/mireille-tan-a4834819a/), [Mohammad Iftekher (Iftu) Ebne Jalal](https://github.com/Iftu119), [Priyanshu Srivastav](https://www.linkedin.com/in/priyanshu-srivastav-b067241ba), [Thanmai Gowducheruvu](https://github.com/innovation-platform), এবং [Zina Kamel](https://www.linkedin.com/in/zina-kamel/).**
**ধন্যবাদ জানাতে চাই আমাদের সেসকল [Microsoft Learn Student Ambassadors](https://studentambassadors.microsoft.com?WT.mc_id=academic-17441-jabenn)দের, যারা এই কারিক্যুলামটি রিভিউ এবং অনুবাদে কাজ করেছে - [Aditya Garg](https://github.com/AdityaGarg00),[Anurag Sharma](https://github.com/Anurag-0-1-A), [Arpita Das](https://github.com/Arpiiitaaa), [Aryan Jain](https://www.linkedin.com/in/aryan-jain-47a4a1145/), [Bhavesh Suneja](https://github.com/EliteWarrior315),[Faith Hunja](https://faithhunja.github.io/), [Lateefah Bello](https://www.linkedin.com/in/lateefah-bello/), [Manvi Jha](https://github.com/Severus-Matthew), [Mireille Tan](https://www.linkedin.com/in/mireille-tan-a4834819a/), [Mohammad Iftekher (Iftu) Ebne Jalal](https://github.com/Iftu119),[Mohammad Zulfikar](https://github.com/mohzulfikar), [Priyanshu Srivastav](https://www.linkedin.com/in/priyanshu-srivastav-b067241ba), [Thanmai Gowducheruvu](https://github.com/innovation-platform), এবং [Zina Kamel](https://www.linkedin.com/in/zina-kamel/).**
পুরো টীমের সাথে পরিচিত হওয়া যাক !
@ -89,9 +91,9 @@
| 12 | [পরিবহন](../3-transport) | লোকেশন ডেটা সংরক্ষণ | পরবর্তী সময়ে বিশ্লেষণ বা চিত্রভিত্তিক ডেটা প্রদর্শন (Visualization) এর জন্য আইওটি ডেটা কীভাবে স্টোর করা যায় তা জানা | [লোকেশন ডেটা সংরক্ষণ](../3-transport/lessons/2-store-location-data/translations/README.bn.md) |
| 13 | [পরিবহন](../3-transport) | লোকেশন ডেটা প্রদর্শন |মানচিত্রে অবস্থানের ডেটা প্রদর্শন করা এবং মানচিত্রগুলি কীভাবে ২টি মাত্রায় বাস্তব ত্রিমাত্রিক বিশ্বের উপস্থাপন করে সে সম্পর্কে জ্ঞান অর্জন | [লোকেশন ডেটা প্রদর্শন](../3-transport/lessons/3-visualize-location-data/translations/README.bn.md) |
| 14 | [পরিবহন](../3-transport) | Geofences | Geofences সম্পর্কে জানা এবং কীভাবে এটি ব্যবহার করে সাপ্লাই চেইনের বিভিন্ন পর্যায়ের বাহনগুলো যখন গন্তব্যের কাছাকাছি পৌঁছায় তখন এলার্ট দেয়া যায় তা শেখা | [Geofences](../3-transport/lessons/4-geofences/README.md) |
| 15 | [উৎপাদন](../4-manufacturing) | Train a fruit quality detector | ক্লাউডের ছবি শ্রেণিবদ্ধকরণ মডেলকে (Image Classifier) ফলের মান সনাক্ত করতে কীভাবে প্রশিক্ষিত করতে হবে সে সম্পর্কে জানা | [Train a fruit quality detector](../4-manufacturing/lessons/1-train-fruit-detector/README.md) |
| 16 | [উৎপাদন](../4-manufacturing) | Check fruit quality from an IoT device | আইওটি ডিভাইসে ফলের গুণগত মান সনাক্তকারী ব্যবহার | [Check fruit quality from an IoT device](../4-manufacturing/lessons/2-check-fruit-from-device/README.md) |
| 17 | [উৎপাদন](../4-manufacturing) | Run your fruit detector on the edge | ফলের গুণগত মান সনাক্তকারীকে Edge হিসেবে ব্যবহার | [Run your fruit detector on the edge](../4-manufacturing/lessons/3-run-fruit-detector-edge/README.md) |
| 15 | [উৎপাদন](../4-manufacturing) | খাদ্যপণ্যের গুণমান সনাক্তকারী মডেলকে ট্রেনিং প্রদান | ক্লাউডের ছবি শ্রেণিবদ্ধকরণ মডেলকে (Image Classifier) ফলের মান সনাক্ত করতে কীভাবে প্রশিক্ষিত করতে হবে সে সম্পর্কে জানা | [খাদ্যপণ্যের গুণমান সনাক্তকারী মডেলকে ট্রেনিং প্রদান](../4-manufacturing/lessons/1-train-fruit-detector/translations/README.bn.md) |
| 16 | [উৎপাদন](../4-manufacturing) | IoT ডিভাইস ব্যবহার করে ফলের মান যাচাই | আইওটি ডিভাইসে ফলের গুণগত মান সনাক্তকারী ব্যবহার | [IoT ডিভাইস ব্যবহার করে ফলের মান যাচাই](../4-manufacturing/lessons/2-check-fruit-from-device/translations/README.bn.md) |
| 17 | [উৎপাদন](../4-manufacturing) | Edge এ Fruit Detector পরিচালনা করা | ফলের গুণগত মান সনাক্তকারীকে Edge হিসেবে ব্যবহার | [Edge এ Fruit Detector পরিচালনা করা](../4-manufacturing/lessons/3-run-fruit-detector-edge/translations/README.bn.md) |
| 18 | [উৎপাদন](../4-manufacturing) | Trigger fruit quality detection from a sensor | সেন্সর থেকে ফলের গুণাগুণ সনাক্তকরণ নিয়ন্ত্রণ করা শেখা| [Trigger fruit quality detection from a sensor](../4-manufacturing/lessons/4-trigger-fruit-detector/README.md) |
| 19 | [খুচরাপর্যায়](../5-retail) | Train a stock detector | কোনও দোকানে স্টক গণনা করতে স্টক ডিটেক্টরকে প্রশিক্ষণ দেওয়ার জন্য কীভাবে অবজেক্ট সনাক্তকরণ ব্যবহার করা যায় তা শেখা | [Train a stock detector](../5-retail/lessons/1-train-stock-detector/README.md) |
| 20 | [খুচরাপর্যায়](../5-retail) | Check stock from an IoT device | কোন অবজেক্ট সনাক্তকরণ মডেল ব্যবহার করে আইওটি ডিভাইস থেকে স্টক পর্যবেক্ষণ করা শেখা | [Check stock from an IoT device](../5-retail/lessons/2-check-stock-device/README.md) |
@ -112,10 +114,13 @@
npm i
npm run convert
```
### স্লাইড
কিছু কিছু লেসনের স্লাইড ডেক, এখানে [slides](./slides) ফোল্ডারে রয়েছে।
## সাহায্য প্রয়োজন!
অনুবাদের কাজ করে এই কারিক্যুলামে অবদান করতে চান? তাহলে অনুগ্রহ করে আমাদের [অনুবাদ গাইডলাইন](translations/TRANSLATIONS.bn.md) পড়ে , যেকোন একটি [Translation Issue](https://github.com/microsoft/IoT-For-Beginners/issues?q=is%3Aissue+is%3Aopen+label%3Atranslation) এ ইনপুট দেয়ার অনুরোধ করা হলো। যদি কোন নতুন ভাষায় অনুবাদ করতে কেউ আগ্রহী হয়, তবে ট্র্যাকিংয়ের জন্য দয়া করে একটি নতুন Issue সাবমিট করতে হবে।
অনুবাদের কাজ করে এই কারিক্যুলামে অবদান করতে চান? তাহলে অনুগ্রহ করে আমাদের [অনুবাদ গাইডলাইন](TRANSLATIONS.md) পড়ে , যেকোন একটি [Translation Issue](https://github.com/microsoft/IoT-For-Beginners/issues?q=is%3Aissue+is%3Aopen+label%3Atranslation) এ ইনপুট দেয়ার অনুরোধ করা হলো। যদি কোন নতুন ভাষায় অনুবাদ করতে কেউ আগ্রহী হয়, তবে ট্র্যাকিংয়ের জন্য দয়া করে একটি নতুন Issue সাবমিট করতে হবে।
## অন্য পাঠ্যক্রম সমূহ
@ -123,6 +128,7 @@ npm run convert
- [Web Dev for Beginners](https://aka.ms/webdev-beginners)
- [ML for Beginners](https://aka.ms/ml-beginners)
- [Data Science for Beginners](https://aka.ms/datascience-beginners)
## চিত্রের Attributions

@ -23,9 +23,9 @@ L'ensemble des projets parlent du parcours que les aliments suivent, de la ferme
> Illustré de [Nitya Narasimhan](https://github.com/nitya). Cliquez sur l'image pour l'agrandir.
**Un remerciements chaleureux à nos auteurs [Jen Fox](https://github.com/jenfoxbot), [Jen Looper](https://github.com/jlooper), [Jim Bennett](https://github.com/jimbobbennett), and our sketchnote artist [Nitya Narasimhan](https://github.com/nitya).**
**Un remerciements chaleureux à nos auteurs [Jen Fox](https://github.com/jenfoxbot), [Jen Looper](https://github.com/jlooper), [Jim Bennett](https://github.com/jimbobbennett), et notre artiste de sketchs [Nitya Narasimhan](https://github.com/nitya).**
**Un grand merci aussi à notre équipe [Microsoft Learn Student Ambassadors](https://studentambassadors.microsoft.com?WT.mc_id=academic-17441-jabenn) qui ont révisés et traduit cette série de cours - [Aditya Garg](https://github.com/AdityaGarg00), [Anurag Sharma](https://github.com/Anurag-0-1-A), [Arpita Das](https://github.com/Arpiiitaaa), [Aryan Jain](https://www.linkedin.com/in/aryan-jain-47a4a1145/), [Bhavesh Suneja](https://github.com/EliteWarrior315), [Faith Hunja](https://faithhunja.github.io/), [Lateefah Bello](https://www.linkedin.com/in/lateefah-bello/), [Manvi Jha](https://github.com/Severus-Matthew), [Mireille Tan](https://www.linkedin.com/in/mireille-tan-a4834819a/), [Mohammad Iftekher (Iftu) Ebne Jalal](https://github.com/Iftu119), [Mohammad Zulfikar](https://github.com/mohzulfikar), [Priyanshu Srivastav](https://www.linkedin.com/in/priyanshu-srivastav-b067241ba), [Thanmai Gowducheruvu](https://github.com/innovation-platform), and [Zina Kamel](https://www.linkedin.com/in/zina-kamel/).**
**Un grand merci aussi à notre équipe [Microsoft Learn Student Ambassadors](https://studentambassadors.microsoft.com?WT.mc_id=academic-17441-jabenn) qui ont révisés et traduit cette série de cours - [Aditya Garg](https://github.com/AdityaGarg00), [Anurag Sharma](https://github.com/Anurag-0-1-A), [Arpita Das](https://github.com/Arpiiitaaa), [Aryan Jain](https://www.linkedin.com/in/aryan-jain-47a4a1145/), [Bhavesh Suneja](https://github.com/EliteWarrior315), [Faith Hunja](https://faithhunja.github.io/), [Lateefah Bello](https://www.linkedin.com/in/lateefah-bello/), [Manvi Jha](https://github.com/Severus-Matthew), [Mireille Tan](https://www.linkedin.com/in/mireille-tan-a4834819a/), [Mohammad Iftekher (Iftu) Ebne Jalal](https://github.com/Iftu119), [Mohammad Zulfikar](https://github.com/mohzulfikar), [Priyanshu Srivastav](https://www.linkedin.com/in/priyanshu-srivastav-b067241ba), [Thanmai Gowducheruvu](https://github.com/innovation-platform), ainsi que [Zina Kamel](https://www.linkedin.com/in/zina-kamel/).**
Rencontrez l'équipe!

@ -0,0 +1,146 @@
[![GitHub license](https://img.shields.io/github/license/microsoft/IoT-For-Beginners.svg)](https://github.com/microsoft/IoT-For-Beginners/blob/master/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/microsoft/IoT-For-Beginners.svg)](https://GitHub.com/microsoft/IoT-For-Beginners/graphs/contributors/)
[![GitHub issues](https://img.shields.io/github/issues/microsoft/IoT-For-Beginners.svg)](https://GitHub.com/microsoft/IoT-For-Beginners/issues/)
[![GitHub pull-requests](https://img.shields.io/github/issues-pr/microsoft/IoT-For-Beginners.svg)](https://GitHub.com/microsoft/IoT-For-Beginners/pulls/)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![GitHub watchers](https://img.shields.io/github/watchers/microsoft/IoT-For-Beginners.svg?style=social&label=Watch)](https://GitHub.com/microsoft/IoT-For-Beginners/watchers/)
[![GitHub forks](https://img.shields.io/github/forks/microsoft/IoT-For-Beginners.svg?style=social&label=Fork)](https://GitHub.com/microsoft/IoT-For-Beginners/network/)
[![GitHub stars](https://img.shields.io/github/stars/microsoft/IoT-For-Beginners.svg?style=social&label=Star)](https://GitHub.com/microsoft/IoT-For-Beginners/stargazers/)
[![Bengali](https://img.shields.io/badge/-Bengali-blue)](../translations/README.bn.md)
[![Chinese](https://img.shields.io/badge/-Chinese-yellow)](../translations/README.zh-cn.md)
[![English](https://img.shields.io/badge/-English-red)](../README.md)
[![Turkish](https://img.shields.io/badge/-Turkish-darkgreen)](../translations/README.tr.md)
[![French](https://img.shields.io/badge/-French-purple)](../translations/README.fr.md)
# IoT for Beginners - A Curriculum
我々、Microsoft社のクラウドアドボケイトチームはIoTの基礎に関する12週間にわたる合計24のレッスンをご提供できることを心より嬉しく思います。 それぞれのレッスンには問題、解説、IoTのソリューションの紹介、課題などが用意されており、実践的な学習を通して効率的にIoTスキルの取得をすることができます。
このプロジェクトでは、農業、物流、製造業、小売、消費者などIoTが用いられる主要な業界全てを取り上げます。
![A road map for the course showing 24 lessons covering intro, farming, transport, processing, retail and cooking](../sketchnotes/Roadmap.jpg)
> Sketchnote by [Nitya Narasimhan](https://github.com/nitya). Click the image for a larger version.
**著者である [Jen Fox](https://github.com/jenfoxbot), [Jen Looper](https://github.com/jlooper), [Jim Bennett](https://github.com/jimbobbennett), そしてアーティストである [Nitya Narasimhan](https://github.com/nitya)に心より感謝します。**
**そしてプロジェクトに協力してくれた[Microsoft Learn Student Ambassadors](https://studentambassadors.microsoft.com?WT.mc_id=academic-17441-jabenn)のメンバーにも感謝の言葉を送ります。( [Aditya Garg](https://github.com/AdityaGarg00), [Anurag Sharma](https://github.com/Anurag-0-1-A), [Arpita Das](https://github.com/Arpiiitaaa), [Aryan Jain](https://www.linkedin.com/in/aryan-jain-47a4a1145/), [Bhavesh Suneja](https://github.com/EliteWarrior315), [Faith Hunja](https://faithhunja.github.io/), [Lateefah Bello](https://www.linkedin.com/in/lateefah-bello/), [Manvi Jha](https://github.com/Severus-Matthew), [Mireille Tan](https://www.linkedin.com/in/mireille-tan-a4834819a/), [Mohammad Iftekher (Iftu) Ebne Jalal](https://github.com/Iftu119), [Mohammad Zulfikar](https://github.com/mohzulfikar), [Priyanshu Srivastav](https://www.linkedin.com/in/priyanshu-srivastav-b067241ba), [Thanmai Gowducheruvu](https://github.com/innovation-platform), [Zina Kamel](https://www.linkedin.com/in/zina-kamel/))**
Meet the team!
[![Promo video](../images/IOT.gif)](https://youtu.be/-wippUJRi5k)
**Gif by** [Mohit Jaisal](https://linkedin.com/in/mohitjaisal)
> 🎥 上記の画像をクリックするとビデオが見れます。
> **教師の方々へ** : [こちら](../for-teachers.md)を参考にして講義をするめることをお勧めします。もしご自身で新しいレッスンを追加されたい場合は [こちら](../lesson-template/README.md)のテンプレートをご利用ください。
> **学習者の皆様へ** : こちらのカリキュラムを使うために、フォークを作成しご自身の環境でレッスンを進めてください。また、各レッスンのソリューションは/solutionフォルダから確認可能ですが、コードをコピーペーストするのではなくご自身で手を動かして実装することをお勧めします。学習をさらに進めるために友達と勉強会を開くのもいいかもしれません。さらに学習を進めるには[Microsoft Learn](https://docs.microsoft.com/users/jimbobbennett/collections/ke2ehd351jopwr?WT.mc_id=academic-17441-jabenn)を参考にしてください。
コースで用いられる動画の概要については以下の動画をご覧ください。
[![Promo video](https://img.youtube.com/vi/bccEMm8gRuc/0.jpg)](https://youtube.com/watch?v=bccEMm8gRuc "Promo video")
> 🎥 上記の画像をクリックするとビデオが見れます。
## 勉強方法 
このプロジェクトではプロジェクトベースの学習方法を実現するための2つのルールを採用しました。1つ目は各シリーズの終わりに植物の水やり機や自動車追跡、食べ物を追跡するスマートファクトリーの設定、音声で操作できるキッチンタイマーなどを実践的に学習者が実装できるように各レッスンをデザインしました。これにより、IoTの基礎、組み込み向けのコードの書き方、クラウドとの連携方法、遠隔計測値の分析、エッジデバイスでAIを実行する方法などを包括的に学ぶことができ、より実践に近い学習を行うことができます。
2つ目に、それぞれのレッスンの前後に簡単な問題(quiz)を設けることで学習した内容がより定着するよにしています。また、このプロジェクトは全部で12週間と膨大なため、学びたい分野のみを選択して学習できるように設計されています。
それぞれのプロジェクトで用いられるハードウェアは誰もが利用できるように世界中で広く利用されているものを採用し、特定の分野における背景や課題を説明するようにしています。ある特定の業界、分野における背景を知ることは開発者として成功する上でとても重要です。背景を知ることで、実際の業務で問われるような課題や必要な知識、IoTソリューションの実装についてイメージしやすく、そのソリューションの”なぜ”を知ることでよりユーザ視点に立ったソリューションを提供できます。
## ハードウェア
柔軟に自分に合った選択ができるように、IoTハードウェアに関して2つの選択肢を用意しました。それに加えてデバイスを購入したくない方や何らかの事情でハードウェアが購入できない方のために"仮想ハードウェア"を提供しています。 詳細に関しては[hardware page](../hardware.md)の'shopping list'から確認できます。
> 💁 意見などあればぜひIssueを用いて我々に伝えてください。Contributionするためには[Code of Conduct](../CODE_OF_CONDUCT.md), [Contributing](../CONTRIBUTING.md), [Translation](../TRANSLATIONS.md)に目を通しておいてください。
## それぞれのレッスンの内容
- スケッチノート
- ビデオ(任意)
- レッスン前に行う問題 (Quiz)
- レッスン
- プロジェクトを完成するための段階ごとの説明(プロジェクトベースのレッスンの場合)
- 知識確認
- チャレンジ問題
- 追加資料
- 課題
- レッスンの最後に行う問題Quiz)
> **問題に関して**: 全ての問題は[このアプリ](https://brave-island-0b7c7f50f.azurestaticapps.net)で利用可能です。問題はそれぞれのレッスン内でリンクが貼られています。もしローカルでアプリを起動したい場合は`quiz-app`フォルダーを参照してください。
## レッスン
| | プロジェクト名 | コンセプト | 学習標 | 関連するレッスン Lesson |
|:--:|:------------------------------------------:|:------------------------------------------:|------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------:|
| 01 | [Getting started](../1-getting-started) | IoTの基本 | IoTの基礎知識、IoTソリューションで用いられているセンサーやクラウドサービスといった基本的な技術について学習し、最初のIoTデバイスの設定を行います。 | [Introduction to IoT](../1-getting-started/lessons/1-introduction-to-iot/README.md) |
| 02 | [Getting started](../1-getting-started) | IoTの世界へ | IoTシステムの構成、マイクロコントローラ、シングルボードコンピュータについて学びます。 | [A deeper dive into IoT](../1-getting-started/lessons/2-deeper-dive/README.md) |
| 03 | [Getting started](../1-getting-started) | センサーとアクチュエータを用いた実践 | センサーを用いてデータを集め、アクチュエータを用いてFeedbackを送信する方法について常夜灯の実装を通して学びます。 | [Interact with the physical world with sensors and actuators](../1-getting-started/lessons/3-sensors-and-actuators/README.md) |
| 04 | [Getting started](../1-getting-started) | デバイスのインターネットへの接続 | ナイトライトとMQTTブローカーを用いてIoTのインターネットへの接続方法とメッセージの送受信方法について学びます。 | [Connect your device to the Internet](../1-getting-started/lessons/4-connect-internet/README.md) |
| 05 | [Farm](../2-farm) | 植物の成長予測 | IoTデバイスで取得した温度データを用いて植物の成長を予測する方法について学びます。 | [Predict plant growth](../2-farm/lessons/1-predict-plant-growth/README.md) |
| 06 | [Farm](../2-farm) | 土の水分計測 | 土の水分の計測方法とセンサーの調整方法を学びます。 | [Detect soil moisture](../2-farm/lessons/2-detect-soil-moisture/README.md) |
| 07 | [Farm](../2-farm) | 自動水やり機 | MQTTと中継機を用いて水やりを自動化する方法を学びます。 | [Automated plant watering](../2-farm/lessons/3-automated-plant-watering/README.md) |
| 08 | [Farm](../2-farm) | クラウドへの移行 | クラウドとクラウドのIoTソリューション、MQTTブローカーの代わりにクラウドを用いる方法について学びます。 | [Migrate your plant to the cloud](../2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md) |
| 09 | [Farm](../2-farm) | 水やり機のアプケーションをクラウドへ移行 | IoTメッセージに対応するアプリケーションのクラウド上での実装方法について学びます。 | [Migrate your application logic to the cloud](../2-farm/lessons/5-migrate-application-to-the-cloud/README.md) |
| 10 | [Farm](../2-farm) | 水やり機のセキュリティ | IoTのセキュリティ、キーと証明書を用いて水やり機をセキュアに保つ方法を学びます。 | [Keep your plant secure](../2-farm/lessons/6-keep-your-plant-secure/README.md) |
| 11 | [Transport](../3-transport) | 位置追跡 | IoTデバイスでGPS位置情報を用いた追跡について学びます。 | [Location tracking](../3-transport/lessons/1-location-tracking/README.md) |
| 12 | [Transport](../3-transport) | 位置データの保存 | 分析や可視化のためにIoTデータを保存する方法を学びます。 | [Store location data](../3-transport/lessons/2-store-location-data/README.md) |
| 13 | [Transport](../3-transport) | 位置データの可視化 | 位置データをMap上で可視化し、Mapがどのように3次元データを2次元データとして表現しているのかについて学びます。 | [Visualize location data](../3-transport/lessons/3-visualize-location-data/README.md) |
| 14 | [Transport](../3-transport) | ジオフェンス | ジオフェンスとジオフェンスを用いてサプライチェーンにある車両が近くにきたらアラートを鳴らす方法を学びます。 | [Geofences](../3-transport/lessons/4-geofences/README.md) |
| 15 | [Manufacturing](../4-manufacturing) | フルーツの品質を識別するAIの学習 | フルーツの品質を識別する識別器をクラウド上で学習する方法を学びます。 | [Train a fruit quality detector](../4-manufacturing/lessons/1-train-fruit-detector/README.md) |
| 16 | [Manufacturing](../4-manufacturing) | IoTデバイスからフルーツの品質を確認する | フルーツの品質を識別するAIをIoTデバイスから利用する方法を学びます。 | [Check fruit quality from an IoT device](../4-manufacturing/lessons/2-check-fruit-from-device/README.md) |
| 17 | [Manufacturing](../4-manufacturing) | 識別器をEdgeで動かす | Edgeデバイス上で識別器を動かす方法を学びます。 | [Run your fruit detector on the edge](../4-manufacturing/lessons/3-run-fruit-detector-edge/README.md) |
| 18 | [Manufacturing](../4-manufacturing) | センサーでフルーツの品質識別を起動する | センサーを用いてフルーツ品質識別を起動する方法を学びます | [Trigger fruit quality detection from a sensor](../4-manufacturing/lessons/4-trigger-fruit-detector/README.md) |
| 19 | [Retail](../.-retail) | 在庫管理AIの学習 | 物体認識を用いて店舗の在庫を識別する方法を学びます。 | [Train a stock detector](../5-retail/lessons/1-train-stock-detector/README.md) |
| 20 | [Retail](../5-retail) | IoTデバイスから在庫を確認する | 物体認識モデルを用いてIoTデバイスから在庫を確認する豊富を学びます。 | [Check stock from an IoT device](../5-retail/lessons/2-check-stock-device/README.md) |
| 21 | [Consumer](../6-consumer) | IoTデバイスを用いた音声認識 | スマートタイマーを実装するためにIoTデバイスから音声認識を行う方法について学びます。 | [Recognize speech with an IoT device](../6-consumer/lessons/1-speech-recognition/README.md) |
| 22 | [Consumer](../6-consumer) | 発話内容を理解する | IoTデバイスで取得した発話内容を理解する方法を学びます。 | [Understand language](../6-consumer/lessons/2-language-understanding/README.md) |
| 23 | [Consumer](../6-consumer) | タイマーのセットと通知 | IoTデバイスでタイマーをセットし、タイマーの開始と終わりに音声で通知する方法を学びます。 | [Set a timer and provide spoken feedback](../6-consumer/lessons/3-spoken-feedback/README.md) |
| 24 | [Consumer](../6-consumer) | 複数言語のサポート | 複数の言語で音声認識、通知する方法を学びます。 | [Support multiple languages](../6-consumer/lessons/4-multiple-language-support/README.md) | |
## オフラインアクセス
[Docsify](https://docsify.js.org/#/)を使えばオフラインでこのドキュメントを利用できます。フォークを作成して、[Docsifyをインストール](https://docsify.js.org/#/quickstart)してください。 インストールが完了したらプロジェクトのルートディレクトリで`docsify serve`を実行し、ブラウザで`localhost:3000`を開いてください。
### PDF
必要であればPDFを作成することもできます。 [npmをインストール](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)し、プロジェクトのルートディレクトリから以下のコマンドを実行してください。
```sh
npm i
npm run convert
```
### スライド
[slides](../slides)フォルダーからレッスンのスライドにアクセスできます。
## あなたの助けが必要です!
翻訳に協力していただける方は [translation guidelines](../TRANSLATIONS.md) と [Translation issue](https://github.com/microsoft/IoT-For-Beginners/issues?q=is%3Aissue+is%3Aopen+label%3Atranslation)を確認してください。 もしまだ翻訳されていない言語の翻訳をしたい場合は、新しいIssueを作ってください。
## そのほかのカリキュラム
私たちはIoT以外にも以下のカリキュラムも提供しています。
- [Web Dev for Beginners](https://aka.ms/webdev-beginners)
- [ML for Beginners](https://aka.ms/ml-beginners)
- [Data Science for Beginners](https://aka.ms/datascience-beginners)
## 画像著作権
このカリキュラムで使用されている画像全ての著作権帰属先については、必要に応じて[Attributions](../attributions.md)を参照してください。
## 日本語翻訳について
日本語の翻訳に関してFeedbackがあればこちらの[Issue](https://github.com/microsoft/IoT-For-Beginners/issues/195)でコメントする、もしくは新たなIssueを作成しTranslatorにメンションしてください。

@ -17,6 +17,12 @@ Lorsque vous traduisez le Readme initial, reliez les autres traductions à votre
Dans la mesure ou _[language]_ est une abréviation linguistique de deux lettres suivant la norme ISO 639-1 (par exemple `README.es.md` pour l'espagnol et `README.nl.md` pour l'allemand).
> Important: lorsque vous traduisez du texte dans ce dépôt, assurez vous de ne pas utiliser de traduction automatique. Nous vérifierons les traductions via la communauté, veuillez donc vous porter volontaire uniquement pour les traductions dans les langues que vous maîtrisez.
## Liens
Lors de la traduction, veuillez mettre à jour les liens vers les fichiers traduits. Si un fichier n'a pas été traduit, conservez le lien vers la version anglaise. Comme chaque fichier se trouve dans un dossier `translations`, vous devrez également mettre à jour le chemin des liens pour les hyperliens et les images.
## Questionnaires
Ajoutez votre traduction au quiz-app en ajoutant un fichier ici : https://github.com/microsoft/IoT-For-Beginners/tree/main/quiz-app/src/assets/translations. Veuillez ne pas localiser les mots 'true' ou 'false'. Merci !

Loading…
Cancel
Save