Friday, December 22, 2017

Success...sort of

Yesterday, we were going to do a robotics demo to a kindergarten class. For a variety of reasons, I ended up doing the demo myself. I had three kindergartners come up to the white board and draw a picture of a robot. They looked similar, boxy bodies, arms with claw hands, random buttons and lights, and maybe an antenna on the head. I asked them if they had ever seen a robot and if they thought robots were real or not. Some said they were not real, while others said they were real. Then I pulled out our team robot that currently looks mostly like a car with a small arm on the front. I told them that robots can be used to cook food, drive cars, get books at the library, vacuum the floor, or just about anything you could imagine.

I wrote two quick programs. The first just made it drive around in a figure 8. I asked what they thought, and they wanted it to do more, so I changed the program to make it have the arm go up and down while it was driving around. They thought that was pretty good, but wanted two arms to alternate up and down, which I told them I could do but would take more work than we had time for at the moment.

Then I showed them another program I wrote, called Feeding the Tiger. Basically it drives forward until they put the little box of food down in front of it, then it grabs the food, makes a growling sound, and then turns around and drives off with it. A few of them got to take turns holding the food out in front of the "tiger" although they had a hard time with it, since they didn't always line up the box very well with the arms.

It was fun, and I'm glad I had just me and the kindergartners. I think it would have been too much to have several of the team in there as well, since they can be out of control at times. Their teacher had to tell them several times to back off, since they would creep closer and closer trying to get a better look. They all want to do another robotics day in the future, so I'll have to think of something else cool to demonstrate for them, hopefully something they can interact with. Maybe I'll do something with colors and the light sensor.

After school, when it was official robotics club time, at the beginning of our sixth meeting, a few of the team asked about the kindergarten thing, but no one seemed very upset that they didn't get to actually do the demo. I told them we would split the group into two teams, and each team was to try to program the robot to follow a line. I used black electrical tape to draw a rectangle on one table and one that looked kind of like a digital sine wave. I let them split up however they wanted.

I should have attached the light sensor myself beforehand. I usually leave the parts box put away in the closet, because if it is out, they just want to build stuff with the Legos instead of working on what we are supposed to be working on. I figured I should let them attach the light sensor, so the parts were out, but as usual, about half the group just started playing with parts. About half of the team did work on getting the light sensor attached and went over to the table with the rectangular box to start working. I went over with the half that were working, and we started trying things out. The thing I'm most concerned with is that they are going to break or lose parts if they are just playing around.

A couple of the team that were paying attention were just lost. They were trying to program something but didn't really know where to start. One team member knew how to read in colors from the light sensor, so he worked on that and eventually was able to get it to start going if it was on the black line, although he didn't get very far with it turning at the corner.

I built a basic switch algorithm that was constantly checking the light level and would make it go straight forward if it registered black and stop if it registered anything else. Once I got that working, I had it turn a little to the left if it was on something other than black. Eventually I had it drift slightly to the right if it was on the black and turn sharply left if it was off the black. Tweaking slightly how much it was turning and driving and how fast, I was eventually able to get it to follow the rectangle. Every once in a while it would get off the tape and would drive in a circle until it found it again and then start following again. It wasn't driving totally smoothly, as it would wobble a bit right and left, but it followed the line pretty well. I think some more tweaks can get it moving better.

The bigger challenge is having it be able to follow the line that curves in both directions. I'm not sure yet how to tell it which way to turn, but I think the general idea is to actually follow the edge of the line instead of the middle of the line, so it will always turn right if it's on the line and left if it's off the line and go straight if it's on the edge of the line, which means it can turn in either direction. Of course, the boys should be coming up with their own algorithm or researching how to do it, but I'm trying to model a bit how to try things out and think through the problem logically. I may recommend they spend some time looking at videos others have uploaded for how to perform basic tasks but not too much that they're just copying what others have done. The problem solving mindset is what they need to develop, so they can start to think critically about designing something to work, rather than not knowing where to start.

Monday, December 18, 2017

Success!

This past week we had our fifth meeting. The challenge that I had given them the week before was met! Time to start working on the next one.

We had one of the more boisterous boys come back, who had been missing the week before, but he was much more mellow. He was much more on task himself, plus helped get some of the other boys focused when they were not. I don't know what happened exactly, but I'll take it. :)

At the end of last week, each boy had their own computer and were individually working on trying to solve the problem of picking up the pipe and driving it over and dropping it on the other notebook and they got close. This week we started that way, but about half of them just sort of naturally grouped together and were working on the problem together, which was great to see. They had a couple of computers but were mostly just working on the one program that was the closest and trying it repeatedly until they could get it to work consistently. Part of their problem was not having the spots marked on the floor where the robot and the notebooks were sitting, so they would get bumped around and not end up back exactly where they were previously.

The other half of the boys were just kind of over there messing around on the computers. I honestly don't really know what they were doing. I've gotten to where if they are running around too much, I just sit there and wait quietly for them to be ready, as I can't compete with that many of them if they want to be out of control. One of them will see it quickly and tell the others to calm down so we can get back to work. Since we had about half of them focused, I spent time with that half and let the other half do whatever they were doing.

This is really the norming phase moving in. There is still some storming. They will fight and yell and poke each other in the eye as they are 9 and 10 year old boys after all. But those who want to do something are actually trying and accomplishing what they want to do.

