Popular recipes tagged "digital"http://code.activestate.com/recipes/tags/digital/2013-07-17T17:40:18-07:00ActiveState Code RecipesA Simple Clock, Well Maybe Not That Simple... (Bash)
2013-07-17T17:40:18-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578610-a-simple-clock-well-maybe-not-that-simple/
<p style="color: grey">
Bash
recipe 578610
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/digital/">digital</a>, <a href="/recipes/tags/digits/">digits</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/large/">large</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/readout/">readout</a>, <a href="/recipes/tags/terminal/">terminal</a>).
</p>
<p>Hi all...</p>
<p>Do you remember this little snippet?</p>
<p><a href="http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147" rel="nofollow">http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147</a></p>
<p>Well it was voted down, but who cares? I surely don't!
So to those that voted this FUN piece of Python coding down, you are now about to see what
the aim was.</p>
<p>However although I have subsequently done what I said I would, that is, to create large digits
as an _at_a_glance_ digital readout for a project in Python I have decided not to upload it.
However I have decided to let this one go as a bash/shell script instead.</p>
<p>It is a nothing but a simple clock, well, maybe not that simple; but as I am into shell
stuff at the moment I thought I would share this with you.</p>
<p>The terminal does have its colours changed and the cursor disabled for the session but
I expect you big guns to be able to return back to normal in a jiffy.</p>
<p>I am an amateur coder and if that is easy for me then you pros should have no problems.</p>
<p>This code is not like most of my other stuff as is NOT Public Domain...</p>
<p>It is only a DEMO to see what an at a glance display would look like in a terminal.</p>
<p>Move away to a distance and see which of the two time readings you can still read... ;o)</p>
<p>It is for a Macbook Pro 13" OSX 10.7.5 and uses bash imode.
It will probably work on most Linux machines too but I haven't tested it...</p>
<p>This is purely a DEMO only and any other special effects, (e.g. flashing colon every second),
alram, etc, I have already experimented with and is easy enough to do...</p>
<p>My intention is to use this as a kids level text mode digital voltmeter I am doing.</p>
<p>Enjoy...</p>
<p>Bazza...</p>
Simple analogue anim and digital voltmeter with alarm DEMO... (Python)
2011-03-04T19:47:37-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577596-simple-analogue-anim-and-digital-voltmeter-with-al/
<p style="color: grey">
Python
recipe 577596
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/analogue/">analogue</a>, <a href="/recipes/tags/anim/">anim</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/digital/">digital</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/voltmeter/">voltmeter</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>I needed a simple standard Python analogue and digital display along with an overload beep when used as a
basic voltmeter.</p>
<p>Analogue readout, for quick glance.
Digital readout, for better accuracy.
Beep, to warn me of impending doom... ;o)</p>
<p>This was my starter code and works from Python 1.4.x to 2.7.x on MINIMUM platforms, AMIGA A1200, MS Windows ME
and Knoppix 5.1.1. It is a stand alone program and the easiest way to start it is to import it as though it is
a module.</p>
<p>(I DO have a Python 3.x.x version too and WILL be uploaded here in the future.)</p>
<p>Although this is a DEMO it did access, (home built), HW from various ports on differing platforms.</p>
<p>This module IS needed for it to work:-</p>
<p><a href="http://code.activestate.com/recipes/577588-clear-screen-and-beep-for-various-platforms/?in=lang-python" rel="nofollow">http://code.activestate.com/recipes/577588-clear-screen-and-beep-for-various-platforms/?in=lang-python</a></p>
<p>These simple HW access modes using standard Python code WILL be released in the future.</p>
<p>This DEMO is released as Public Domain and you may modify it as you please...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>73...</p>
<p>Bazza, G0LCU...</p>
<p>Team AMIGA...</p>