Get in contact

posts/page

Simple EV3 Voting Machine – Damien Kee

Sep 19, 2016

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.

Get in Contact

  • Brenda Gahan - Head of Learning image

    Brenda Gahan - Head of Learning

    Sunshine Coast Grammar School
    star star star star star

    His wealth of knowledge and expertise allows him to tailor each workshop to the specific skill level and interests of the students (and teachers) and ensures that everyone is engaged and challenged.

  • Digital Technologies Teacher image

    Digital Technologies Teacher

    Victoria Point State High School
    star star star star star

    Students engaged in hands-on learning experiences that developed their problem-solving skills. It was a valuable and highly relevant real world learning opportunity.

  • Tammy Grady image

    Tammy Grady

    Senior Project Officer, QMEA
    star star star star star

    Through the Queensland Minerals and Energy Academy (QMEA), Damien has worked with hundreds of students and Teachers from across the State, all with varying levels of robotic and programming experience. Feedback from Damien’s workshops are always full of praise and appreciation, not only for his professional knowledge, but his adaptable teaching style and ease of delivery.

  • STEM Teacher - Years 7-10 image

    STEM Teacher - Years 7-10

    Tannum Sands State High School
    star star star star star

    Damien's professionalism and communications skills are superb. The very best educational expert visitor we have had come to the college.

  • Primary School Teacher - Year 5 image

    Primary School Teacher - Year 5

    Central Queensland Primary School
    star star star star star

    Damien's delivery style captivated students across every year level, from junior to senior. His depth of knowledge and genuine ability to tailor content to our students' abilities made a real difference, keeping everyone engaged and getting the most out of the experience regardless of their starting point.

  • Head of Curriculum image

    Head of Curriculum

    South East QLD Primary School
    star star star star star

    What stood out most was how thoroughly Damien customised the workshop to our school's specific needs. Rather than a one-size-fits-all session, he took the time to understand what we were after and delivered exactly that.