[INACTIVE][MECH] ClockDisplay v0.5 - Digital Clock Library for RedstoneChips [860]

Discussion in 'Inactive/Unsupported Plugins' started by Malkierian, Apr 3, 2011.

  1. Offline


    ClockDisplay - Digital Clock Library for RedstoneChips
    Version: 0.5 for CraftBukkit [860], RedstoneChips 0.9

    Ever wanted to display time visually on your server? Then this is the library for you!
    This plugin provides an interface for use between the SensorLibrary daytime circuit and the BasicCircuits segdriver.
    Of course, this means that you need the whole RedstoneChips library for this to work.

    * Takes inputs from daytime
    * Separates digit values
    * Outputs two sets of pins for two segdrivers (one for each digit).

    Show Spoiler
    This circuit has sign arguments and automatic parameters. Enter this on sign:
    Line 1:dclock
    Line 2:[gametime/earthtime]
    Line 3:[tfhour]
    Line 4:[offset]
    If no argument is placed on Line 2, earthtime is assumed.
    Lines 3 and 4 only apply to the hour mode, and if blank, assume 12-hour mode and default offsets (6 for gametime, 0 for earthtime). tfhour enables 24-hour mode.

    Note on offsets: you MUST put something on line 3 if you wish to have offsets. If you don't want 24-hour mode, "false" would be just fine, but ClockDisplay will not recognize an offset without it.

    This circuit has three modes. Two are hour modes (12- and 24-hour), and one minute mode. These modes are enabled automatically based on numbers of input and output pins
    The setup is as such:
    * Hours

    - * 12-hour
    * 24-hour

    - * 5 input bits - direct carry over from a daytime hours circuit, 5 outputs (applies to both 12- and 24-hour modes)
    * 8 output bits:

    - * 1: clock - for actuating the segdriver (goes into the segdrivers' clock inputs)
    * 2-5: ones digit value, from 0-9. This goes into the first segdriver.
    * 6: blankPin - this starts the pins for the second segdriver. This segdriver needs 4 inputs, with the blankPin argument on the second line. Take the clock from output 1 to put into this segdriver as well.
    * 7-8: tens digit value, 1 or 2 (blankPin takes care of zeroes by not showing a digit).
    - Minutes
    * 6 input bits: again, a direct carry over from a daytime circuit, this time a 6-output minutes circuit
    * 9 output bits:

    - * 1-5 are the same as in hour mode
    * 6-9 are the tens digit output for minutes, 0-5. As with the second segdriver pins on the hours mode, take the clock from pin 1 and put it into the second segdriver

    So, in order to get a full clock display, you are actually required to build two daytime circuits, two dclock circuits, and four segdriver circuits. They will be setup something like this:

    [daytimeOut] - [dclockIn]     [dclockOut] - [segdriverIn]
         1       -     1               1      -     A1, B1
         2       -     2               2      -       A2
         3       -     3               3      -       A3
         4       -     4               4      -       A4
         5       -     5               5      -       A5
                                       6      -       B2
                                       7      -       B3
                                       8      -       B4
    [daytimeOut] - [dclockIn]     [dclockOut] - [segdriverIn]
         1       -     1               1      -     A1, B1
         2       -     2               2      -       A2
         3       -     3               3      -       A3
         4       -     4               4      -       A4
         5       -     5               5      -       A5
         6       -     6               6      -       B2
                                       7      -       B3
                                       8      -       B4
                                       9      -       B5
    You can then take the outputs from the segdrivers and put them to clock pixels as with a normal segdriver. From the back, they are in counter-clockwise order, i.e.
    2      6
    3      5
    Where each pixel number corresponds to the output pin number on the segdriver, 1-1, 2-2, etc.
    For more information on how to work with the daytime and sedriver circuits, look here and here.

    Here are a few pics of the setup:

    Show Spoiler
    1-pixel-wide segment clock

    3-pixel-wide segment clock

    dclock inputs (hours)

    dclock outputs (hours) (with slight view of the two segdrivers)

    dclock sign (for gametime)

    And, without further adieu, the video tutorials! Two parts.

    Show Spoiler

    <Edit by Moderator: Redacted mediafire url>
    <Edit by Moderator: Redacted mediafire url>

    * Download RedstoneChips, and the BasicCircuits and SensorLibrary packages (available on the RedstoneChips thread) (no, ClockDisplay is not dependent on BasicCircuits or SensorLibrary, but without the circuits from them, it's not very useful).
    * Download ClockDisplay.jar (above)


    Version 0.5
    * Implemented custom offset

    Version 0.4

    * Implemented earthtime
    * Temporarily reset the gametime offset (revert from 0.3)

    Version 0.3

    * Fixed gametime offset

    Version 0.2

    * Implemented 24-hour mode (and tested).
    * Fixed code for 24-hour mode determination (code now requires only 8 outputs for hours mode).

    Version 0.1

    * 12-hour clock fully implemented. 24-hour started, possibly working, but untested as of yet.
    * Minutes digits work for any mode.


    * Implement properties to do custom offsets (for both earth and game times)
    * Requests?

    Last edited by a moderator: Dec 14, 2016
  2. Offline


    Does this adjust for the 8-hr offset when using gametime?

    I'm assuming it does or you wouldn't need the sign argument.
  3. Offline


    Yes, it does, though the offset is actually 7 (I tested it myself, based off of the fact that noon (12) is with the sun in the very middle of the sky, looking straight up. This was done off of CB617, so it may have been different before). ClockDisplay converts game time 0 to real-time 7, etc.
  4. Offline


    very nice, anything with redstonechips is nice :p
    i hope to use it soon, but its not a segments display, but a very big one
  5. Offline


    Well, I'm sure separating digit values in a single chip would still be very useful for a non-segment display :D.

    Hope it works.
  6. Offline


    can u make a tutorial about how to build an 24 hour clock? i dont get it :/
  7. Offline


    I had made a video showcasing my current setup the other day, but my voice wasn't loud enough on it, so I need to remake it. I'll try to have that and a tutorial vid up in maybe a day or two.
  8. Offline


    I need the video now I can't get it to work...
  9. Offline

    Jake Auditore

    Awaiting tutorial, as well. It looks like an awesome plugin! Can't wait to set it up.
  10. Offline


    Hey guys, sorry for all the quick updates lately, things just went a lot more quickly than I was expecting.

    Anyway, currently:
    • dclock does earth/server and game time, in both 12- and 24-hour modes.
    • game time has offset to convert to real-time equivalents; this offset is currently +6.
    For the future, I plan on implementing a properties file that will allow for the setting of custom offsets for both server and game time.

    However, barring any requests, after that I think this plugin will be, for all intents and purposes, done.

    Also, I am working on the tuts right now, but keep in mind, this is the first tutorial I've ever done, so it's taking me a while to understand a few things (my first attempt at it failed because my voice was inaudible in the video, and the second one, which I just did today, was over 25 minutes long! Way too long for a single chip, even if it does include the display...).

    Hopefully I'll have it up by midday tomorrow at the latest. Just a little more patience!

    Alright, everyone, the tutorials are up! Go have a look, and tell me what you think.

    And remember, these are my first tutorial, so go easy on me!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  11. Offline

    Jake Auditore

    What are the dimensions of the clock display you're using, and what're the dimensions of the control room area? Could you make a tutorial of the area setup? If not; the area dimensions would be greatly appreciated.
  12. Offline


    You can very well see the area setup in the vids I have up already. That's all there is to it. As for dimensions of the screen I'm using, the large one is 75wx27h, and the smaller one (two-pixel segments) is 27wx9h.
  13. Offline

    Jake Auditore

    I meant is there a certain size the room has to be? I can see/copy the setup of block placements, but without the dimensions of the room it'll be more error than success.
  14. Offline


    The amount of space the whole thing takes up is 44Wx27Lx3H.
  15. Offline

    Jake Auditore

    Thank you muchly. :D
  16. Offline


    No prob. Just remember, the 44W is the opening in my video.
  17. Offline

    Jake Auditore

    Sorry if I'm bombarding you with questions, but are you planning to do a tutorial on setting up the display itself?
  18. Offline


    I may do that as part of my upcoming RedstoneChips tutorials, but it would be part of that, as it deals directly with the pixels chip (which is part of RedstoneChips). Though I would, of course, post it here. :D
  19. Offline

    Jake Auditore

    Awesome. I'll be on the lookout for it!
  20. Offline


    As will I!

    I seem to have a bit of a dilemma. When I try to activate the dclock sign for minutes it says that I don't have nine outputs. However I counted and I do have nine, and this includes the trasmitted current just like the one in the hours setup, any ideas?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  21. Offline


    It can be any block other than the blocks you have set for input and output (yes, that's configurable :D), but make sure it's not the same as the blocks you're setting the circuit on, or you'll get "circuit too big" errors.
  22. Offline


    can i use more then 2 outputs? so its much bigger?
  23. Offline


    More than 2? You mean, within an hours mode, two hour-tens outputs and two hour-minutes outputs? How about a transmitter/receiver assembly?
  24. Offline


    hey malkierian so the clock is 2 behind game time, since youtube wont let me post and link and you'll probably check this first
    here is what i mean
  25. Offline


    No, I know what you're talking about. It's because gametime (whether set by Notch or by sk89q while making CommandBook, or whoever else made the plugin you are using to allow specific time setting) is completely off. I set that offset by the in-game sun (at the time, I could only do /time night/day). If you type /time 2PM, look at the clock, and look at the sun, you will see that my offset is correct, because the sun will be DIRECTLY overhead, and your clock will say 12:xx.

    That being said, the code for the next version is written, I just need to test it, which will allow you to set your own custom offset on the hours signs, which will also default to my offset if one is not specified.
  26. Offline


    Oh wow I didn't even think of that. Thanks, that explains alot and that is a great idea for the time offset thing, it will stop my OCD about that lol.
  27. Offline


    UPDATE: Version 0.5 for CB 617, 670; RSC 0.87, 0.88
    Custom offsets are now implemented!

    Note on offsets: default for gametime is 6, and this is sun-time. I don't know who messed it up, but "Noon" in game time is not "Noon" according to the in-game sun. "8am" for most, if not all, /time commands is actually 6am according to the game's sun. So, if you're like @nala3, then you can use 8 on line 4 of the sign to get them to line up as far as text times go. Here's the new format for the signs (* = mandatory):

    Line 1:dclock*
    Line 2:[gametime/earthtime]
    Line 3:[tfhour/false] *1
    Line 4:[offset]

    *1 - Line 3 is only required if you want to use a custom offset. Without it, it will not register that there is an offset, and will assume defaults (6 for gametime, 0 for earthtime).

    Downloads updated in OP.
  28. Offline

    Jack Bartlett

    How big is the 3 pixle clock?
  29. Offline


    A great idea would be to have custom set clocks that you can paste to were you want but if you wanted custom just set it up yourself
  30. Offline


    You mean like having WE schematics people could use? Because otherwise I'm not sure what "paste" you're talking to. I could probably do that too. I just haven't had time the past few days to do any of the stuff I said I might do :p

Share This Page