Monday, September 27, 2010

Day 6: Sobriety (is difficult for robots)


There are at least five versions of this program! IT IS SERIOUSLY LONG.

The first iteration did not use the number of turns of each wheel to calculate distance travelled. As a result, the robot, while following the line, was not particularly steady. (It kept turning towards the weaker motor)

The current iteration was developed after several attempts at combining the original program (following a line) with a straight line program (correcting the robot's path by the counters). These can still be seen: the turn stacks allow the robot to turn when crossing the line, and the corr stacks keep the counters at the same number.

The program is not as elegant as it could be, since many fixes to problems were added, instead of fully incorporated into the program. The most obvious examples are the thresholds for sensing the line, which have the thresholds awkwardly added on. Additionally, the robot was moving too fast to turn efficiently, so its speed was slowed by decreasing the power. However, this causes the weaker motor to appear significantly weaker.


Predictably, there were many issues with the timing of the turns. As the last section of the video can attest to, the turns are still not perfect. As the robot turns, it is also moving forward. For sharp turns like the last turn, it cannot turn fast enough to get back on the line before it has already passed.

Essentially, this could be fixed by having the robot back every time it turned, to check if it fully crossed the line. However, the robot would look considerably more drunk.

Friday, September 24, 2010

Day 5: Following the light

The challenge was to move towards a light.

Two light sensors were placed on each side of the robot, both facing forward. We had slight difficulty with one light sensor being more sensitive than the other, so our first version of the program had the robot comparing the current light detected from one sensor to the light it had detected a tenth of a second ago.


However, not only was this incredibly complicated, it also had interesting issues. At a lower time interval, the robot would take a scenic path towards the light (but eventually reach it), and at a higher time interval, the robot would spin in a circle every time it moved forward 6 inches. The imbalance of the motors (one side is more powerful than the other) also posed a problem

So after testing the light sensors, we chose two new ones, that were of similar sensitivity.


Not only was this simpler, it was also functional!


There are still slight problems as the robot moves. Most are caused by the imbalance of the strength of the motor, since it turns more in one direction...

Monday, September 20, 2010

Day 4: Following a black line





This program made the robot follow a black line...


But it looks kind of drunk while doing it!

Basically, it goes one direction until one of the sensors on either side "sees" the line, and then it starts going the other way.

There were a lot of issues! For some reason, reconnecting each block fixed some of the issues.

Our right motor was weaker than the left. It looked really silly since it would turn really fast! and then really slowly, so we changed the power on the motors to reflect the imbalance.

Also, when the robot went too fast, it wouldn't see that it had passed the line, which we solved by slowing down the motors.

Friday, September 17, 2010

Day 3: Playing with toy cars

So there are no videos or pictures yet! But they will be uploaded soon.



The first program we wrote was pretty simple: just making the car back up if it hits something



This program just tells the car to stop after the tire turns a certain number of times! It took a really long time to figure out exactly how many turns are in 1.5 meters.



An easier way to determine when the car reached 1.5 meters was by detecting when it passed over white tape (the finish line)! We had some trouble with the resistors, because at first the difference between the floor and the tape was too small for the car to sense...



This navigates the car out of a maze! It stops when it hits something, and then backs up and turns a bit, before continuing. We tried to build in a step to detect if the car had hit something and was stuck, but usually the car would remain stuck, even if it tried to back out... But then the maze changed from boxes with edges that caused the car to get stuck to ones with flat sides, so it worked out!

ETA:

The stopping after a certain distance video:





The escape video was too large, but the youtube video is here

Tuesday, September 14, 2010

Day 2: More Playing with PicoCrickets


We got bored of the dance party (and were unable to improve on it), so we made a button counter and an arm that automatically hits the button.


It's basically just a button that registers touch, a display, and a Lego piece connected to a motor.

Not too complicated, but a little tricky with the coordination of the arm hitting the button. As the video shows, the button sometimes needs to be pressed manually to reset the arm when the arm fails to hit the button hard enough.

Obviously had we been more patient, we could have tested the times of the arm and so even if it missed, it would automatically try again. Or, we could have used a higher power on the motor, so the arm could hit harder.

But it's still pretty cool.


Credits: First and last picture by me; second picture and video by Hope

Thursday, September 9, 2010

Day 1: Playing with PicoCrickets

A quick intro:

The programming behind PicoCrickets isn't very difficult. It's targeted towards ten year olds, after all! It's all pretty blocks that you snap together.

Basically, you have four outlets on the cricket. You can make stuff light up, play (basic) sounds, turn, or display numbers. It can (with the use of another outlet) sense light, touch, resistance, or sound.

And, it's made out of Legos!


My partner, Hope, and I made a dance party.
Sorry for the poor quality (and horizontalness), it was taken on a phone. :D

So pretty much it involved lights, motion, and sound, and was controlled via light. The light turns color based on the amount of light reaching the sensor; the motor reverses direction (this is hard to tell; pretty much the people change direction) when there is a momentary stop of light reaching the sensor; and the sound similarly stops when there is no light reaching the sensor!

The styrofoam ball is supposed to be a disco ball, but since it was held up via rubber bands, the bells were needed to balance the weight of the light. And the pipe cleaners are sparkly!


credits: images by me, video by Hope