Monday, February 1, 2021

EV3 --> Hummingbird --> micro:bit

Thanks to a recent inquiry, by a 5th grader named Leo, about robotics in grades 6-8 at Brentwood School, I have decided to update the goings on in my course over the past several years. While I still have EV3 kits available, I have moved on to Hummingbird Robotics, and during this virtual time, the micro:bit. Below are a sampling of videos of student projects from the years past.

.    

   

   



           


   

    


   









Thursday, March 17, 2016

Teaching Girls to be Brave, not Perfect

The scene:

Frozen, she stared at her RobotC program on the screen. 
Her lifeless partner, the robot, yearning for an algorithm, stood in front of her.
USB cable unplugged. No connection between them. 

While looking at the two of them, suddenly, it occurred to me--she might be afraid that her program won't work. I thought of Reshma Saujani and her TED Talk: Teach Girls Bravery, Not Perfection. I had watched her stare at the screen for days, trying to encourage her, but it wasn't until a colleague sent me Saujani's Ted Talk that I realized what might be happening here. Girls are often refrain trying things and takings risks due to fear of not getting it perfect.


I sat down next to them.
"Have you tested your program?" I asked.
"No," she nodded.
"Well, let's do it and see what happens. Then we'll have some information about how it works."
A sheepish and concerned "Okay," was barely audible.

She plugged in her USB cord. The familiar download sound occurred.

Run.

The robot came to life, engaging in unpredicted antics, as the arm pushed down forcefully lifting the front part of the robot off the counter and turned wildly to the left and back etc... Not, what she wanted to happen. (I could have predicted this.) Excitedly, I started asking her questions.

She smiled and we began debugging together.

As often happens, class was over just when it started to get interesting. (A topic for another post.)



Sunday, January 24, 2016

EV3s Ready for 2nd Semester

Second semester base robots have been built by the students and are poised for another term of abuse. The greater my organization, the minimal harm to the robots and the greater the learning. From one semester to the next, my organization seems to steadily improve, but mostly by small increments. This semester however was different. A major reorganization of my classroom including: tearing out some wall-mounted table tops; installation of  a white-board wall; and the reorienting of the projector to face away from the door, produced an major organizational leap forward. I am excited about the time that will be saved. Here are some photos and bullet points describing my course.
  • I color code everything! As you can see from the photos. 
  • Kids use 2 computers. One with curriculum open and one with LEGO Mindstorms open.
  • They watch curriculum videos using color coded earbuds.
  • Earbuds are kept in color coded baggies, stored behind robot in parking spaces. 
  • Color coded USB cables are stored in parking spaces. 
  • Classes are 40-45 minutes long. Kids come in a get right work. 
  • Kids that move through curricular challenges faster, completes others that I create or they create their own challenges. 
  • They pseudocode only the final challenges for each module. 
  • There are entrance procedures and exit procedures. 
 
Color coded robot parking spaces.
Color coded LEGO element toolkits.
       Whiteboard "wall-paper."
 
"How Close to the Edge?"- challenge.













One last thing. Every semester students evaluate their courses using an electronic "Student Feedback Intsrument." One question asks students whether or not the "Teacher integrates and uses technology in the course." As a reminder of the spectrum of perception on which middle school students can be, I give you these three responses:
  • We use tech all the time.
  • Not really.
  • It's a robotics class. 
This made me smile. 
Thanks for reading and have a wonderful day. 





Sunday, September 6, 2015

LEGO EV3 Robotics Soccer Shootout

To inspire my 5 girls and 5 boys in my Robotics Innovation Design from day 1 this year, I decided to do something a little different. Classes on our first day of school were 20 minutes long. I didn't want to spend the time talking about policies and goals etc... Instead, I wanted to do something that I could refer back to constantly throughout the semester. Thus, I introduced the final group project to get them thinking about ideas from day one. I showed them all the videos of the final projects from the past 4 semesters and left them with a question mark. "What will you all produce?"

I have posted final project videos all but last Spring's in previous blog posts. Below is the Soccer Shootout from my 2015 Spring RID class. I hope you enjoy it. It certainly inspired my present students.



Tuesday, January 20, 2015

Final Semester Project: Olympic Torch / Robot Parade

