Author Options:

I need help writing a program on Lego Mindstorms EV3 Answered

Whattup y'all, I have a Lego Mindstorms project underway, but I can't figure out how to write the program. If somebody out there who is familiar with programming EV3 could help or give me some tips, that would be great!

The project is as follows: I built a start/stop timer for micro drones (i.e., a Tiny Whoop) so you can measure your time around your course. Start the program by pressing the center button on the Smart Brick. The setup measures whether or not the drone is on the starting block with the color sensor (either ambient or reflected light intensity). After the drone leaves the starting block, a timer will be set. The timer stops after the drone hits the stop gate, which presses the touch sensor. The time is then displayed on the screen, where you can view it, and then the program is restarted by pressing the center button again.

My problem is that I have no earthly idea of how to make a timer with the EV3 software. If you know how, then screenshot it and send it to me, and you will be rewarded with a great Instructable in the near future!

Auf Wedersehen, and thanks in advance!



11 months ago

Google is your friend here

• Timers are used in programs to count time in seconds
• They don’t give “real world time”, nor are they formatted in hours:minutes:seconds
• They are handy because if you rely on WAIT options, you will eventually mess up due to
time to actually run program elements.
• If you ran a loop for 10,000 times, with each loop counting 1 and WAITing 1 second, you
would think you would end 10,000 seconds later… but it takes time to process the
program and that will translate to 10,000 seconds PLUS the time to calculate.
• Using a TIMER, you can start the TIMER and stop your program 10,000 seconds later and
it should be within a few milliseconds of what you wanted."



Reply 11 months ago

Thanks for the comment, but I actually got it done before you sent it! :( Instructable is on the way!