Search
About

Damien works with students and teacher from around the world, bringing the effective use of technology to the classroom.  

LEGO MINDSTORMS
Damien is a member of the MCP (Mindstorms Community Program), a small group of experts who collaborate with LEGO to make the MINDSTORM product better.

VEX IQ Robotics
Damien is a member of the VEX IQ Super User group, a small group of experts who collaborate with VEX to make the VEX IQ platform a better product 

 

Books

Teacher Resource Books

Global Map

See where the DomaBot and RileyRover is being used around the world

Tuesday
Sep272016

VEX2-D2 - Updated!

I made a VEX IQ version of R2D2 a little while back and while it was a lot of fun, it wasn't quite right.  I built it just using the parts I had on hand and as a result it ended up predominantly grey.

See it here - http://www.damienkee.com/home/2016/7/8/vex2-d2.html

Cue version 2, in the appropriate blue and white that you would expect from R2-D2 :)

The head is a *little* bit better than V1, but it is still really difficult to do a dome with the VEX IQ parts.

 

Monday
Sep192016

Simple EV3 Voting Machine

I had an email from a teacher recently asking for some advice on how to put together a voting machine using the LEGO MINDSTORMS EV3.  I quickly put together this example as a starting point.

The build is ridiculously easy - The EV3 and 2 Touch Sensors.

 

The program however is a little more complex.  It would be a great way to teach a variety of more complex concepts like variables, parallel processing and looping.

(click for larger version)

There are three parallel tasks; Task 1 sets up a variable (Bob) and makes sure it is zero when the program starts.  It then runs an unlimited loop in which it waits for a touch sensor to be 'bumped' (pressed and released).  It then takes that variable and adds one to it and stores the number back into the variable.  Task 2 does exactly the same thing for a different variable (Sue).  Task 3 takes the Bob variable and combines it with some text so that the display says 'Bob: 7" as opposed to just the number by itself.  It then displays that Text on the screen at position 0,0  (Top left).  It then does the same thing with the Sue variable and puts it at position 0,3 (Middle left roughly).  The important thing to note is that this second display block has the 'Clear Screen' input parameter set to FALSE to make sure that we don't clear out our Bob Text.

If you wanted to extend it further, you could set the loops to run for only a few minutes, and then you a Compare Block and Switch Statement to declare a winner (or a draw!)

Let me know in the comments if you've done something similar. 

 

Tuesday
Sep132016

Simple EV3 Demonstration robots

I'm often asked to give quick demos of my robots to show off what they would be capable of in a classroom setting. I have three different models that I regularly fall back to to show off basic movement, the Ultrasonic Sensor, the Colour Sensor and the EV3's ability to play music.  Description and Project file under the video.

 



1. Line follower. A simple line following robot using a single Colour Sensor in 'reflected light' mode. The program is a basic edge follower using a Switch statement inside a Loop



2. Obstacle Avoider. Using the Ultrasonic Sensor, this robot backs up when it gets close to an object. I put in an extra little 'back up and shake' routine as well as a sound effect to give it a little more personality.



3. Music Maker. This design only needs a Colour Sensor being used in 'Colour' mode. An extended Switch statement identifies which colour is under the sensor and then plays the appropriate note.



I've included the .ev3 file below if you want to use them for your self. 

Demonstration EV3 Project file - demos.ev3

If you use any of these, please let me know how they go!

 

 

Friday
Jul082016

VEX2-D2

So the last few weeks / months have been pretty crazy/busy so over this last week I've done something that I haven't done in quite a while - build something cool just because I want to. I don't normally do remote control robots (preferring to focus on programming) but for this one I made an exception. VEX2-D2!

Wednesday
Jun082016

New Book! VEX IQ with RobotC Graphical

It's been a while, but the next book is now ready.  If you've been using the VEX IQ robot platform, but prefer the RobotC programming language over Modkit, then here is the book for you!  Click on the pic below to go to the info page with Sample pages and student worksheets.

