CODE FOR CLIMATE
Introduction - climate tech
Discussion
What environmental or energy issues concern you the most?
Do you have any ideas or solutions?
How can computational thinking help solve problems?
Conservation through automation
Introducing Micro:bits
Computational thinking - Inputs & outputs
What can a Micro:bit do?
What can a Micro:bit sense? (INPUT)
How can a Micro:bit respond? (OUTPUT)
BRAINSTORM!
What could you build to increase efficiency through automation?
Advanced Agriculture
Automated Farming
Benefits of these technologies:
There are 3 main indoor farming technologies
Open Make Code
Let’s Code → MakeCode editor → New Project → Name → Create
Code your Micro:bit
Download/pair
As your program downloads, the yellow light flashes. When it’s solid, your code will run.
STEPS:
Download/pair (the old way)
As your program downloads, the yellow light flashes. When it’s solid, your code will run.
Download directly to the micro:bit or drag it over.
1
2
3
Show in folder
(on a PC you can download directly)
+ Extensions → Search “CLIMATE” → Land Action → Voilà !
Add InskSmith Blocks
Once you have this done, download it to your Micro:bit!
Code water pump w button A
Explanation of code: When button A is pressed, the umbrella will be displayed for 4 seconds while the pump is on. The screen will clear when the pump turns off.
The show icon block will help to troubleshoot - if the pump doesn’t turn on when the button is pressed, but the icon appears, we can at least confirm that the code inside the button A block is being executed.
Code water pump w button A
Plug in here
Switch on
Build your system
Put your Micro:bit in the base facing this way
Add enough water in the cup to cover the pump
Make sure the tube is IN the cup!
Double-check wiring!
(0)
This is very important!
Does it work?
Good - now build the rest!
Code automated water pump
Once you have this done, download it to your Micro:bit
Download & test
TIPS:
Debugging
It doesn't work!
Need more help?
Enrolment codes are found inside the kits
Extension - Solar power!
Did you know?
Can you think of any other solar powered devices?
Alternative Version
Find this version on the BGSD Micro:bit site under Science 7
Reflection
BGSD Students got to talk to astronaut David Saint Jacques LIVE from the ISS thanks to coding with LTS Living Space!
Double-check wiring!
(0)
This is very important!
The Final Code
Prizes!