Observe Module Overview
- Teacher will grab student’s attention by asking them to look at the and video.
- They are to ask themselves what is this new command and how can it be used?
- The teacher will demonstrate how it’s used in a real-world situation.
- Ensure the Dobot firmware and software is updated to the latest version. This will reduce troubleshooting.
- This lesson can be done individually or in groups. Depending on size of class or number of robots. If several students per robot, you might want to assign them separate responsibilities for full engagement.
- This lesson can take between 1 to 2 class periods depending on coding knowledge of students with Blockly ,Script, and Dobot in general.
- This lesson and skills is considered high consisting of much of the previous learned material.
- Having students start in the Power ON homing position is recommended, so that every student or group has their Dobot(s) start from the same spot.
- Remind students that in this project they are to use all previous knowledge such as variables, functions, loops, and lists.
- When programming remind students about turning on and off suction cup. Also, for students to use a medium setting on joint speeds. Very high might prove to be ineffective.
- We included a code sample of the process as shown on video. The 2nd challenge will vary but should be similar in design with additional codes.
Here is a lesson plan for your records.
Use this code solution as a reference for grading.
Here is a detailed explination of the code solution. It is useful to help students who are stuck in the prototyping process.
Print this Key Terms vocab sheet to use as a reference dring class
Print some more Pick and Place handouts
Explore Module Overview
Student should be able to explain all the KEY TERMS up to this point. The teacher will check for this by asking questions:
- What is a list?
- How can it be applied in a real world product or situation?
- How can I modify the code?
Higher order thinking question
- What other ways do you think you could use lists with Dobot?
Also engage students in discussion about
Answers to questions in the module:
Look at the second line of code, what do you think it does?
- it will get the 1st item on the list which is the Green color!!
You might be asking yourself “Why not just create 3 variables with the color in each?” Well you can, but what if you had to create a program for a company where they need to change the color, of the 100 colors available, for their to toy towers instantly!
All you would need to do in the code is move the color blocks in a different order and that’s it!! No having to create and/or renaming variables which could take serious time.
This is one huge advantage of lists, just like we’ve learned the advantages of variables, functions, and loops.
Look at this code, in what order would it print the cubes?
- It would make the 1st cube Green, the 2nd Yellow, and the 3rd Blue
You could make the job easier for yourself by just leaving the get #s in order and just maneuvering the blocks around in the order you want. This method would give you the same outcome as before, but you just change the color blocks around. This method will be in your challenge
- List - A list (also called an array in other programming languages) is a tool that can be used to store multiple pieces of information at once. It can also be defined as a variable containing multiple other variables
- Color Sensor – This type of sensor can identify the color of an object by the amount of light the object reflects. Color Sensor will detect the intensity of Red, Green and Blue in color of the placed object and send it to microcontroller for further process.
- Light Dependent Resistor - An LDR is a component that has a (variable) resistance that changes with the light intensity that falls upon it. Every color detected creates a different brightness therefore identifying which color the object is.
- Microcontroller - A microcontroller (MCU for microcontroller unit, or UC for μ-controller) is a small computer on a single integrated circuit. The brain of the robot where the programming commands and sensor values are processed.
- Servo Motors - are DC motors that are equipped with a servo mechanism for controlling precise angular position. They usually have a rotation limit ranging from 90° to 180°.
- Input ports – It connects the microcontroller either to internal or external devices. For example, where you plug in the attachments to Dobot those are the input ports.
- Function -. is a named section of a program that performs a specific task.
- If-do command – a conditional statement perform different computations or actions depending on whether a programmer-specified condition evaluates to true or false.
- Variable – are used to store information to be referenced and manipulated in a computer program. You can think of them as containers that hold information.
- Cartesian coordinate system - is a coordinate system that specifies each point uniquely in a plane by a pair of numerical coordinates
- Loop/Repeat - a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.
Prototype Module Overview
Each group or individual is to program Dobot with the following guidelines:
- Dobot must check the list created for the color and order of the cubes
- Dobot must transport the cube to the PICK location to build sorted tower
Part 1: Create a program using an “order” list of colors that would allow you to select what color you want and in what order for the tower.
Watch this video sample:
Dobot must do the following:
1.Check your list for the order of colors (from bottom - up)
2.Grab and place them in that order to make the tower
Dobot must do the following:
1.Check your list for the order of colors (top to bottom)
2.PICK and PLACE them in that order to make the tower.
3.Make a total of 3 towers, but must have 1 different colored cube as shown.
Reflect Module Overview
- Review with class on the benefit of using lists in their code as well as with robots
- Review all the key terms with students they should know up to this point.
- Have to students reflect and rate their performance as robot programmers. How many failed attempts? How much time?
- Discussing on how much time it might of taken programmers in the field to get everything working as efficiently and safely as possible.
Questions and Answers
- In programming what is a list?
- A list is an ordered collection of items inside a variable.
- In a list, do the items have to be of the same type or can they be different?
- The can be different.
- Can the same value appear more than once in a list?
- What does the create list with block allow?
- allows the user to specify the initial values in a new list.
- Once you’ve created your list and executed the program, are you allowed to make changes to the list?
- Yes, you can always change the number of items by clicking on the gear.
- When you want to retrieve one of the items in the list you first use the SET block to name the variable and then attach what block to it?
- To retrieve items back you would use the in list block.
- What is one huge advantage of lists mentioned in the lesson?
- Allowes to change the items instantly and in any order, without having to create, rename, and delete variables in 100’s of lines of code.
Did Dobot do anything unexpected while you were testing?
Where did you identify the cause of it in your code?
What did you find to be the most challenging part of the project?
What new things did you learn during the project?
- Answers will vary