Or "Capturing Footage of a Wild Animal"

The first semester for our school has come to end. During the last several weeks, the students worked on their final project which was to be performed at the last middle school assembly of the semester, literally just minutes before being dismissed for winter break.

The students and I met in the theater in the morning to do several last run throughs. It worked fairly well, but probably would not work perfectly. Robots sometimes have minds of their owns, it seems. The robot starting positions were marked and the blue, green, red and white tape was laid out on the stage. The robots were supposed to move forward in formation to the green line and stop and wave their flags in sequence. Then the center robot would move out of the way for the torch robot to move forward across the stage, stop at the red line and do a ninety degree turn to face the audience. Once the center robot moved back into position, all the robots with their flags up would move forward to the blue line, stop, back up and turn to face the audience. They would then follow the white line staying a set distance behind the robot in front using their ultrasonic sensor. Once the lead robot stopped at the barrier, all the robots were supposed to stop and wave their flags once or until the barrier was removed. 

The following video is of the assembly and shows robots not cooperating.



Post assembly, the students bolted for winter break leaving me unsatisfied with the performance. Therefore, I came into school one morning during break to debug the robots and record what should have happened.

With my heart pounding, I coordinated the camera, the music and the robots singlehandedly and managed to get the following on the first take. It wasn't perfect as you will see. "That'll do," I said to myself. When I turned off the camera, I literally felt like I had captured footage of a wild animal never to be seen again. Enjoy.



As always, thank you for reading and viewing.
Happy New Year everyone. 


Sunday, September 21, 2014

The Apple Orchard Challenge and the Thoughtful Robot

My students progressed faster than I expected through the Movement tutorials of the EV3 Curriculum. Being in the computer lab with 18 pc desktops and only 11 students works out well. I bought some cheap earbuds and some splitters so that each pair of students could plug in and listen to the same curriculum video on one computer while programming in Mindstorms on another.

The students' level of engagement ramped up when I brought in a robotics table (the kind used in the FLL) and built the Apple Orchard Challenge right before there eyes. The curriculum called for black electrical tape, but I did not want to have to hem and haw about whether it counted or not if one wheel crossed the tape etc. Using some cardboard aluminum foil tubes, different colored post-it notes and tape, I created a more 'realistic' orchard. I also figured the kids would enjoy it more if they hit something rather than simply motored over the black tape. The Mandarin teacher, a great friend of mine, helped me 'plant' the 'trees' on the cardboard tubes and suggested I make them fruit trees. I love collaboration!


The video above was of the first group to get down the last row. So close they were. Eventually, all five groups completed the challenge. There was definitely some frustration along the way as the students realized that starting the robot in a slightly different position could throw angles and distances off and cause a crash into the trees as shown below. They persisted, over and over and over again. Give kids challenges and they persevere.


You may have noticed one robot moving much slower than the others. That was Orange Blossom, named for the colored tape on the robot. Paige and Eve decided to take a more slow and steady approach in programming their robot than the other four groups. This elicited sighs of impatience as the other students had to wait for their turn on the board. Emily, a member of the second group to complete the challenge, watched Orange Blossom seemingly stroll through the orchard as if looking for an apple to pick and quipped, "That is such a thoughtful robot." Knowing what she might I asked her why because I wanted to hear it from her. "Because it is moving so slowly." Ahh, so there are benefits to moving slowly. Maybe this realization could be applied to other aspects of school and life. If I haven't written it yet, I am now. Kids learn so much more than robotics in a robotics course.

On to sensors. A student already gave me an idea for a theme song for this unit. 
Stay tuned and thanks for reading. 

Wednesday, August 27, 2014

First Day of School: No! No! Yes!

