Garden TOOLS PD - Module 5
Erin Ingram
Author
01/09/2023
Added
3
Plays
Description
In this module, we will provide a brief introduction to programming the BBC micro:bit as environmental sensors to measure light, temperature, and soil moisture levels.
Searchable Transcript
Toggle between list and paragraph view.
- [00:00:02.070]Welcome back
- [00:00:02.903]to the Garden Tools Professional Development Series.
- [00:00:05.010]In today's module we are gonna talk
- [00:00:07.200]about coding environmental sensors.
- [00:00:09.690]I wanna give you a little sense
- [00:00:11.250]of the why and the how that we do this,
- [00:00:15.900]before you get started with youth.
- [00:00:19.980]So first up, why do we code and use environmental sensors
- [00:00:24.300]in a garden setting?
- [00:00:25.560]It largely has to do with the fact
- [00:00:27.810]that it's a really good practice
- [00:00:29.340]to start getting students to notice and wonder
- [00:00:32.130]in these spaces.
- [00:00:33.600]And so that's one of our main goals.
- [00:00:35.460]And the micro:bit enables students
- [00:00:39.120]to start doing this questioning on their own.
- [00:00:45.090]So, what does that look like in practice?
- [00:00:47.730]I'm gonna pull an activity
- [00:00:49.200]that's actually from the Garden Tools lesson set,
- [00:00:52.110]and this should give you a little window
- [00:00:54.390]into what this might look like.
- [00:00:56.280]So the first thing that I want you to do is
- [00:00:57.900]I want you to think about weather without using any tools,
- [00:01:01.140]like you can't use a thermometer,
- [00:01:02.400]you can't use the weather channel.
- [00:01:04.920]I want you to just describe the weather outside today.
- [00:01:09.270]Maybe you're thinking that it's sunny or it's cloudy.
- [00:01:11.820]Maybe you're thinking it's cold or it's warm.
- [00:01:14.190]Maybe you're thinking it's humid or it's really dry.
- [00:01:17.190]Regardless of whatever descriptors that you use
- [00:01:20.730]to describe your weather,
- [00:01:22.560]it's generally going to be using words and not numbers.
- [00:01:27.720]Now, imagine that I give you a BBC micro:bit
- [00:01:30.480]that measures one of the following things.
- [00:01:32.520]I don't even need you to be the one who's coded these.
- [00:01:36.540]I can have coded them and then hand it off to you.
- [00:01:39.330]It could be light level, it could be temperature,
- [00:01:41.130]it could be soil moisture.
- [00:01:44.910]You then go outside and explore.
- [00:01:46.950]You look for answers
- [00:01:50.700]to the following two questions
- [00:01:52.290]by taking measurements for five minutes.
- [00:01:54.210]The first question being,
- [00:01:55.290]are conditions the same everywhere?
- [00:01:58.260]And what are the most extreme conditions that you can find?
- [00:02:03.900]My last step in this activity would be to bring you inside
- [00:02:06.387]and to do a share and compare.
- [00:02:08.370]Imagine that you're comparing those measurements
- [00:02:10.590]with others.
- [00:02:11.640]Maybe we use a graphing program like Excel,
- [00:02:14.820]or Google Sheets to start actually creating a graph.
- [00:02:18.300]Or, maybe we just go through the step
- [00:02:20.610]of writing those different numbers on post it notes,
- [00:02:23.190]and putting all of the high levels together
- [00:02:25.470]and all of the low levels together and looking for patterns.
- [00:02:28.320]How might visualizing that data
- [00:02:31.110]and looking for patterns lead
- [00:02:32.700]to interesting, noticing and wondering
- [00:02:35.880]about the garden?
- [00:02:39.480]That's what a lesson might look like.
- [00:02:41.490]Now, imagine having a conversation with students
- [00:02:43.440]about the first way they described the weather,
- [00:02:46.020]it's hot, or it's cold.
- [00:02:48.450]And now imagine bringing numbers into that.
- [00:02:50.490]Well, is it hot to everyone?
- [00:02:52.594]Mm, maybe not.
- [00:02:53.640]Maybe your idea of hot
- [00:02:54.750]and my idea of hot are very different.
- [00:02:56.880]But if we can start bringing in numbers,
- [00:02:58.770]we can start getting at the idea of precisions.
- [00:03:01.620]Also, that we can be comparing
- [00:03:03.720]what this year's students say
- [00:03:06.900]about the weather on this date
- [00:03:08.910]compared to next year's or the next year's.
- [00:03:10.830]So we can look at how science and math allow us
- [00:03:13.980]to start looking at prediction.
- [00:03:17.580]So, now that I've talked a little bit about the why
- [00:03:20.280]behind why we use environmental sensors,
- [00:03:24.840]I wanna walk you through the basics of how we go
- [00:03:28.920]about coding these three different environmental sensors
- [00:03:31.740]because the code looks
- [00:03:33.210]and functions very much the same for each.
- [00:03:39.060]So, if I show you these three codes,
- [00:03:42.060]you don't need to know what any of them do.
- [00:03:44.580]Just look at like the colors and how they're built.
- [00:03:48.300]What are some similarities that you notice?
- [00:03:54.990]So, you might notice that in all cases the code functions
- [00:03:58.920]to do two basic things.
- [00:04:00.720]One, it functions to show you a graph,
- [00:04:03.390]and two, it functions to show a number
- [00:04:05.580]when the "A" button is pressed.
- [00:04:08.580]So, if you take a look at this, show a graph,
- [00:04:11.760]can you guess
- [00:04:15.319]which part of the code functions to do that?
- [00:04:19.260]If you guess that it's this purple section
- [00:04:21.810]in everyone where it says, "plot bar graph of",
- [00:04:25.320]and then it's different for everyone "up to",
- [00:04:28.560]and then a number that's different for everyone.
- [00:04:32.190]And then show a number when "A" button is pressed,
- [00:04:37.020]which part of the code actually functions to do this?
- [00:04:41.940]If you look at this kind of teal colored section that says,
- [00:04:45.997]"If button A is pressed, then show number",
- [00:04:50.910]and then an example of a variable that it wants to show.
- [00:04:55.590]So, again, these are the two things
- [00:04:58.920]that every single environmental sensor
- [00:05:02.280]that you're gonna code with students is
- [00:05:03.840]all gonna look really similar.
- [00:05:08.430]But the difference between all of them is
- [00:05:10.620]that what is measured and how it's communicated depends
- [00:05:13.440]on the details that you provide in the program.
- [00:05:18.660]This is a really great example of abstraction.
- [00:05:21.390]If you remember back
- [00:05:22.260]to learning about computational thinking,
- [00:05:24.570]abstraction is one of those things
- [00:05:25.890]where you take away all the details that are specific
- [00:05:28.470]and you leave everything else.
- [00:05:30.840]In computer language,
- [00:05:31.920]it makes it easy to make a single program
- [00:05:34.380]that you can kind of interchange details
- [00:05:36.510]in order to measure different things.
- [00:05:38.160]So the sensor functions the same way,
- [00:05:40.110]showing you a graph and showing you a number
- [00:05:42.090]when you press the button "A",
- [00:05:43.560]and depending on the details you give it,
- [00:05:45.540]it'll do that with either light,
- [00:05:48.360]temperature or soil moisture.
- [00:05:51.990]So, it looks a little something like this.
- [00:05:54.900]You've got your basic setup.
- [00:05:57.450]Forever, it's gonna give you this code running.
- [00:06:01.860]It's gonna have always a part of the code
- [00:06:04.680]that's gonna be intended to show you a graph.
- [00:06:07.050]You are gonna choose whatever input you wanna put in,
- [00:06:09.810]and that's either the light level input
- [00:06:12.780]the temperature input, or in the case of soil moisture,
- [00:06:15.330]and this is the one that's slightly different
- [00:06:19.380]because you need to create a variable called reading
- [00:06:22.920]or called something,
- [00:06:24.060]that is matched to soil moisture for this.
- [00:06:28.200]Then you need to put in what is the maximum number
- [00:06:31.530]that you want your code to graph up to.
- [00:06:35.280]For light level, the most that it can measure up to is 255,
- [00:06:39.660]for temperature, the number that I would advise
- [00:06:43.530]that you use is 37.7.
- [00:06:45.840]Remember that you are measuring in Celsius
- [00:06:48.630]when you measure with the BBC micro:bit.
- [00:06:51.510]So 37.7 is about a hundred degrees Fahrenheit.
- [00:06:55.950]So, it's a nice zero to a hundred degrees
- [00:07:01.511]on your graph, if you use this as your top number.
- [00:07:04.050]And lastly, soil moisture can measure up to 1023.
- [00:07:11.490]If you need help with any of these, don't worry.
- [00:07:14.640]You're not alone.
- [00:07:16.293]The first resource that we have,
- [00:07:19.800]there are tutorials that are available
- [00:07:22.050]on the MakeCode for micro:bit coding platform
- [00:07:25.770]for light level and soil moisture,
- [00:07:27.840]that will literally walk you step by step
- [00:07:29.940]through instructions on how to build the code,
- [00:07:32.490]and instructions for like how to build
- [00:07:36.630]or hook up the alligator clips
- [00:07:40.080]and the nails for the soil moisture sensor.
- [00:07:45.390]We also have complete guides
- [00:07:47.970]on how to code each of these different environmental sensors
- [00:07:52.740]and some additional ones.
- [00:07:54.870]So you can check out our how-to coding guides
- [00:07:56.610]on our website.
- [00:07:58.920]There are a couple ways you can access those instructions.
- [00:08:01.440]One, you could just read the written instructions
- [00:08:03.600]with diagrams.
- [00:08:05.010]Two, you could watch.
- [00:08:06.060]There are video tutorials
- [00:08:07.320]that will lead you step by step on what it looks like,
- [00:08:09.870]or, you can just download the finished code directly.
- [00:08:13.800]And I wanna show you a little bit of what that looks like.
- [00:08:19.170]So as I mentioned, you can navigate directly
- [00:08:22.800]to the 'How-to Coding Guides' link on our website
- [00:08:26.250]for the Garden Tools Project.
- [00:08:28.920]If you scroll down, you are going to see
- [00:08:34.200]the three different environmental sensors are available
- [00:08:37.560]for light intensity, soil moisture, and temperature.
- [00:08:42.330]You're also going to see that there are...
- [00:08:44.910]If you click on this top title, it will open up a Google Doc
- [00:08:49.590]that's going to walk you through step by step with a picture
- [00:08:52.980]of what that code looks like.
- [00:08:55.470]If you click "download the finished code"
- [00:08:58.410]I've already created the code for you,
- [00:09:00.900]and you can simply download it.
- [00:09:03.360]You can also watch a video tutorial
- [00:09:06.630]that will walk you step by step
- [00:09:08.040]through actually building the code in the platform.
- [00:09:13.470]So, I hope that these resources are helpful to you,
- [00:09:17.760]and that you will practice coding each
- [00:09:20.580]of these environmental sensors,
- [00:09:22.170]so that you're ready to use them with youth.
The screen size you are trying to search captions on is too small!
You can always jump over to MediaHub and check it out there.
Log in to post comments
Embed
Copy the following code into your page
HTML
<div style="padding-top: 56.25%; overflow: hidden; position:relative; -webkit-box-flex: 1; flex-grow: 1;"> <iframe style="bottom: 0; left: 0; position: absolute; right: 0; top: 0; border: 0; height: 100%; width: 100%;" src="https://mediahub.unl.edu/media/20288?format=iframe&autoplay=0" title="Video Player: Garden TOOLS PD - Module 5" allowfullscreen ></iframe> </div>
Comments
0 Comments