I think the next step is to work on loops and sensors. Right now they have to tell the robot to drive a certain distance, but by using a sensor in a loop, you can tell it to start driving and just keep on driving until a certain condition is met by the sensor, such as seeing a certain color or bumping the touch sensor. That way, we could put the notebooks a differing distance apart, and as long as it is going in a straight line between them, as soon as it sees a certain color, it knows it is on the notebook and can drop the piece and back away. Part of that is also navigating around the table. There are lines in certain parts of the table which can be followed to make sure it ends up in the right place. The basic algorithm is that as the robot drives forward, if it sees black it turns slightly one way or if it sees white it turns slightly the other way. By checking the line regularly and only moving a little at a time, it will end up driving pretty smoothly.

Making progress.

Friday, December 8, 2017

I'm Bored

Yesterday was our fourth meeting of the Robotic Dudes.

We jumped right into trying to perform a basic task. Part of the challenge is to pick up a piece with a ring-shaped handle and bring it back to the home base. In order to keep it simple but get them programming, I gave them a modified challenge using that Lego piece from the challenge kit. I put two notebooks on the ground about 4 feet apart. They had to make the robot pick up the piece off the one notebook, turn around, and drop it on the other one.

There are enough laptops in the STEM Lab, which which is the room where we meet, for everyone to work on their own. I just explained their task, pointed each one of them toward a computer, and I went over and sat in the corner to watch. Their first task was to modify our existing robot to give it something it could pick up the piece with. It already had an arm, but it was more for dragging something on the ground than for picking something up off the ground. They modified the arm to put a small hook on it. Then they had to start working on the programming. I had to kick them out of the box of Lego parts, as they kept wanting to mess around and build things that had nothing to do with the robot.

They eventually all started working on the computers, although a couple of them were just going through all the different built in sounds the robot can make instead of actually working on the task at hand. One of those included one of our robotic experts, who does have experience both in Legos and in other programming environments. His favorite line so far is, "I'm bored." The first couple weeks were painful for him, I think, as we were getting to know each other, setting up some rules, talking about what we would be doing, and learning how the programming environment works. He just wanted to get in and start programming. I don't know that we're looking at an Asperger's diagnosis, but he's definitely more interested in interacting with technology than with other people. Of course a lot of kids these days match that description. Part of First Lego League is teamwork, though, so we have to spend some time on it.

Most of the boys had a laptop to work with, although a few were working together on one or goofing around. They were fighting over who got to connect their Bluetooth to the robot and try out their program, which is a good thing. We had several who tried to drive way too far and just kept going after hitting the piece they were supposed to pick up. We had one who picked up the piece but ended up flinging it up in the air since they raised the arm too fast. One actually picked it up and drove off with it, but went off at a weird angle and didn't end up dropping it on the other notebook. They were getting closer each time as they took turns running their programs and then tweaking them. This might have been the first meeting where I wasn't ready to kick them all out when time was up. We could have stayed another hour to tweak programs and keep trying to accomplish the task.

Something that will make this easier in the future will be when we start using loops and sensors to move around instead of just trying to guess how far to make it drive. Plus, I think building a different kind of arm to pick up the piece will work better.

I really tried to stay mostly hands off and let them try things. I would give them some ideas or hints to help them figure out what they did wrong. At one point when some of the boys were messing around building things that had nothing to do with our robot, before I took away the box of extra parts, one of the boys asked if he could just watch a video (unrelated to robotics) since no one was doing anything. I took away the spare parts, but I also challenged him to step up and be a leader and get his team focused on the task at hand. The only way for me to stay sane and for them to really come together as a team is for me to give them something to do and then back off and let them organize and make it happen.

At one point, someone that looked like a college student came into the STEM Lab and sat down to watch. She took some notes for maybe 10 minutes and then left, without saying anything. There are a lot of college kids that work in the after school club, so I don't know if she was part of that (or if she thought we were part of that). When she was there, we were testing out our programs and learning some things together about how to fix the mistakes they had made in their programs, so much better than some times she could have shown up in previous sessions when they were jumping off tables (both literally and figuratively).

We have a ways to go, but I can see the light at the end of the tunnel.




Thursday, December 7, 2017

Programming

It has been a while since my last post on the Lego team. Thanksgiving preempted our normal Thursday session, which would have been our third meeting. I sent out an email with some basic information on the challenges we will be performing and some videos for the kids to review over the break.

Last week, we had our third meeting. I wanted to make sure we got the kids more hands on with the robots so they don't start losing interest, and they've been excited to get started. I split them into two groups. I had one group create a short plan for some movement they wanted the robot to make - drive in a circle or a square, zig zag along a path, etc. Then they would actually program whatever they decided they wanted it to do. In the meantime, I took the other group and showed them around the challenge kit, which had been assembled by one of the other teams. Then the first group told us what they planned and we had them show it off to see if it did what they wanted it to. (Spoiler Alert: It didn't.) Then the second group had a couple minutes to try to fix whatever was wrong with the first group's code. Then we switched, and I showed the challenge kit to the first group and had the second group plan something and program it. One of the groups had planned to have the robot drive in a straight line, turn around 180 degrees, drive back in a straight line to where it started, and repeat that several times. The first time, it ended up drawing more of a star shape, but eventually they were able to tweak it to go straight back and forth.

We also watched another of the STEMCentric videos where he showed some of the other basic blocks using the medium motor or the tank steering. The next video we need to watch is the one on loops, which are important when using sensors to control the motors. We'll get to that soon.