Classes on our first day of school are only 20 minutes long. A few years ago, I realized that instead of wasting this time with logistics such as name cards and what did you do this summer, I wanted to do something that I could and would refer to throughout the entire course. Something that I could refer to constantly as "What did you learn on the very first day?" For robotics, I thought that I would have the kids write pseudocode from the very first program as simple as it would be. Then I thought, "No." I should wait until the programs become more complicated and then introduce pseudocode. But then I thought that, "No!" again. I should do it from the very beginning so that it becomes engrained and automatic. "Yes!" This is what I will do. Thus, I had the students write in their journals the directions/steps for making a robot go around a stack of their journals. I put out a couple of meter sticks and the kids went right to work. It was great. The students then shared their steps out loud. Forward some inches (Next time, it will be metric.), then turn 90 degrees etc. It was great. After stacking their journals on top of each other in the middle of the table, I then demonstrated an actual program with a base robot that I had already created to complete the task. I chose not to introduce the word pseudocode until later, but simply refer to what they wrote as directions or steps. With the hook set, the next day I will have the students build the base robot, review some of the course expectations and get started on the EV3 Curriculum. 

Monday, July 28, 2014

Robotics Academy PD at CMU NREC

(I am in the front row, 3rd from the right in the dark shirt, if you care to know.)

With one year of teaching LEGO EV3 Mindstorms under my belt piecing together a curriculum as I went along, it was time for some formal training. I decided on the Robotics Academy Certified EV3 Professional Development at the NREC, "part of the Carnegie Mellon University Robotics Institute, a world-renowned robotics organization, where you'll be surrounded by real-world robot research and commercialization." The mecca of robotics! 

Twenty-four teachers from all over the United States and several from schools abroad, including Doha, Ireland, Madagascar and Vietnam converged on the NREC for one week of training using the EV3 Curriculum. After the program and facility overview and introductions, we entered the secure facility by signing in and collecting our badges and name cards. This is the real deal, the vanguard of robotic engineering research. Indeed, each of the five mornings Norman Kerman, the designated mayor of the NREC, and CHIMP welcomed us into the giant converted warehouse as we walked to our classroom.


An articulate, knowledgeable and thorough teacher, Ross Higashi, wasted no time starting us programming using the EV3 Curriculum for the Mindstorms software. You can get an idea of what the curriculum is like by testing out the free online version. The organization and presentation of the software hooked everyone that I spoke with almost immediately, including one woman who was truly skeptical and didn't want to be there in the first place, but her school insisted on sending her. 


Last year I used the Robot Educator within the Mindstorms software and challenges from Classroom Activities for the Busy Teacher: EV3 by Damien Kee. (This book has great activities that I will continue to use). The students did not notice the lack of depth and continuity that I noticed and felt badly about. (I tend to be hard on myself.) With the EV3 Curriculum from the NREC, I had found what I was looking for. On day one of the program, a sound pedagogical philosophy emerged. The course was not just about learning the Mindstorms' programming environment; it was about teaching for understanding, i.e. the portion of the iceberg beneath the surface. Moreover, the philosophy was modeled, not simply talked about. A well organized, engaging curriculum, real world examples, clear explanations and a sound pedagogical philosophy?! I was sold! 


The free version includes the basics, but the bonus segments on My Blocks, Data Wires and Logic come with the purchased version. 


Overall, this program was one of the most productive, effective, and applicable professional development experiences that I have ever had. I had considered taking the online course, but much preferred to be there in person and interact with the instructors, the other teachers and experience the facility. Moreover, I had never been to Pittsburgh, PA. Carnegie Mellon University; The University of Pittsburgh; the beautiful stadiums; the three rivers; the bridges; the museums, etc. I loved it and will definitely be back, hopefully for the RobotC professional development course. If you are new to EV3 or wish to upgrade your understanding I strongly recommend these courses. 

As always, thank you for reading. 

Saturday, June 7, 2014

Robotics Innovation Design- Spring Assembly

While it is not quite the dance off that my first semester class came up with to end the term, the students made some mini ad hoc presentations and shared their projects. I have a lot to think about and some good ideas to improve the course for next year. I will share those ideas in a later post.

Demonstrations include:
- general programming with large motors and medium motor
- ultrasonic sensor to detect distance
- color sensor detecting light from laser and colored tape
- elephant from the EV3 expansion kit

I hope you enjoy the video. Robotics Presentation at Assembly




Monday, May 5, 2014

I'll Be Honest, Today Was Frustrating

We are coming towards the end of the semester and the students have picked core and expansion robots to build from the EV3 software. Gyroboy, puppy, color sorter, robot arm from the core set and tank bot from the expansion set were the chosen bots. Great progress was made on the color sorter, the robot arm and the tank bots. The gryoboy and puppy have been very problematic. After many calls to LEGO Ed by my students, disappointedly, they abandoned gyroboy and moved on to something else.

