8.6 KiB
ezio
5 great Raspberry Pi projects for the classroom
5 个很适合在课堂上演示的树莓派项目
1. 我的世界 Pi
Courtesy of the Raspberry Pi Foundation. CC BY-SA 4.0.
Minecraft is the favorite game of pretty much every teenager in the world—and it's one of the most creative games ever to capture the attention of young people. The version that comes with every Raspberry Pi is not only a creative thinking building game, but comes with a programming interface allowing for additional interaction with the Minecraft world through Python code.
我的世界是世界上很多青少年最喜欢的一个游戏,而且他也是目前最能激发年轻人创造力的一款游戏。这个树莓派版上自带的我的世界不仅仅是一个具有创造性的建筑游戏,他还是一个具有编程接口、可以通过 Python 与之交互的版本。
Minecraft: Pi Edition is a great way for teachers to engage students with problem solving and writing code to perform tasks. You can use the Python API to build a house and have it follow you wherever you go, build a bridge wherever you walk, make it rain lava, show the temperature in the sky, and anything else your imagination can create.
我的世界:Pi 版对于老师来说是一个非常好的教授学生解决问题和编写代码完成任务的途径。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,当你需要桥梁的时候给你建造一座桥,让老天呀下雨,显示天空的温度,以及其它你可以想象到的一切东西。
Read more in "Getting Started with Minecraft Pi."
详情请见 "Getting Started with Minecraft Pi."
2. 反应游戏和交通灯 Reaction game and traffic lights
Courtesy of Low Voltage Labs. CC BY-SA 4.0.
It's really easy to get started with physical computing on Raspberry Pi—just connect up LEDs and buttons to the GPIO pins, and with a few lines of code you can turn lights on and control things with button presses. Once you know the code to do the basics, it's down to your imagination as to what you do next!
使用树莓派可以很轻松的进行物理计算——只需要连接几个 LED 和按钮到 开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你指导了如何使用代码来做这些基本的东西,接下来就可以根据你的想象来做其它事情了。
If you know how to flash one light, you can flash three. Pick out three LEDs in traffic light colors and you can code the traffic light sequence. If you know how to use a button to a trigger an event, then you have a pedestrian crossing! Also look out for great pre-built traffic light add-ons like PI-TRAFFIC, PI-STOP, Traffic HAT, and more.
如果你知道如何让一个灯闪烁,你就可以让三个灯开始闪烁。挑选三个和交通灯一样颜色的 LED 灯,然后编写控制交通灯的代码。如果你知道如何使用按钮触发实践,那么你就可以模拟行人过马路。同时你可以参考其它已经完成的交通灯附件,比如PI-TRAFFIC, PI-STOP, Traffic HAT,等等。
It's not always about the code—this can be used as an exercise in understanding how real world systems are devised. Computational thinking is a useful skill in any walk of life.
代码并不是全部——这些联系只是让你理解真是世界里使如何完成这些事的。计算思维是一个在你一生中都会很有用的技能。
Courtesy of the Raspberry Pi Foundation. CC BY-SA 4.0.
Next, try wiring up two buttons and an LED and making a two-player reaction game—let the light come on after a random amount of time and see who can press the button first!
接下来试着接通两个按钮和 LED 灯的电源,实现一个反应游戏 —— 让 LED 灯随机的点亮,然后看是最先按下按钮。
To learn more, check out GPIO Zero recipes. Everything you need is in CamJam EduKit 1.
要想了解更多可以看看 GPIO Zero recipes。你所需要的资料都可以在 CamJam EduKit 1 找到。
3. 电子宠物 Sense HAT Pixel Pet
The Astro Pi—an augmented Raspberry Pi—is going to space this December, but you haven't missed your chance to get your hands on the hardware. The Sense HAT is the sensor board add-on used in the Astro Pi mission and it's available for anyone to buy. You can use it for data collection, science experiments, games and more. Watch this Gurl Geek Diaries video from Raspberry Pi's Carrie Anne for a great way to get started—by bringing to life an animated pixel pet of your own design on the Sense HAT display:
Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是你并没有错过亲手把玩这个硬件的机会。Sense HAT 是 Astro Pi 的一个传感器扩展板,现在已经开放购买了。你可以使用它来进行数据搜集,科学实验,游戏和其它很多事。可以看看下面树莓派的 Carrie Anne 拍摄的 Gurl Geek Diaries 的视频,里面演示了一种很棒的入门途径——给生活添加一个你自己创造的生动的像素宠物:
Learn more in "Exploring the Sense HAT." 详见 "探索 Sense HAT."
4. 红外鸟笼 Infrared bird box
Courtesy of the Raspberry Pi Foundation. CC BY-SA 4.0.
A great exercise for the whole class to get involved with—place a Raspberry Pi and the NoIR camera module inside a bird box along with some infra-red lights so you can see in the dark, then stream video from the Pi over the network or on the internet. Wait for birds to nest and you can observe them without disturbing them in their habitat.
Learn all about infrared and the light spectrum, and how to adjust the camera focus and control the camera in software.
Learn more in "Make an infrared bird box."
5. 机器人 Robotics
Courtesy of Low Voltage Labs. CC BY-SA 4.0.
With a Raspberry Pi and as little as a couple of motors and a motor controller board, you can build your own robot. There is a vast range of robots you can make, from basic buggies held together by sellotape and a homemade chassis, all the way to self-aware, sensor-laden metallic stallions with camera attachments driven by games controllers.
Learn how to control individual motors with something straightforward like the RTK Motor Controller Board (£8/$12), or dive into the new CamJam robotics kit (£17/$25) which comes with motors, wheels and a couple of sensors—great value and plenty of learning potential.
Alternatively, if you'd like something more hardcore, try PiBorg's 4Borg (£99/$150) or DiddyBorg (£180/$273) or go the whole hog and treat yourself to their DoodleBorg Metal edition (£250/$380)—and build a mini version of their infamous DoodleBorg tank (unfortunately not for sale).
Check out the CamJam robotics kit worksheets.
via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom
作者:Ben Nuttall 译者:译者ID 校对:校对者ID