Tuesday 18 November 2014

We made a changing conditions program. It goes forward, registers of the wall and drives forward. Our program included the gyro sensor and various My Blocks.

What it does is;
1. Reset the gyro
2. Goes forward
3. Uses the TurnHeading my block to turn efficiently
4. Stops the motor
5. Goes forward
6.Usesthe TurnHeading my block (again) to turn efficiently
7. Stops the motor
8.Goes forward.

-Olivia

Wednesday 12 November 2014

Following a Line using a My Block

One of the challenges we've had with this year's competition has been following lines efficiently. The lines are different colors, sometimes we want to follow the left side of the line and sometimes the right, and we have different criteria for when to stop following.

Since we had this problem we assume others did as well, so here's our solution.

After programming a bunch of different missions and reproducing similar code several times we decided to try creating a My Block to do the work.

FollowLine My Block (click to enlarge)

This My Block takes four inputs: 
1) gain: the amount of correction to apply for a given size of error
2) power: the power applied to the driving wheels
3) light: the light level on the bright side of the line
4) dark: the light level on the dark side of the line

Using this My Block we can follow any color of line, along either side of the line.

We found some good advice online that said not to try to incorporate the end condition (when to stop following the line) in the My Block, and not to pass in the motor ports.  The end condition could be another light sensor detecting another color, a touch sensor being pressed, etc.  The way to accomplish this with this My Block is shown below:

In the example above, the robot drives with power of 40, using a gain of 1 to correct the steering, and stays between a white region of 40 and a dark region of 9, exiting the loop when the light sensor on port 3 sees black.  Note that changing the sign of the gain (-1 instead of +1) causes the robot to search to the left for the line instead of the right, allowing it to follow along the right side of a line instead of the left.  Also note that if you're using more than one light sensor you may want to add a "port" input specifying which sensor you want to use.

We hope this was helpful.  Good luck with your programs!

Saturday 8 November 2014

Does Your Child Confuse Letters or Write them Backward?

How to Correct Mirror Writing


Problem:   Children in grades 1 to 3 often write letters and numbers backwards, most commonly b's and d's, 3's and 5's, and 6's and 9's.  For example:



Solution:  Give the child a Rainbow Loom bracelet to wear on their wrist. Every time they go to write the letter or number they tend to reverse, they need to stop and move the bracelet to the other hand, then write the letter or number.



Why?   Moving the bracelet makes them stop and think about what they are doing. 

How it works:

1.         Determine the number/letter to change.
2.         Wear the bracelet.
3.         Before the student writes the number/letter they have to move the bracelet to the other wrist.

Most children who reverse letters and numbers know how to write them properly  When they write the numbers they tend to rush through it, without stopping to think about what they are writing. An example of this kind of mistake that happens with adults (and kids) is shown in the Stroop test. The Stroop test requires people to read the colour the word is written in, not what the word says. If you try it with the photo below, you might find that it is harder than it sounds.



Now, if you try it again, deliberately pausing one second between each word, you will likely find that you make less errors than before.

In the reverse writing solution, the bracelet forces a pause before writing, and the child is more likely to write the letter or number correctly.

If you try this solution, please let us know how it works in the comment section below.  Thanks!

--Olivia