Tuesday
Dec222015

Testing the Tumblebug (EV3 and VEX IQ)

So the title sounds awfully dry, but this is a project I've been meaning to do for a very long time.  A few years back one of my boys received a 'Tumble Bug' toy for Christmas.  It's a pretty simple thing, you put the balls into the mouth and they tumble down and come out either the left foot or the right foot.  

Being an engineer the second thing I thought of (right after "how do I turn that annoying sound off!?") was "I wonder how statistically fair it is?"  ie.  Does the ball come out the left foot / right foot with a 50% probability?

This would make a great experiment to run in class, not just with the Tumble Bug but all different types of kids toys.  Skip forward a few years of me telling my wife not to throw it out even though our boys have out grown it, and having a little spare time this week now that school has finished.

I've used both the LEGO EV3 and VEX IQ systems to demonstrate the approach I used.  

For the EV3, I put together a program in both EV3-G and RobotC that uses two Ultrasonic Sensors placed either side of the Tumble Bugs feet.  As a ball rolls past, the EV3 recognises a ball has rolled past and increments a variable.  

For the VEX IQ, I had trouble getting the Ultrasonic sensor to detect the balls as they rolled past.  A combination of the curved surface and fast rolling ball was too much for it to recognise.  Instead I used the Colour Sensor in Proximity Mode which worked perfectly.

A little bit of maths figures out the percentages and then displays them on screen.  Full breakdown of how it is done as well as code download is after the video.

Hardware Setup

Not much to this one, just the EV3 Brain with 2 Ultrasonic Sensors and the VEX IQ Brain with 2 Colour Sensors.


 

EV3-G Code

Each foot waits until the ball rolls past (reading less than 10 cm) and then increments the variable associated with that foot as well as the total count.  It then updates the screen (setup as a My Block in this example) and waits for the ball to roll away.  Repeat as much as you want.

click for larger version

Update-display My Block 

click for larger version

 

RobotC Code  (EV3)

This is essentially the same as the EV3-G version but with one small difference.  I used sequential IF statements in RobotC and Task Splits in EV3-G.  No idea why, both approaches would work for both software environments.

 

 

RobotC Code (VEX IQ)

Do it yourself

Here are the files I used

EV3-G - Tumblrbug.ev3
EV3 RobotC -  EV3_tumblrbug.c
VEX IQ RobotC -  tumblrbug_VEX.c

Results

So I ran the test over 50 cycles with each setup to see what I got.  

VEX IQ - Left 26%, Right 74%
LEGO EV3 - Left  33.3%, Right 66.6%

So there was a definite bias towards the right side of the toy.

What I love about doing these sort of extended investigations in class, is that rather than being a final conclusion, this now opens up a huge range of other questions and scenarios that you can test.

  • Why was there a difference?
  • Was the table level?
  • Do the different balls have an impact?
  • Does the placement speed in the mouth affect the results?

Please have a go your self and see what results you can come up with.

Thursday
Nov122015

EV3 Linefollowing robot via Bluetooth

A recent discussion on the LEGO Community forum about the WeDo kit led to an interesting question.  'Could you run a simple robot, with off board (on tablet or PC) processing?  ie.  Could you let the computer to the all the tricky computation and just have the robot send sensor values and receive motor commands?'

It isn't yet possible to even try with the WeDo set but I thought I'd give it a go with the EV3.  Don't get me wrong, this is not particularly useful, but I wanted to see if it possible given the probable lag time of the Bluetooth data transfer.

Short answer - Yes it's possible, but you can't go too fast otherwise the robot shoots over the top of the line before a bluetooth command has a chance to be received by the master, processed and sent back to the slave.

Video below of it in action.  Screenshots of the program under that and full .ev3 file to download at the bottom if you want to give it a go yourself.

Could it be done better / more reliable?  Undoubtedly! If you come up with a better way, test it out and let me know how you go!

 

 

 

 

 

Full .ev3 file download

Thursday
Nov052015

Fix a broken EV3 button

