Skip to content

Commit f0e91dc

Browse files
author
Jim Bennett
authored
Structure (#98)
* Adding content * Update en.json * Update README.md * Update TRANSLATIONS.md * Adding lesson tempolates * Fixing code files with each others code in * Update README.md * Adding lesson 16 * Adding virtual camera * Adding Wio Terminal camera capture * Adding wio terminal code * Adding SBC classification to lesson 16 * Adding challenge, review and assignment * Adding images and using new Azure icons * Update README.md * Update iot-reference-architecture.png * Adding structure for JulyOT links * Removing icons * Sketchnotes! * Create lesson-1.png * Starting on lesson 18 * Updated sketch * Adding virtual distance sensor * Adding Wio Terminal image classification * Update README.md * Adding structure for project 6 and wio terminal distance sensor * Adding some of the smart timer stuff * Updating sketchnotes * Adding virtual device speech to text * Adding chapter 21 * Language tweaks * Lesson 22 stuff * Update en.json * Bumping seeed libraries * Adding functions lab to lesson 22 * Almost done with LUIS * Update README.md * Reverting sunlight sensor change Fixes #88 * Structure
1 parent 94ccd7d commit f0e91dc

File tree

13 files changed

+190
-15
lines changed

13 files changed

+190
-15
lines changed

2-farm/lessons/6-keep-your-plant-secure/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ After the connection, all data sent to the IoT Hub from the device, or to the de
148148
149149
### X.509 certificates
150150

151-
When you are using an asymmetric encryption with a public/private key pair, you need to provide your public key to anyone who wants to send you data. The problem is, how can the recipient of your key be sure it's actually your public key, not someone else pretending to be you? Instead of providing a key, you can instead provide your public key inside a certificate that has been verified by a trusted third party, called an X.509 certificate.
151+
When you are using asymmetric encryption with a public/private key pair, you need to provide your public key to anyone who wants to send you data. The problem is, how can the recipient of your key be sure it's actually your public key, not someone else pretending to be you? Instead of providing a key, you can instead provide your public key inside a certificate that has been verified by a trusted third party, called an X.509 certificate.
152152

153153
X.509 certificates are digital documents that contain the public key part of the public/private key pair. They are usually issued by one of a number of trusted organizations called [Certification authorities](https://wikipedia.org/wiki/Certificate_authority) (CAs), and digitally signed by the CA to indicate the key is valid and comes from you. You trust the certificate and that the public key is from who the certificate says it is from, because you trust the CA, similar to how you would trust a passport or driving license because you trust the country issuing it. Certificates cost money, so you can also 'self-sign', that is create a certificate yourself that is signed by you, for testing purposes.
154154

5-retail/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
# Retail - using IoT to manage stock levels
22

3+
The last stage for feed before it reaches consumers is retail - the markets, greengrocers, supermarkets and stores that sell produce to consumers. These stores want to ensure they have produce out on shelves for consumers to see and buy.
4+
5+
One of the most manual, time consuming tasks in food stores, especially in large supermarkets, is making sure the shelves are stocked. Checking individual shelves to ensure any gaps are filled with produce from store rooms.
6+
7+
IoT can help with this, using AI models running on IoT devices to count stock, using machine learning models that don't just classify images, but can detect individual objects and count them.
8+
9+
In these 2 lessons you'll learn how to train image-based AI models to count stock, and run these models on IoT devices.
10+
11+
> 💁 These lessons will use some cloud resources. If you don't complete all the lessons in this project, make sure you [Clean up your project](../clean-up.md).
12+
313
## Topics
414

15+
1. [Train a stock detector](./lessons/1-train-stock-detector/README.md)
16+
1. [Check stock from an IoT device](./lessons/2-check-stock-device/README.md)
517

618
## Credits
719

20+
All the lessons were written with ♥️ by [Jim Bennett](https://GitHub.com/JimBobBennett)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Train a stock detector
2+
3+
Add a sketchnote if possible/appropriate
4+
5+
![Embed a video here if available](video-url)
6+
7+
## Pre-lecture quiz
8+
9+
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/37)
10+
11+
## Introduction
12+
13+
In this lesson you will learn about
14+
15+
In this lesson we'll cover:
16+
17+
* [Thing 1](#thing-1)
18+
19+
## Thing 1
20+
21+
---
22+
23+
## 🚀 Challenge
24+
25+
## Post-lecture quiz
26+
27+
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/38)
28+
29+
## Review & Self Study
30+
31+
## Assignment
32+
33+
[](assignment.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
3+
## Instructions
4+
5+
## Rubric
6+
7+
| Criteria | Exemplary | Adequate | Needs Improvement |
8+
| -------- | --------- | -------- | ----------------- |
9+
| | | | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Dummy File
2+
3+
This file acts as a placeholder for the `translations` folder. <br>
4+
**Please remove this file after adding the first translation**
5+
6+
For the instructions, follow the directives in the [translations guide](https://github.com/microsoft/IoT-For-Beginners/blob/main/TRANSLATIONS.md) .
7+
8+
## THANK YOU
9+
We truly appreciate your efforts!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Check stock from an IoT device
2+
3+
Add a sketchnote if possible/appropriate
4+
5+
![Embed a video here if available](video-url)
6+
7+
## Pre-lecture quiz
8+
9+
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/39)
10+
11+
## Introduction
12+
13+
In this lesson you will learn about
14+
15+
In this lesson we'll cover:
16+
17+
* [Thing 1](#thing-1)
18+
19+
## Thing 1
20+
21+
---
22+
23+
## 🚀 Challenge
24+
25+
## Post-lecture quiz
26+
27+
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/40)
28+
29+
## Review & Self Study
30+
31+
## Assignment
32+
33+
[](assignment.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
3+
## Instructions
4+
5+
## Rubric
6+
7+
| Criteria | Exemplary | Adequate | Needs Improvement |
8+
| -------- | --------- | -------- | ----------------- |
9+
| | | | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Dummy File
2+
3+
This file acts as a placeholder for the `translations` folder. <br>
4+
**Please remove this file after adding the first translation**
5+
6+
For the instructions, follow the directives in the [translations guide](https://github.com/microsoft/IoT-For-Beginners/blob/main/TRANSLATIONS.md) .
7+
8+
## THANK YOU
9+
We truly appreciate your efforts!

6-consumer/lessons/1-speech-recognition/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This video gives an overview of the Azure speech service, a topic that will be c
88

99
## Pre-lecture quiz
1010

11-
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/33)
11+
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/41)
1212

1313
## Introduction
1414

@@ -212,7 +212,7 @@ What do you think the future holds for speech recognition?
212212

213213
## Post-lecture quiz
214214

215-
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/34)
215+
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/42)
216216

217217
## Review & Self Study
218218

6-consumer/lessons/2-language-understanding/README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Add a sketchnote if possible/appropriate
66

77
## Pre-lecture quiz
88

9-
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/33)
9+
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/43)
1010

