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

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

  1. Offline

    Malkierian

    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.

    Features
    * 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:




    HOURS
    Code:
    [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
    
    MINUTES
    Code:
    [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.
    Code:
        1
    2      6
        7
    3      5
        4
    
    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
    [​IMG]

    3-pixel-wide segment clock
    [​IMG]

    dclock inputs (hours)
    [​IMG]

    dclock outputs (hours) (with slight view of the two segdrivers)
    [​IMG]

    dclock sign (for gametime)
    [​IMG]


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

    Show Spoiler



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

    Installation
    * 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)

    Changelog

    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.

    Todo

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

    [/code]
     
    Last edited by a moderator: Dec 14, 2016
  2. Offline

    Enzy

    Yes i meant schematics that would make this plugin awesome
     
  3. Offline

    BigRenegade

    @Malkierian:

    I have a small problem. From your video tutorial I cannot make out how the minute circuit is set up. You do not show the whole minute circuit and in the video you move so fast, even using frame stepping I cannot make out how the inputs and transmitters are set up. I could use a little help. Also in the video you stated in the first part that you would get back to the pixel circuits for the display but never showed how you set up the display.

    Would appreciate a little help in completing this. I have a family server and I planned on using the clock to show the time in the game so the kids would know when to get off their computers. :)

    EDIT: After about an hour of playing around I found out the pixel layout to show the numbers correctly. But I still have not figured out how to do the minute circuit.

    EDIT2: The circuit for the minutes cannot be the same as the hour 1 since there are 6 inputs and when I click on dclock it tells me it needs 9 outputs not 7. I have racked my brain on this all day long and got nowhere.
     
  4. Offline

    Malkierian

    Well, not all the info is in either the videos or the OP. But all of it is in both combined.

    In the OP I said that the minutes are made with 6 inputs, instead of 5 like the hours, and that the segdrivers are the same as the hour-ones segdriver.

    As for the pixel circuits, yes, I never did get back to that. Unfortunately, however, I currently have a cold and cannot speak, so another video is not in the books right now.
     
  5. Offline

    Zirind

  6. Offline

    BigRenegade


    @Malkierian:

    Finally got it working! After over 12 hours of building and rebuilding. :)

    With it finally working I'll go and make a video of the steps I took to bring it to life. I'll do a step for step process
    along with the basis for it. Hopefully it will help those who (like me) are more visually oriented in learning.

    As for the pixel circuits, it was not the making of them that had me puzzled but the order in which the signs were attached to the pixels. Luckily I got one clue to let me figure it out. For the others looking to use this mod the following is how they go:

    1
    2 6
    7
    3 5
    4

    This is a dynamite mod and keep up the good work!!

    I had the same problem when building mine. I found that for some reason if you have a dirt block with grass on it it won't detect all the outputs the first time you try to activate it. It's not a bug in his mod just a quirk in MC's detecting module. :)

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

    Zirind

    I'm using smoothstone instead of dirt :p.
     
  8. Offline

    petteyg359

    Dirt and grass are not the same ID.
     
  9. Offline

    Malkierian

    Well, don't know what was wrong with it before (certainly not something wrong with my own plugin, segdriver is part of BasicCircuits) but glad you got it working.
    I think what he meant was if you're using dirt, and one of them turns into grass, if the grass is on top of an input or output, it won't detect.

    But yes, @BigRenegade They're not the same ID, and that's why they don't detect. Also why I build my circuits like I do (connected at the top instead of to the sides). Makes for less errors like that.
    Oh, yes, I could have given you that information, lol. I'll put it in the OP.
    Edit: Now in the how to use section, just at the end.
     
  10. Offline

    eisental

    @Malkierian It could be useful to add links to the relevant circuit docs so people know what they're doing. Most of the info about making the display work with segdriver is here

    @BigRenegade That's what happens when you're too cheap to use stone :D
    Seriously though, I never thought of that issue before. Might be a good reason to ban dirt as a chip block.
     
  11. Offline

    BigRenegade

    @eisental It wasn't that I was too cheap to use stone, I was using the exact same materials as Malkierian in his video. He was using dirt, gold, and iron, so that is exactly what I used. :)

    It turns out it might have been a good thing as it alerted others to the reason for some problems.
     
  12. Offline

    eisental

    Of course I was only joking :)
    So just to make it clear, you can use any material instead of the dirt if you want, except gravel and sand.

    @Malkierian There seems to be a formatting error in the updated 1st post.
     
  13. Offline

    Malkierian

    @eisental Yeah, I suppose that's a good idea. I'll put that in the OP.

    @BigRenegade It's really not a problem if you make it where I made it, inside a fully stone-lined cavern system. Making it on top of grass outside is a completely different issue :p.
     
  14. Offline

    BigRenegade

    But I did build it inside a stone lined area. It took me 45 minutes to dig it all out. lol

    It was using dirt on top of the input/output to create the chip. Some of the dirt started growing grass and when it did I would get the faulty number of outputs error. After clicking a couple of times or simply replacing the dirt, everything worked fine.
     
  15. Offline

    Malkierian

    @BigRenegade Dirt doesn't turn to grass on its own, you need adjacent grass. So apparently it wasn't as stone-lined as you thought.
     
  16. Offline

    Zirind

    Would there be a way to hook AM PM into the circuit? I know how to work the pixel side of it, but I'm not sure what would be neccessary other than that.

    Edit: Looking at the circuit docs a little closer, would this be possible with just another daytime chip with 1 output?
     
  17. Offline

    Malkierian

    Quite possibly (iirc, daytime hour would output 0 for 0-11 and 1 for 12-23). Worth a try. I'll look into the possibility of cutting down on the circtuitry, but that looks to be your best bet.
     
  18. Offline

    Zirind

    In testing, it does work. I just hooked up another daytime circuit (with the t-clock transmitter for a clock input) and gave it one output that transmits to my A/P . Just have to add 1 pixel circuit to the right leg of the A to receive it.
     
  19. Offline

    Malkierian

    Sweet.
     
  20. Offline

    larssonmc

    I have a problem with my clock. First it runs smoothly, but after a few minutes the lever on the 3rd minute is "broken" (the lever that's on the "g" or "7" on the third digit on the clock). It just drops to the ground and I have to go and fix it and a few minutes later it's on the ground again.

    If someone got/had the same problem and can help me, please do it as soon as possible :)
    Thanks.
     
  21. Offline

    Malkierian

    what material are you putting the lever on, and on what face of the block?
     
  22. Offline

    larssonmc

    iron same as the others. it's just that one that "drops"
     
  23. Offline

    Malkierian

    I don't know, try restarting with it on there? Or, look at that circuit with it on, type /rcbreak, make sure everything's ok, then activate the circuit again? I've noticed with my own before that sometimes the levers are loaded on the floor next to the blocks instead of on them, but I don't know of any fix except to remake them.

    As a temporary fix, you could probably put a block underneath each lever (if there isn't already).
     
  24. Offline

    BigRenegade

    Got my clock working just great now. But I have it set up just like a digital clock with the : between the hours and minutes and I wondered if it would be possible to make this : blink just like a digital clock. I'm fairly new to this type of chip use and have no idea how I would hook into the circuit to get it to do this.

    EDIT: Disregard stupid question. All I needed to do was tie into the t-clock transmitter with a pixel display for the blinking. Also got the am/pm working. I simply made a daytime circuit with a single input and a single output. Linked this to the hour t-clock transmitter. The output from it is off when it is AM and on when it is PM.
     
  25. Offline

    Malkierian

    You can just hook into the first clock (the 800 one) and tie in a flipflop which then hooks into a transmitter for the colon pixels.
     
  26. Offline

    Zirind

    For mine, I have an extra wool behind each colon with a lapis block between them behind the screen with a receiver straight from the t-clock transmitter.
     
  27. Offline

    meggawatts

    Great Library, built one of these bad boys today [​IMG]
     
  28. Offline

    larssonmc

    Ok, I tried /rcbreak and the circuit looked fine and I activated it again so I'll just have to wait and see :p

    Ok... now my ht-c to ht-f dropped to the floor instead :S If you got a few minutes later today you could come on my server and have a look at it? (if you haven't updated to 1.5 that is).

    And I tried to set everything as i should be, saved the server and restarted it, but when I came back on the lever was once again on the ground.
     
  29. Offline

    Zirind

    My clock seems to be reading an hour behind? lol.
     
  30. Offline

    tom

    Daylight savings :p
     
  31. Offline

    Zirind

    Would make perfect sense if my server hadn't reset back at daylight savings. But since it did, that doesn't.
     

Share This Page