Today, I had two sets of girls that I worked with on the puppy. I am really conscientious about encouraging girls, but they were getting very frustrated with the puppy build. They made many errors building and had to take it apart to rebuild. I realize that this part of it all, but they just were not into having to do this. I persisted with them and eventually got them to fix the build. Then we noticed that one sensor was plugged into the wrong port and contained too short of chord. With another girl, I was trying to decipher the program that does not seem to work like it does on the video. Frustrating. We figured out how one of the my blocks worked, but the program is so complicated. Then the other group noticed that the puppy can't walk. Argh.

I called LEGO and wrote on the online community and asked if there were written explanations anywhere for what these robots are supposed to do and how they are supposed to respond. There isn't. They only have the videos, which are only moderately helpful. In addition, every LEGO workshop I have been to the instructor has encouraged us as teachers to have the kids write notes above the blocks so that they can go back and read easily what they do. Yet LEGO doesn't do that with their programs. I wish they did because then students and I could learn from their programming.

At the end of class, I spoke to the kids about frustration and problem solving and that is part of this whole venture. Butting up against frustration isn't bad, I told them. It's how you respond to the frustration that is either bad or good. So some important lessons were hopefully learned.

Thanks for reading.



Monday, March 10, 2014

Grabber Challenge: "It's my robot! It's doesn't work!"

After completing the Robot Educator Basics in the EV3 Mindstorms software, I turned to Damien Kee's Classroom Activities for the Busy Teacher: EV3. The Grabber challenge seemed like a good one. I gave the kids the option of designing and building their own grabber attachment or using the instructions provided in Damien's pdf of his book. Most if not all chose his design. A spectrum of success ensued. Two groups had quick success while others struggled. "It's my robot! It doesn't work!" (Of course. How could it be something they have done?) I heard this over and over again from one group. We examined the program. We tried someone else's program that worked. It did not work on this robot. I began to think that the student was right, that maybe there was something wrong with their brick or robot. Then one girl came to rescue and spotted the problem. Can you?

                                  Figure 1.

                                  Figure 2.


Give up? Figure 1 has a piece positioned incorrectly. Figure 2 has the same piece correctly positioned. See if you can find it. 

Spoiler alert. 

In Figure 1, the 2 module cross block that the worm gear axle goes through has the axle in a locked position so that the medium motor cannot move or rotate. Notice the difference in Figure 2.

It was not the brick after all. How long will it take before I learn that the problems the kids and myself have while programming or building are rarely, rarely ever due to a malfunctioning robot. Throwing up your hands and simultaneously declaring, "It's my robot!" is a way to avoid ownership and responsibility for the problem and to avoid making the effort to troubleshoot and problem solve. In my opinion, students need more experience in both of these areas. Taking responsibility and problem-solving apply to life in general. 

As always, thank you for reading.  

Saturday, March 1, 2014

US Sensor Wait Block: The Difference between the Change and Compare Modes

During my semester teaching with the Mindstorms EV3 software, I actually had to call and speak with a LEGO technical support representative because the difference between the ultrasonic sensor change and compare modes was eluding me. The representative was very helpful, and I basically came to understand the simplicity of the settings as the difference between the meaning of two prepositions, 'to' and 'from.' (See EV3 Wait Block- Ultrasonic Sensor.)

This semester, I designed an activity for the students to figure this out for themselves. The activity involved collecting class data in a Google spreadsheet so that the kids could draw the conclusion for themselves. They simply followed the instructions in the LEGO Mindstorms EV3 Education edition software. The kids used the Robot Educator-Basics-Stop at Object tutorial. This tutorial uses the ultrasonic sensor wait block on the "change" mode. The students completed this tutorial from different distances that I tried to control and then they recorded their  data in a spreadsheet shown below.

Stop at Object Change Mode (11 cm)
Start Distance from Object (cm)How far Robot Moved (cm)End Distance from Object (cm)
901179
701258
401525
801268
601050
9012.577.5
45539
901179
60849
501139
301713
908010
201030
441331
471136
831073