1111
## Introduction
1212

@@ -155,14 +155,18 @@ You can find instructions for using the LUIS portal in the [Quickstart: Build yo
155155
156156
* `set a 1 second timer`
157157
* `set a 4 minute timer`
158+
* `set a four minute six second timer`
158159
* `set a 9 minute 30 second timer`
159160
* `set a timer for 1 minute and 12 seconds`
160161
* `set a timer for 3 minutes`
161162
* `set a timer for 3 minutes and 1 second`
162-
* `set a timer for 1 minute1 and 1 second`
163+
* `set a timer for three minutes and one second`
164+
* `set a timer for 1 minute and 1 second`
163165
* `set a timer for 30 seconds`
164166
* `set a timer for 1 second`
165167
168+
Mix up numbers as words and numerics so the model learns to handle both.
169+
166170
1. As you enter each example, LUIS will start detecting entities, and will underline and label any it finds.
167171
168172
![The examples with the numbers and time units underlined by LUIS](../../../images/luis-intent-examples.png)
@@ -419,7 +423,7 @@ There are many ways to request the same thing, such as setting a timer. Think of
419423
420424
## Post-lecture quiz
421425
422-
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/34)
426+
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/44)
423427
424428
## Review & Self Study
425429

6-consumer/lessons/3-spoken-feedback/README.md

+61-5
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,81 @@ Add a sketchnote if possible/appropriate
66

77
## Pre-lecture quiz
88

9-
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/33)
9+
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/45)
1010

1111
## Introduction
1212

13-
In this lesson you will learn about
13+
Smart assistants are not one-way communication devices. You speak to them, and they respond:
14+
15+
"Alexa, set a 3 minute timer"
16+
17+
"Ok, your timer is set for 3 minutes"
18+
19+
In the last 2 lessons you learned how to take speech and create text, then extract a set timer request from that text. In this lesson you will learn how to set the timer on the IoT device, responding to the user with spoken words confirming their timer, and alerting them when their timer is finished.
1420

1521
In this lesson we'll cover:
1622

