MC1026
MC1026 is a Craftbook IC that outputs a signal based on the current unix time modulo a specified value.
| About | |
|---|---|
| ID | MC1026 |
| Type | AISO |
| Self-Triggering | No |
| Clickable | No |
| Input | Any |
| Output | Single |
| First line | UNIX TIME |
| Second line | [MC1026] |
| Third line | x (optional; default 2) |
| Fourth line | y (optional; default 0) |
| Craftbook Page | |
Details
- Second Line
- [MC1026]
- Third Line
(x)optional; defaults to 2.- Specifies the length of the IC's repeating cycle, being the deviser value.
- Smaller values result in more frequent changes in output, while larger values result in longer cycles.
- Needs to be a whole integer value.
- Fourth Line
(y)optional; defaults to 0.- Specifies how long the output remains high within each cycle, being the value to compare the remainder against.
- Smaller values result in longer high periods, while values closer to
xresult in shorter high periods. - must be a whole integer value.
When activated, the IC outputs high if the current world time in seconds, modulo x, is greater than y. Otherwise, it outputs low.
In other words, the output is high when ([Unix time] % x) >= y.
The IC will output high for x - y - 1 seconds out of every x seconds.
Unix time in this case is the current timestamp provided by the system, in seconds.
By default, x is 2 and y is 0. This means the IC outputs high whenever the current world time is odd, and low whenever it is even.
Examples
Setup
line1: line2: [MC1026] line3: 5 line4: 3
The following table shows the output of MC1026 for x = 5 and y = 3:
| Seconds | Remainder | Output |
|---|---|---|
| 1 | 1 | LOW |
| 2 | 2 | LOW |
| 3 | 3 | LOW |
| 4 | 4 | HIGH |
| 5 | 0 | LOW |
| 6 | 1 | LOW |
| 7 | 2 | LOW |
| 8 | 3 | LOW |
| 9 | 4 | HIGH |
| 10 | 0 | LOW |
Notable and Practical Uses
This IC can be used to make asymmetrical and long-period clocks. This can be useful for:
- Clocks that have periods of hours or days
- Lights that blink instead of staying on and off for the same amount of time
- Calendars
- Combining the functions of MCU440 and MC0420
Due to the Unix time value being independent from the game itself, this IC provides accurate real-world timing regardless of lag, skipping the night, or changes to the in-game time.
As such, this IC is well suited for long-period clocks, real-time scheduling systems, and other mechanisms requiring consistent real-world timing.