From this data, the students were able to conclude that even with a couple of outliers, eleven of the data points show movement of 11 cm +/- 1-2 cm TO the object. 

The students then repeated the same experiment using the compare mode instead of the change mode. Their data is shown below. 

Stop at Object Compare Mode (11 cm)
Start Distance from object (cm)How far Robot Moved (cm)End Distance from Object (cm)
907515
904248
604614
3016
702545
50743
904743
902476
451238
15412
152641
301141
371148
17412
This data did not turn out as I had hoped. The third column should have contained end distances FROM the object closer to 11 cm. Some 11 cm were recorded in the second column which could have been placed in the wrong column by students. 

Still, with a couple of demonstrations with the students looking on, they came to the conclusion that the "compare" mode causes the robot to move a certain distance FROM an object. 

All in all, this was a fun exercise to introduce the students to the idea of collecting a set of data, drawing conclusions, and discussing possible sources of error. 

For me, I learned that I need to provide students with more explicit directions on how to record data. 

Thank you for reading. 

Monday, January 27, 2014

Get Out of the Way of the Students

A new semester means fourteen new robotics students in my Robotics Innovation Design elective. This time, five girls and nine boys. Last semester, we started with LEGO Simple Machines kits and then moved on to the Mindstorms EV3s. This semester, we dove right into the EV3s.

It did not take long for 'Past Teacher' to rear his controlling head, but the enthusiasm of the kids caused 'Present Teacher' to fight back and allow the kids do what they wanted to do. (See earlier post for clarification "Classroom Conflict: Old Teacher vs. New Teacher.")

After the students learned the basics of programing their EV3 driving base robots to move forward, reverse, turn and spin, I presented them with the In N' Out House challenge. It seems simple enough, go in one side, spin 90 degrees and come out another side, but it takes a bit of perfecting.


Once the above challenge was completed and before moving on to the next skill, students were given the opportunity to design a challenge for themselves and the other students, using tape, cardboard, small whiteboards or whatever else we could get our hands on. Their challenges are often more difficult than what I produce. Pictured below is a challenge designed by two students.



The students titled it 'From China to America,' as the directions required kids to program their robots to go up the ramp, capture the cuboid, which has a Chinese
flag underneath it, and deliver it to the U.S. Flag on the left. The students were having all sorts of difficulty keeping the robots going straight as they transitioned from the different surfaces on the challenge.

Past Teacher wanted to tell them to get rid of the ramps and just do it on a flat surface. Present Teacher shut him up quickly and let the kids do what they wanted to do. Kids like making things go up and down ramps. The ramps were initially much steeper, but they figured out that that didn't work very well so they lowered the center portion. Isn't that what this is all about: trying something, experimenting and revising. Eventually, I just let them be and the kids were lining up to complete the challenge. The creators of the challenge produced a point system for different levels of accuracy of delivering the cuboid. Check out the excitement below.


Once again, I keep learning that one of the best teaching strategies is simply to get out of the way of the students.

Thank you for reading.

Monday, January 13, 2014

Final Project: Robot Dance Off

Two songs: All the Single Ladies and Campfire Song Song. Two groups of students each with three robots. Four judges for 1. choreography, 2. costume and set design 3. technical skill 4. overall appeal. The results? See below.

 



"Could we have a dance-off?" Absolutely! Great idea. This was the students' final project for the course. Six EV3 robots meant 6 pairs of students coming up with their respective dance proposals. Before the students were allowed to begin choreographing their dances, Mrs. Nora Francis, the Brentwood School Middle School dance instructor, taught the students about some elementary dance moves. Some required elements included:
1. chaine- 360 degree turn
2. canon- one robot
In addition, the routines needed to include a sensor interacting with something on the dance floor. Eventually, two songs were chosen and the students programmed the robots to dance to those two songs.

The judges:


The final contest was done at the last middle school assembly before winter break. The kids loved it. 


Sunday, November 10, 2013

When a Challenge isn't Met

I created a challenge for my students called Escape in which the goal was to program the robot to find it's way out of the box. The students quickly realized that they didn't need to use any sensors at all, that they could just have the robot rotate around and go forward for a few seconds until it found the opening.