17-
* [Thing 1](#thing-1)
23+
* [Text to speech](#text-to-speech)
24+
* [Set the timer](#set-the-timer)
25+
* [Convert text to speech](#convert-text-to-speech)
26+
27+
## Text to speech
28+
29+
## Set the timer
30+
31+
The timer can be set by sending a command from the serverless code, instructing the IoT device to set the timer. This command will contain the time in seconds till the timer needs to go off.
32+
33+
### Task - set the timer using a command
34+
35+
1. In your serverless code, add code to send a direct method request to your IoT device
36+
37+
> ⚠️ You can refer to [the instructions for sending direct method requests in lesson 5 of the farm project if needed](../../../2-farm/lessons/5-migrate-application-to-the-cloud/README.md#send-direct-method-requests-from-serverless-code).
38+
39+
You will need to set up the connection string for the IoT Hub with the service policy (*NOT* the device) in your `local.settings.json` file and add the `azure-iot-hub` pip package to your `requirements.txt` file. The device ID can be extracted from the event.
40+
41+
1. The direct method you send needs to be called `set-timer`, and will need to send the length of the timer as a JSON property called `time`. Use the following code to build the `CloudToDeviceMethod` using the `total_time` calculated from the data extracted by LUIS:
42+
43+
```python
44+
payload = {
45+
'time': total_time
46+
}
47+
direct_method = CloudToDeviceMethod(method_name='set-timer', payload=json.dumps(payload))
48+
```
49+
50+
> 💁 You can find this code in the [code-command/functions](code-command/functions) folder.
51+
52+
### Task - respond to the command on the IoT device
53+
54+
1. On your IoT device, respond to the command.
55+
56+
> ⚠️ You can refer to [the instructions for handling direct method requests from IoT devices in lesson 4 of the farm project if needed](../../../2-farm/lessons/4-migrate-your-plant-to-the-cloud#task---connect-your-iot-device-to-the-cloud).
57+
58+
1. Work through the relevant guide to set a timer for the required time:
59+
60+
* [Arduino - Wio Terminal](wio-terminal-set-timer.md)
61+
* [Single-board computer - Raspberry Pi/Virtual IoT device](single-board-computer-set-timer.md)
62+
63+
> 💁 You can find this code in the [code-command/wio-terminal](code-command/wio-terminal), [code-command/virtual-device](code-command/virtual-device), or [code-command/pi](code-command/pi) folder.
64+
65+
## Convert text to speech
66+
67+
The same speech service you used to convert speech to text can be used to convert text back into speech, and this can be played through a microphone on your IoT device.
68+
69+
### Task - convert text to speech
70+
71+
Work through the relevant guide to convert text to speech using your IoT device:
1872

19-
## Thing 1
73+
* [Arduino - Wio Terminal](wio-terminal-text-to-speech.md)
74+
* [Single-board computer - Raspberry Pi](pi-text-to-speech.md)
75+
* [Single-board computer - Virtual device](virtual-device-text-to-speech.md)
2076

2177
---
2278

2379
## 🚀 Challenge
2480

2581
## Post-lecture quiz
2682

27-
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/34)
83+
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/46)
2884

2985
## Review & Self Study
3086

6-consumer/lessons/4-multiple-language-support/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Add a sketchnote if possible/appropriate
66

77
## Pre-lecture quiz
88

9-
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/33)
9+
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/47)
1010

1111
## Introduction
1212

@@ -24,7 +24,7 @@ In this lesson we'll cover:
2424

2525
## Post-lecture quiz
2626

27-
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/34)
27+
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/48)
2828

2929
## Review & Self Study
3030

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ We have two choices of IoT hardware to use for the projects depending on persona
8383
| 16 | [Manufacturing](./4-manufacturing) | Check fruit quality from an IoT device | Learn about using your fruit quality detector from an IoT device | [Check fruit quality from an IoT device](./4-manufacturing/lessons/2-check-fruit-from-device/README.md) |
8484
| 17 | [Manufacturing](./4-manufacturing) | Run your fruit detector on the edge | Learn about running your fruit detector on an IoT device on the edge | [Run your fruit detector on the edge](./4-manufacturing/lessons/3-run-fruit-detector-edge/README.md) |
8585
| 18 | [Manufacturing](./4-manufacturing) | Trigger fruit quality detection from a sensor | Learn about triggering fruit quality detection from a sensor | [Trigger fruit quality detection from a sensor](./4-manufacturing/lessons/4-trigger-fruit-detector/README.md) |
86-
| 19 | [Retail](./5-retail) | | |
87-
| 20 | [Retail](./5-retail) | | |
86+
| 19 | [Retail](./5-retail) | Train a stock detector | Learn how to use object detection to train a stock detector to count stock in a shop | [Train a stock detector](./5-retail/lessons/1-train-stock-detector/README.md) |
87+
| 20 | [Retail](./5-retail) | Check stock from an IoT device | Learn how to check stock from an IoT device using an object detection model | [Check stock from an IoT device](./5-retail/lessons/2-check-stock-device/README.md) |
8888
| 21 | [Consumer](./6-consumer) | Recognize speech with an IoT device | Learn how to recognize speech from an IoT device to build a smart timer | [Recognize speech with an IoT device](./6-consumer/lessons/1-speech-recognition/README.md) |
8989
| 22 | [Consumer](./6-consumer) | Understand language | Learn how to understand sentences spoken to an IoT device | [Understand language](./6-consumer/lessons/2-language-understanding/README.md) |
9090
| 23 | [Consumer](./6-consumer) | Set a timer and provide spoken feedback | Learn how to set a timer on an IoT device and give spoken feedback on when the timer is set and when it finishes | [Set a timer and provide spoken feedback](./6-consumer/lessons/3-spoken-feedback/README.md) |

0 commit comments

Comments
 (0)