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

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 



Teacher Resource Books

Global Map

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

« VEX2-D2 - Updated! | Main | Simple EV3 Demonstration robots »

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. 


EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>