I adjusted the requirements and created Escape 2. This time the robot could not touch the walls of the box. Of course, they tried to wiggle out of this one by asking if the cords could touch. "Okay" I said looking at the cords sticking out of the back and thinking that would be fine. Then of course, one pair students takes all the cords out of the kit to wrap around the robot as a bumper. "No. That doesn't work."

Escape 2 turned out to be a fairly significant challenge. Several pairs of students were able to program the robot using the ultrasonic sensor to sense the long distance at the opening of the box and move their robot towards the exit.  But more often than not their robots would catch a wheel on edge of the opening and get stuck. Another group decided to rebuild their robot in a minimalist fashion by changing out the big wheels and tires on the base robot for thin wheels and tires.

Ultimately, this group and one other out of 6 were able to complete the challenge. As the teacher, what to do? We have spent a lot of time already on this challenge and I felt it was time to move on. Some nagging questions remained. Do I allow all students time to complete challenges? Is it okay to move on with some having not done so? My initial thought is YES, this is okay to do. In today's world where many kids are so quick to shout "That's unfair!" when one kid gets something and they do not, this seems like an important lesson. People have different strengths. Many kids expect everything to be easy and doable, and if it is not, they give up. Certainly, if a student wants to take some time outside of class to pursue the challenge, I would gladly provide that time.

Any thoughts, ideas or advice on this topic would be much appreciated.

Monday, October 28, 2013

Reverse Engineering with Loop Blocks

Last week, I introduced students to the loop block in the Robot Educator. Afterwards, I produced the program below but did not show it to the students. Instead, they observed the robot's actions based on the program. Their challenge: to observe my robot and reverse engineer a program that would make their robot mimic mine.


The first group came up with their program and we set our robots side by side. Pretty darn close, if you ask me. The robots are to lead in with 3 seconds of Love eyes on the display; keep the Love eyes throughout the program; rotate roughly 180 degrees; click twice and repeat indefinitely until the touch sensor is pressed; display Dracula mouth for 5 seconds.


The students produced a program quite a bit different than mine, indicative of the fact that there is more than one way to solve a problem.


This was a fun challenge. I am hoping to get all seven robots doing this together in sync. I would be willing to bet that there would be at least 4 different solutions to this. In addition, some of the students are designing their own reverse engineering challenges. Check back here later for updates. 


Friday, October 25, 2013

Classroom Conflict: Old Teacher vs. New Teacher

Today, I present two conflicts between Old Teacher, stuck in the traditional teacher-centered mindset of teaching, and New Teacher working in a progressive student-centered mindset.

My students were learning about the Loop block in the EV3 software. They were using the tutorial in the Beyond Basics palette of the Robot Educator. The program looks as shown below:


"Mr. Kahn, we got it." One group shouted to get my attention. As I watched their robot go through the program, I realized that yes, indeed, they did have it. As they pressed the touch sensor the loop was interrupted and the robot stopped. Before I was able to tell them to move on to the next step in the tutorial, one of them said "Can you use the touch sensor to turn it on?" Decision time. Old Teacher would dismiss the question and tell the students to move on to the next step. Old Teacher would tell the students to complete the tutorial, maybe because Old Teacher doesn't at that moment know the how to solve that very problem. New Teacher would say "Great question. Give it a try. See if you can make it so that if the touch sensor is pressed again, the robot continues." I ask: Which activity would the students be more interested in? Which teacher would be more effective in inspiring students to explore, take risks and learn?  New Teacher won the battle and the two students looked at each other, ideas flashing in their eyes as they attacked to the computer. 

Scanning the room to assess the progress of the other students, I saw this:


Old Teacher would have responded by telling the students to remove their extra pieces because it was not in the tutorial within the software. Old Teacher would have told them to get back to programming. New Teacher would have reacted by commenting on the new features in some positive manner to encourage the students' desire to design and build, maybe even making some suggestions about how to stabilize the structure. Or New Teacher may have just smiled to himself, not said anything at all and allowed the kids to keep their unique modifications. The end of class arrived. The students powered down their robot and placed it into the cabinet in the above configuration.  