I had a student press the cancel button a little too hard today and it got stuck in a 'down' position and wouldn't work any more. You could still run programs as per normal, but you couldn't exit any menus or do a software shutdown of the EV3. It turns out there is a little piece of curved metal under each button which gives it the 'springiness' to pop back up, and this particular bit of metal had shifted under the plastic cover. Taking the cover off is as simple as undoing 4 screws in the battery compartment and then a gentle prod gets the metal spring back in position. Not sure how long it'll last, but it was an easy fix.

 

Wednesday
Aug122015

Simon Game - VEX-IQ version

 

The game of Simon is a lot of fun for kids and adults alike.  The basic premise is this:

Device does an action (display a light, plays a sound etc.)  Player has to repeat the action (press a button corresponding to the light/sound etc).  The device then does the original action plus a new action.  Player has to repeat the sequence.  Each time the player gets the sequence right, the device adds another action onto the sequence making it harder and harder to remember.

This is my VEX-IQ version of the Simon Game.

Hardware

This project uses a VEX-IQ Smart Brain and 3 Touch LED's. Given the VEX-IQ can take up to 12 input/outputs, I could theoretically do one that had 12 TouchLED's (but I think that would prove just a little too difficult).  No other hardware other than some plates and pins to prop it up.

Software

The software is all programmed in RobotC and you can download my software here - simon.c (if you use it, please acknolowgement where appropriate and forgive any glaring errors!)

These are some of the important parts of the code

Setup

Fill the sequence array with random numbers between 0-2 to represent which TouchLED's are going to light up.

 

Flash the right sequence level

 

Check to see which TouchLED's were pressed

Check to see if the TouchLED that was pressed is the right one, if it is, then allow it to check another.

This is a nice little project for teaching arrays in the classroom.  Let me know if you use it and how you would improve on it!

Thursday
Aug062015

Simon Game - LEGO EV3 version

 

The game of Simon has been popular for many years.  The basic premise is this:
Device does an action (display a light, plays a sound etc.)  Player has to repeat the action (press a button corresponding to the light/sound etc).  The device then does the original action plus a new action.  Player has to repeat the sequence.  Each time the player gets the sequence right, the device adds another action onto the sequence making it harder and harder to remember.

This is my EV3 version of the Simon Game.

Hardware:

I'm using 3 colour sensors to represent the actions that the device can show.  If you set the Colour sensor to measure ambient intensity, the LED inside glows blue.  If you set it to measure reflected intensity, then it glows red.  I'll be using these as flashing lights only, and am not interested in the actual sensor readings that they generate.

I'm using the Brick buttons (left, centre, right) as the player inputs.  If the left Colour Sensor goes red, that means the Player has to press the left Brick Button to match the sequence.  

Software:

Initialisation

Create a Numeric Variable Array and set it to 0

Set each Colour Sensor to be in Ambient mode (showing a blue light)

Generate sequence
Create a Random number, between 1 and 3, and append it to array (append is a fancy way of saying tack on a new number to the end of the array).  

I then show on the EV3 screen the length of the array to let the Player know what level they're up to.  If the array/sequence is 5 actions long, then they are on Level 5.
Take the random number, if it is 1, play a low note and briefly change Colour Sensor 1 to red and then back to blue.  If the random number is 2 or 3, play a medium / high note and flash the appropriate Colour Sensor.
Repeat this process as many times as there are numbers in the array.  ie. If the array/sequence is 6 numbers long, then repeat this 6 times.

 

Check the sequence
Wait for either the Left, Centre or Right Brick button to be pressed.  Each button represents a number, and this number is checked with the equivalent position in the array.  If the numbers are equal, it means the Player pressed the right button for that part of the sequence.  A brief high pitched note is played to indicate success and the next number in the sequence is checked.  If the numbers don't matched, then it means they got it out of sequence.  A suitable sound is played and the main loop is interrupted (exited).  The score stays on screen for 5 seconds so you can see what level you got to.