From f4b7b15ca31db89e94b9107fe2912dfb692af5ed Mon Sep 17 00:00:00 2001 From: Lateefah Bello <2019cinnamon@gmail.com> Date: Fri, 4 Jun 2021 12:16:20 +0100 Subject: [PATCH] Chapter two(lesson one) commit --- 2-farm/lessons/1-predict-plant-growth/README.md | 8 ++++---- 2-farm/lessons/1-predict-plant-growth/assignment.md | 2 +- 2-farm/lessons/1-predict-plant-growth/pi-temp.md | 2 +- .../lessons/1-predict-plant-growth/virtual-device-temp.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/2-farm/lessons/1-predict-plant-growth/README.md b/2-farm/lessons/1-predict-plant-growth/README.md index 1a6ffe21..eae3e256 100644 --- a/2-farm/lessons/1-predict-plant-growth/README.md +++ b/2-farm/lessons/1-predict-plant-growth/README.md @@ -47,7 +47,7 @@ When learning about plants, most students are taught about the necessity of wate Plants have a base or minimum temperature, optimal temperature, and maximum temperature, all based on daily average temperatures. * Base temperature - this is the minimum daily average temperature needed for a plant to grow. -* Optimum temperature - this is the best daily average temperature to get the most growth +* Optimum temperature - this is the best daily average temperature to get the most growth. * Maximum temperature - The is the maximum temperature a plant can withstand. Above this the plant will shut down it's growth in an attempt to conserve water and stay alive. > 💁 These are average temperatures, averaged over the daily and nightly temperatures. Plants also need different temperatures day and night to help them photosynthesize more efficiently and save energy at night. @@ -149,7 +149,7 @@ Work through the relevant guide to publish temperature data over MQTT using your ### Task - capture and store the temperature information -Once the IoT device is publishing telemetry, the server code can be written to subscribe to this data and store it. Rather than save it to a database, the server code will save it to a Comma Separated Values (CSV) file. CSV files store data as rows of values as text with each value separated by a comma, and each record on a new line. They are a convenient, human-readable and well supported way to save data as a file. +Once the IoT device is publishing telemetry, the server code can be written to subscribe to this data and store it. Rather than save it to a database, the server code will save it to a Comma Separated Values (CSV) file. CSV files store data as rows of values with each value separated by a comma, and each record on a new line. They are a convenient, human-readable and well supported way to save data as a file. The CSV file will have two columns - *date* and *temperature*. The *date* column is set as the current date and time that the message was received by the server, the *temperature* comes from the telemetry message. @@ -218,11 +218,11 @@ The CSV file will have two columns - *date* and *temperature*. The *date* column 2021-04-19T17:41:36-07:00,25 ``` -1. Run this code for a while to capture data. Ideally you should run this for a an entire day to gather enough data for GDD calculations. +1. Run this code for a while to capture data. Ideally you should run this for an entire day to gather enough data for GDD calculations. > 💁 If you want to run this for an entire day, then you need to make sure the computer your server code is running on won't go to sleep, either by changing your power settings, or running something like [this keep system active Python script](https://github.com/jaqsparow/keep-system-active). -> 💁 You can find this code in the [code-server/server](code-server/server) folder. +> 💁 You can find this code in the [code-server/temperature-sensor-server](code-server/temperature-sensor-server) folder. ### Task - calculate GDD using the stored data diff --git a/2-farm/lessons/1-predict-plant-growth/assignment.md b/2-farm/lessons/1-predict-plant-growth/assignment.md index b4881b13..6a8fdedc 100644 --- a/2-farm/lessons/1-predict-plant-growth/assignment.md +++ b/2-farm/lessons/1-predict-plant-growth/assignment.md @@ -6,7 +6,7 @@ In this lesson you gathered GDD data using an IoT sensor. To get good GDD data, Start by gathering data for a few days. You will need to ensure your server code is running all the time your IoT device is running, either by adjusting your power management settings or running something like [this keep system active Python script](https://github.com/jaqsparow/keep-system-active). -Once you have temperature data, you can use a Jupyter Notebook in this repo to visualize it and calculate GDD. Jupyter notebooks mix code and instructions in blocks called *cells*, often code in Python. You can read the instructions, then run each block of code block by block. You can also edit the code. In this notebook for example, you can edit the base temperature used to calculate the GDD for your plant. +Once you have temperature data, you can use the Jupyter Notebook in this repo to visualize it and calculate GDD. Jupyter notebooks mix code and instructions in blocks called *cells*, often code in Python. You can read the instructions, then run each block of code, block by block. You can also edit the code. In this notebook for example, you can edit the base temperature used to calculate the GDD for your plant. 1. Create a folder called `gdd-calculation` diff --git a/2-farm/lessons/1-predict-plant-growth/pi-temp.md b/2-farm/lessons/1-predict-plant-growth/pi-temp.md index 1eb15e4e..e84df520 100644 --- a/2-farm/lessons/1-predict-plant-growth/pi-temp.md +++ b/2-farm/lessons/1-predict-plant-growth/pi-temp.md @@ -73,7 +73,7 @@ Program the device. > ✅ Remember, all the sockets have unique pin numbers. Pins 0, 2, 4, and 6 are analog pins, pins 5, 16, 18, 22, 24, and 26 are digital pins. -1. Add an infinite loop after the code above to poll the temperature sensor value and print it to the console: +1. Add an infinite loop after the code above to pull the temperature sensor value and print it to the console: ```python while True: diff --git a/2-farm/lessons/1-predict-plant-growth/virtual-device-temp.md b/2-farm/lessons/1-predict-plant-growth/virtual-device-temp.md index 9e4fa256..41c5a83f 100644 --- a/2-farm/lessons/1-predict-plant-growth/virtual-device-temp.md +++ b/2-farm/lessons/1-predict-plant-growth/virtual-device-temp.md @@ -98,7 +98,7 @@ Program the temperature sensor app. > 💁 CounterFit simulates this combined humidity and temperature sensor by connecting to 2 sensors, a humidity sensor on the pin given when the `DHT` class is created, and a temperature sensor that runs on the next pin. If the humidity sensor is on pin 5, the shim expects the temperatures sensor to be on pin 6. -1. Add an infinite loop after the code above to poll the temperature sensor value and print it to the console: +1. Add an infinite loop after the code above to pull the temperature sensor value and print it to the console: ```python while True: