From 56e657e01528c228e425bfdec4b77730969db973 Mon Sep 17 00:00:00 2001 From: Jim Bennett Date: Fri, 30 Jul 2021 10:12:39 -0700 Subject: [PATCH 1/3] Adding more on virtual environments. (#274) * Update README.md * Spelling fixes * Update hardware.md * Adding IoT for beginners episode * Adding intro video * Fixing formatting of read more and self study sections. * Adding instructions for installing the ReSpeaker * Adding auth to language understanding * Adding Wio terminal timer setting * Update config.h * Fixing links and images * Increasing version numbers for SD card fix * Adding SD card requirement * speech and translations * Adding more on translations * All Wio Terminal now working except playing audio * Adding more details on virtual environments. --- 1-getting-started/lessons/1-introduction-to-iot/pi.md | 8 ++++++-- .../lessons/1-introduction-to-iot/virtual-device.md | 10 ++++++---- 1-getting-started/lessons/4-connect-internet/README.md | 10 +++++----- .../single-board-computer-commands.md | 2 +- .../4-connect-internet/single-board-computer-mqtt.md | 2 +- .../single-board-computer-telemetry.md | 2 +- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/1-getting-started/lessons/1-introduction-to-iot/pi.md b/1-getting-started/lessons/1-introduction-to-iot/pi.md index d9758603..3e8fffda 100644 --- a/1-getting-started/lessons/1-introduction-to-iot/pi.md +++ b/1-getting-started/lessons/1-introduction-to-iot/pi.md @@ -49,7 +49,9 @@ To program the Pi using the Grove sensors and actuators, you will need to instal curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s - ``` - One of the powerful features of Python is the ability to install [pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a pip package onto your computer with one command, then use that package in your code. This Grove install script will install the pip packages you will use to work with the Grove hardware from Python. + One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code. This Grove install script will install the Pip packages you will use to work with the Grove hardware from Python. + + > 💁 By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install Pip packages they get installed just to that folder. You won't be using virtual environments when using your Pi. The Grove install script installs the Grove Python packages globally, so to use a virtual environment you would need to set up a virtual environment then manually re-install the Grove packages inside that environment. It's easier to just use global packages, especially as a lot of Pi developers will re-flash a clean SD card for each project. 1. Reboot the Pi either using the menu or running the following command in the Terminal: @@ -163,7 +165,9 @@ Configure the installed Pi software and install the Grove libraries. curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s - ``` - One of the powerful features of Python is the ability to install [pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a pip package onto your computer with one command, then use that package in your code. This Grove install script will install the pip packages you will use to work with the Grove hardware from Python. + One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code. This Grove install script will install the Pip packages you will use to work with the Grove hardware from Python. + + > 💁 By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install Pip packages they get installed just to that folder. You won't be using virtual environments when using your Pi. The Grove install script installs the Grove Python packages globally, so to use a virtual environment you would need to set up a virtual environment then manually re-install the Grove packages inside that environment. It's easier to just use global packages, especially as a lot of Pi developers will re-flash a clean SD card for each project. 1. Reboot the Pi by running the following command: diff --git a/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md b/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md index ec101791..132186ba 100644 --- a/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md +++ b/1-getting-started/lessons/1-introduction-to-iot/virtual-device.md @@ -30,13 +30,15 @@ This app will be in a folder called `nightlight`, and it will be re-used with di ### Configure a Python virtual environment -One of the powerful features of Python is the ability to install [pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a pip package onto your computer with one command, then use that package in your code. You'll be using pip to install a package to talk to CounterFit. +One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code. You'll be using Pip to install a package to talk to CounterFit. -By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install pip packages they get installed just to that folder. +By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install Pip packages they get installed just to that folder. + +> 💁 If you are using a Raspberry Pi then you didn't set up a virtual environment on that device to manage Pip packages, instead you are using global packages, as the Grove packages are installed globally by the installer script. #### Task - configure a Python virtual environment -Configure a Python virtual environment and install the pip packages for CounterFit. +Configure a Python virtual environment and install the Pip packages for CounterFit. 1. From your terminal or command line, run the following at a location of your choice to create and navigate to a new directory: @@ -91,7 +93,7 @@ Configure a Python virtual environment and install the pip packages for CounterF > 💁 Your Python version may be different - as long as it's version 3.6 or higher you are good. If not, delete this folder, install a newer version of Python and try again. -1. Run the following commands to install the pip packages for CounterFit. These packages include the main CounterFit app as well as shims for Grove hardware. These shims allow you to write code as if you were programming using physical sensors and actuators from the Grove ecosystem but connected to virtual IoT devices. +1. Run the following commands to install the Pip packages for CounterFit. These packages include the main CounterFit app as well as shims for Grove hardware. These shims allow you to write code as if you were programming using physical sensors and actuators from the Grove ecosystem but connected to virtual IoT devices. ```sh pip install CounterFit diff --git a/1-getting-started/lessons/4-connect-internet/README.md b/1-getting-started/lessons/4-connect-internet/README.md index 31567fcd..18233d7a 100644 --- a/1-getting-started/lessons/4-connect-internet/README.md +++ b/1-getting-started/lessons/4-connect-internet/README.md @@ -124,7 +124,7 @@ The cloud service can then use this telemetry data to make decisions around what The next part in adding Internet control to your nightlight is sending the light level telemetry to the MQTT broker on a telemetry topic. -#### Task +#### Task - send telemetry from your IoT device Send light level telemetry to the MQTT broker. @@ -145,9 +145,9 @@ There's no point in sending telemetry if there's nothing on the other end to lis #### Install Python and VS Code -If you don't have Python and VS Code installed locally, you will need to install them both to code the server. If you are using a virtual device, or are working on your Raspberry Pi you can skip this step. +If you don't have Python and VS Code installed locally, you will need to install them both to code the server. If you are using a virtual IoT device, or are working on your Raspberry Pi you can skip this step as you should already have this installed and configured. -##### Task +##### Task - install Python and VS Code Install Python and VS Code. @@ -165,7 +165,7 @@ One of the powerful features of Python is the ability to install [pip packages]( By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install pip packages they get installed just to that folder. -##### Task +##### Task - configure a Python virtual environment Configure a Python virtual environment and install the MQTT pip packages. @@ -234,7 +234,7 @@ Configure a Python virtual environment and install the MQTT pip packages. The server code can now be written in Python. -##### Task +##### Task - write the server code Write the server code. diff --git a/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md b/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md index 84464cb6..65ff56a4 100644 --- a/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md +++ b/1-getting-started/lessons/4-connect-internet/single-board-computer-commands.md @@ -12,7 +12,7 @@ Subscribe to commands. 1. Open the nightlight project in VS Code. -1. If you are using a virtual IoT device, ensure the terminal is running the virtual environment +1. If you are using a virtual IoT device, ensure the terminal is running the virtual environment. If you are using a Raspberry Pi you won't be using a virtual environment. 1. Add the following code after the definitions of the `client_telemetry_topic`: diff --git a/1-getting-started/lessons/4-connect-internet/single-board-computer-mqtt.md b/1-getting-started/lessons/4-connect-internet/single-board-computer-mqtt.md index a1f11d11..3d2e1ffc 100644 --- a/1-getting-started/lessons/4-connect-internet/single-board-computer-mqtt.md +++ b/1-getting-started/lessons/4-connect-internet/single-board-computer-mqtt.md @@ -14,7 +14,7 @@ Install the pip package 1. Open the nightlight project in VS Code. -1. If you are using a virtual IoT device, ensure the terminal is running the virtual environment. +1. If you are using a virtual IoT device, ensure the terminal is running the virtual environment. If you are using a Raspberry Pi you won't be using a virtual environment. 1. Run the following command to install the MQTT pip package: diff --git a/1-getting-started/lessons/4-connect-internet/single-board-computer-telemetry.md b/1-getting-started/lessons/4-connect-internet/single-board-computer-telemetry.md index 08bf6019..6cae5fa1 100644 --- a/1-getting-started/lessons/4-connect-internet/single-board-computer-telemetry.md +++ b/1-getting-started/lessons/4-connect-internet/single-board-computer-telemetry.md @@ -12,7 +12,7 @@ Publish telemetry to the MQTT broker. 1. Open the nightlight project in VS Code. -1. If you are using a virtual IoT device, ensure the terminal is running the virtual environment +1. If you are using a virtual IoT device, ensure the terminal is running the virtual environment. If you are using a Raspberry Pi you won't be using a virtual environment. 1. Add the following import to the top of the `app.py` file: From 8b6335c8da5230f52ff9fdf8f7b78ede6680e871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Hakim=20Ta=C5=9Fk=C4=B1ran?= <52009742+alihakimtaskiran@users.noreply.github.com> Date: Fri, 13 Aug 2021 22:46:31 +0300 Subject: [PATCH 2/3] Update README.tr.md (#283) --- translations/README.tr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/README.tr.md b/translations/README.tr.md index cfda4ec7..ba7420d3 100644 --- a/translations/README.tr.md +++ b/translations/README.tr.md @@ -73,7 +73,7 @@ We have two choices of IoT hardware to use for the projects depending on persona > **Quiz'ler hakkında bir not**: Tüm quizler [bu uygulamada](https://brave-island-0b7c7f50f.azurestaticapps.net), toplam 48 quiz için her birine 3 soru. Quizlerin ilgili derslerde linkleri vardır. Ayrıca quiz uygulaması kendi cihanızdan da çalışabilir. Bunun için `quiz-app` kalsöründeki talimatlara uyun. -## Lessons +## Dersler | | Proje Adı | Öğretilen Kavramlar | Hedeflenen Konular | Bağlantılı Ders | | :-: | :----------: | :-------------: | ------------------- | :-----------: | From 54ea95dcd6757b11e50649da5b1eef5a8f7a4cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Hakim=20Ta=C5=9Fk=C4=B1ran?= <52009742+alihakimtaskiran@users.noreply.github.com> Date: Sat, 14 Aug 2021 22:44:48 +0300 Subject: [PATCH 3/3] Update README.tr.md (#285) --- translations/README.tr.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translations/README.tr.md b/translations/README.tr.md index ba7420d3..ee25bbfd 100644 --- a/translations/README.tr.md +++ b/translations/README.tr.md @@ -52,11 +52,11 @@ Ayrıca; dersten önce ufak bir quiz öğrencinin konu hakkında bir fikri olmas Her proje öğrencilerde ve hobicilerde bulunan gerçek donanımlara dayanır. Her proje; özel proje alanlarına, ve ilgili temel bilgilere bakar. Başarılı bir geliştirici olmak için, sorunları çözdüğünüz alanı anlamaya yardımcı olur; bu temel bilgiyi sağlamak, öğrencilerin, çözmeleri istenebilecek sorunu kendi IoT çözümleri ve öğrendikleri hakkında düşünmelerini sağlar. Öğrenciler çözüm için neyi niçin ürettiklerini öğrenir ve kullanıcı onları takdir eder. -## Hardware +## Donanım +Kişisel tercih, programlama dili bilgisi ve tercihi, öğrenme amaçları ve erişilebilirlik için iki IoT donanımı seçeneğimiz var. Ayrıca donanıma erişimi olmayanlara ve o donanımları henüz öğrenmeden satın alamayacaklara 'sanal donanım' şeklini sunduk. Daha fazlasını ve alışveriş listesini [donanım sayfasından](../hardware.md) okuyabilirsiniz. Orada Seed Studio'dan arkadaşlarımızdan satın alabileceğiniz linkler mevcut. -We have two choices of IoT hardware to use for the projects depending on personal preference, programming language knowledge or preferences, learning goals and availability. We have also provided a 'virtual hardware' version for those who don't have access to hardware, or want to learn more before committing to a purchase. You can read more and find a 'shopping list' on the [hardware page](../hardware.md), including links to buy complete kits from our friends at Seeed Studio. -> 💁 Find our [Code of Conduct](../CODE_OF_CONDUCT.md), [Contributing](../CONTRIBUTING.md), and [Translation](../TRANSLATIONS.md) guidelines. We welcome your constructive feedback! +> 💁 [Davranış kurallarımız](../CODE_OF_CONDUCT.md) , [Katkılandırma](../CONTRIBUTING.md), ve [Çeviri](../TRANSLATIONS.md) rehberlerimiz. Yapıcı geri bildiriminizi memnuniyetle karşılıyoruz ## Her ders şunları içerir: