Space Engineers

Space Engineers

Not enough ratings
Countdown Timer
   
Award
Favorite
Favorited
Unfavorite
Type: Blueprint
File Size
Posted
1.112 MB
30 Jul, 2023 @ 1:43pm
1 Change Note ( view )

Subscribe to download
Countdown Timer

Description
This is a functional timer clock that only counts down. It makes good use of timer blocks, event controllers, hinges, text panels, and interior lights; no scripts, mods, or DLC. It uses four 3x5 LCD displays to show the time, controlled by hinge-event incrementing and a 1 second timer block on loop.

There are many button controls on the top that allow you to start, pause, and reset the timer; set it to start at 5, 10, 15, 20, 30, and 45 minutes, and to cycle through each of the 4 digits for a more precise time (cycle goes 0, 9, 8, etc), as well as turning on/off a function that stops the clock at 00:00.

Cycling the digit from 0 to 9 will cause the digit in front to also cycle, so for example pressing the "cycle 1 sec" button when the time is 10:30 will result in 10:29, or pressing the "cycle 10 sec" button will cause 20:00 to become 19:50. Be aware of this when inputting a precise time.
________________________________________________

The way it works is kind of convoluted because there isn't really an easy way to do incrementing with the event controller, but it is possible by reading the angle of a hinge in small segments. Here's how I made the timer function:


-the 5x3 LCD panels are controlled by 10 or 6 timer blocks per digit, each one responsible for a number 0-9 or 0-5, turning on/off the relevant panels

-there are 4 hinges in control of each digit on the timer

-a "Loop 1s" timer block tells itself to start at 1 second and makes the sec1 hinge move forward every second; this timer is started and stopped to play and pause the clock

-each digit has two timers which increase or decrease its hinge velocity, the "incr" is sort of redundant but the "decr" is relevant to the "decr limit" event (later)

-for each digit, there are 10 or 6 event controllers set up in 2 degree segments plus one extra events that tell each screen number-timer when to activate and cycle back

-the first set of events read whether the hinge angle is greater than a relevant degree, and when true they trigger the relevant number timer and tell the hinge to decrease velocity, stopping it. The "(reset)" event outputs "0" and tells the hinge to decr twice so it moves backward. The "9" or "5" event also tells the next digit to incr its hinge so that 10:00 becomes 09:59

-then the "reset stop" event reads when the hinge gets back to origin, incr hinge to stop it and also outputting "0".

-there are 4 interior lights for each digit that certain events in the set turn off/on when that digit is currently "0".

-these lights are read by the "Time Up" event controller, which is set with an AND gate to tell the "Loop 1s" timer to stop when all lights are on, so the clock stops at 00:00

-each digit also has a "decr limit" event that reads whether its light is on (so it's at 0) and prevents the hinge from going any farther than the origin with a negative velocity by turning off the "hinge decr" timer so the decr command cannot be inputted to the hinge.

-the "Clock Reset" timer tells all the "hinge decr" timers to go backward to 00:00 and turns their lights on so the clock also stops. If the block is off it wont move

-The set time feature works with 3 timers for each setting

-the first timer "a" will reset all digits to 00:00 and start the next timer "b" in one second

-the next timer "b" will turn off all event controllers between 0 and the desired number, incr the hinge, turn off the light, and start the last timer "c" in one second; so for instance to get 5 on the 1 min digit, events 9,8,7,6 are off, and the hinge then moves to event 5 skipping those numbers

-the last timer "c" turns the previous events back on, and because turning them on also activates them since their read on the hinge is true, all the commands in those events need to be cancelled out; so for instance after 5 is reached and 9,8,7,6 are back on, the digit's hinge needs to be incr 4 times, the "5" timer needs to be activated, and also the next digit's hinge needs to be decr once.
________________________________________________

This was a brain-teaser project of mine that is part of a much bigger project coming in the future: Engineer League (basically Rocket League but in SE) and this makes up a component of the scoreboard. However you can use it to keep track of time in your creative world for instance