I have a confession to make: I am both those teachers. Old Teacher exists within me, but New Teacher is muscling him out of the way. The thoughts of Old Teacher live briefly before the thoughts of New Teacher slay them and take over. There may be moments when Old Teacher is necessary to summon, but presently, New Teacher is in complete control, and I am truly enjoying this more natural and satisfying way of teaching and so are my students. 




Wednesday, October 9, 2013

EV3 Wait Block- Ultrasonic Sensor

Last night I spent nearly two hours trying to figure out the introductory program called Stop at Object using the ultrasonic sensor in the Robot Educator.


An ah-ha moment came when I realized that when the wait block's mode for the sensor was changed to "compare" from "change" that I needed to adjust the "less than, greater than" parameter. I felt better about having to teach this on the next day to my students.

There was still something nagging at me though, so I resolved to call up LEGO Education in the morning. I did, and Tim, the fellow I spoke to was extremely helpful. 

My question: What is the exact meaning of the "compare" mode and the "change" on the ultrasonic sensor when using a wait block? I tried the help menu and it was sort of helpful, but I needed to hear it explained from a person. 


Here is what I found out: 
The "Change" setting for the mode refers to a change from an initial reading of the sensor. For example, in the program above: 

Block 1- steering: results in the robot moving forward unlimited (forever) at a positive power parameter of 50. 

Block 2- wait: directs the robot to continue moving forward until the distance to the object has decreased (1) by 11 cm from the original distance detected by the ultrasonic sensor. Therefore it does not matter how far away the object is from the sensor. 

Block 3- steering: directs the robot to stop. 

Block 4- wait: wait for 1 second

Block 5- steering: using a negative power of 50, directs robot to go in reverse for unlimited or forever. 

Block 6- wait: directs robot to continue moving in reverse until the distance from the object has increased (0) by 6 cm from this second starting distance from the object. 

Block 7- steering: directs the robot to stop. 

Example: If robot starts at 25 cm away from object, it will move towards the object until it reaches 14 cm (25 cm - 11 cm). After a 1 second delay, the robot would then move in reverse, 6 cm back from 14 cm from the object to a final position of 20 cm (14 cm + 6 cm) from the object. 

The "Compare" setting was what I was looking for. This setting sets a threshold for the robot to cross before doing something. For example, using this setting a robot will move until it is a certain distance from the object.

There is one crazy thing that happens with the program above. I have put this to my students to figure out as a star-worthy challenge. If the robot is set at a distance from the object less then 11 cm, then it will just move forward forever because it never satisfies the parameter of being able to move 11 cm towards the object. In addition, my students have not figured out that the robots will move the same distance towards the object as long as the robot is 11 cm or more away from the object. If it were 50 cm away from the object, the robot will still only move 11 cm towards the object and then 6 cm back as long as there is not interference by anything in the surroundings. 

This is an excellent puzzle for my students to try and figure out. We'll see how day 2 goes.

Friday, October 4, 2013

PB & J Program

After several weeks of programming with the EV3 robots, it was time to conduct the classic PB & J Program Demonstration. The lesson was wildly successful. One particularly illustrative example of programming sequencing errors is shown in the images below.


The student did not specify the size of the slices of bread and therefore one is a cocktail size slice and the other is normal sandwich size. In addition, the student did not specify how much peanut butter or jelly to use. Finally, while it is not numbered, the last statement of the program suggests that "you can toast the pieces of bread." Certainly!

The rich discussion after the demonstration included comments such as: the robot does exactly what you tell it to do; our robots will not interpret directions; any errors that occur are a result of the programmer's program; also the errors are compounded, meaning that as more errors occur the final result is further off from the expected result. 

The basic idea that the programs need to provide very specific directions in order to achieve the desired result was grasped quite easily by students. In addition, the idea that it is a good idea to write and test one piece/task at a time, rather than the entire program. This makes it much easier to debug and problem solve. 

The demo took place during the first period of the day on Friday. What a way to begin the last day of the week. So much fun! 

Disclaimer: no properly functioning toasters were harmed during this demonstration. This toaster toasted only one side of the bread and the lever did not hold the bread down anymore. My son and I tried to take it apart and fix it, but my wife had already purchased another toaster at a garage sale. Isabel's PB & J program was the only one that mentioned a toaster. Perfect!