1. Introduce students to the subject of robotics
- Ask students to provide examples of robot implementations nowadays. Divide your students into several groups.
- Each group watches a short video showing:
- Please take a moment to talk about what they all have in common, i.e., we communicate with them in the same way.
2. Principles of working with a robot
- Provide each group with a robot. But first, explain the rules that apply to all Photon Robot classes. If you already have them, explain the rules or invite students to create a list together.
3. Testing the robotâs capabilities
- Launch the Photon Magic Bridge application and connect the robot to the computer.
- Test the robot using the Photon Blocks interface. Let students freely explore its functions and experiment for 10 minutes. Make sure that everyone in the group has a chance to test the robot.
4. Programming in Python - an introduction
- Move on to programming in Python. Ask students: In your opinion, why do we learn more complex ways of programming if we can easily program the robot in Scratch, or another simple visual language?
- Point out that simplifications limit our possibilities, while âmatureâ programming languages are more versatile and are used more often in real life
- Explain the setup of the programming environment.
- Individual commands, same as separate blocks in Scratch, are called âMethodsâ in Python.
- Show students where to look for available Photon Robot methods - to open a list of all âmethodsâ specific to the Photon Robot programming, please click on the question mark icon in the top bar menu (see the screen below).
- explain the ones shown on top of the import project *
Python is a very popular programming language but with many extensions and add-ons. It is like speaking in English, we use it every day, but we donât know all the words â sometimes we have to Google them up or check in a dictionary. Programming is the same. Itâs a bit like someone telling you at the beginning of a conversation that there will be a lot of specific medical terminology. To understand this person, you need to use a dictionary! Because the startup environment remembers only the basic Python methods and additions that we might need, it runs faster. In this project, we will use all (*) methods from the âphotonrobotâ library.
- Pay attention to the comments. Please ignore parts of the code starting with the â#â - these are internal comments for developers reading the code.
List (Python methods for the Photon Robot) in the Photon Magic Bridge app
5. The First Program
- Select and assign each group a specific destination (target) point. The programmed robot must reach the target and, once there, play a sound. Students must use the correct algorithm composed of several methods and test it.
6. Summary
Summarize this lesson and allocate some time to answer questions - most likely, students will get to know answers to their questions in one of the next classes.
The co-author of this lesson scenario: MichaĆ Nowak.