When I was teaching assistant at University for Real Time Safety Critical  Systems class this was one of the star assignments in the class.<p>Instead of writing just a dummy program we built an actual elevator using servo motors and asked students to code using different logic<p>1. Single elevator
2. Double elevator 
2. Double elevator with various kinds of optimizations (reduce the energy used v&#x2F;s reduce the time for each passenger).<p>All had to be done using embedded C on an ATMEGA processor.<p>Then we let students do the exact same coding using Esterel where you essentially represent everything as the state diagram.<p>It was so much fun for bother teachers as well as students because when you deal with real hardware suddenly the scope of problems goes beyond merely getting the logic right.