maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [in devel] LED pattern clock while on charger (https://talk.maemo.org/showthread.php?t=52967)

pH5 2010-06-19 09:34

Re: [in devel] LED pattern clock while on charger
 
Quote:

Originally Posted by blue_led (Post 720835)
i am very familiar with resistors color codes ( electric )

I like this, for me it'd serve more as a color code learning tool though :)

Quote:

Originally Posted by blue_led (Post 720835)
when keyboard is closed we can remap third engine . theoretically possible.

Wish we could rewrite MCE to do that, too.

RFS-81 2010-06-19 12:25

Re: [in devel] LED pattern clock while on charger
 
This one for 5min accuracy using three colours (e.g. white, blue, green).

White identifies the quarter of the clock face for hours, blue identifies the quarter of the clock face for minutes. Green identifies the "third" within the quarter (not needed when identifying hours 0,3,6,9).

W-G-G-B-G == 2:0..<5
W-G-G-B-G-G == 2:5..<10
W-W-G-G-B-B-B-B-G == 5:45..<50
W-W-G-G-B-B-B-B-G-G-G == 5:55..<6:00
W-W-B-B-G == 3:15..<20
W-W-W-W-G-G-B-B-B-B-G-G == 11:50..<55

Edit: or a more blip-economical version, eliminating the first quadrant blip from hours and the first "thirds" blip from minutes.

G-G-B == 2:0..<5
G-G-B-G == 2:5..<10
W-G-G-B-B-B-B == 5:45..<50
W-G-G-B-B-B-B-G-G == 5:55..<6:00
W-B-B == 3:15..<20
W-W-W-G-G-B-B-B-B-G == 11:50..<55

blue_led 2010-07-01 21:21

Re: [in devel] LED pattern clock while on charger
 
my wish come true. all color charging clock
the idea : keep led "white" and modify led currents as it is necessary a program for reading time , make modification in mce and this every minute.
a similar program can drive led currents

bellow is a simple script who drive leds according time . one color for digit as explained in http://talk.maemo.org/showpost.php?p...5&postcount=30

this is version v0. .. .0.1 :) . the script must run under root . dbus command ( bolded ) must be one line


prerequisites

Code:

PatternBatteryCharging=50;4;0;RgB;9d8040001600407fc000;9d804000160040ffc000

Code:

light()
{
echo $r > /sys/class/leds/lp5523:r/led_current
echo $g > /sys/class/leds/lp5523:g/led_current
echo $b > /sys/class/leds/lp5523:b/led_current
}
while [ 1 ];do
ore=$(date +%H)
minute=$(date +%M)
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:PatternBatteryCharging
r=0;g=0;b=0;light
for s in  $ore $minute ;do
b=$(expr $s % 10)
a=$(expr $(expr $s - $b) / 10)
for c in $a $b ;do
case $c in
0)r=0;g=0;b=0;light;;
1)r=16;g=1;b=0;light;;
2)r=20;g=0;b=0;light;;
3)r=20;g=4;b=0;light;;
4)r=20;g=13;b=0;light;;
5)r=0;g=15;b=0;light;;
6)r=0;g=0;b=15;light;;
7)r=15;g=0;b=10;light;;
8)r=2;g=1;b=1;light;;
9)r=15;g=15;b=14;light;;
esac
sleep 1
done;done;
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:PatternBatteryCharging
sleep 5;
done;done

LE: minor changes.

danielpublic 2010-10-12 00:41

Re: [in devel] LED pattern clock while on charger
 
Pretty shameless bump, but I like this one! I send a small thought of thank you, most nights to be honest. :)

rotoflex 2010-10-12 11:21

Re: [in devel] LED pattern clock while on charger
 
Quote:

Originally Posted by Patola (Post 669436)
So I think it's better just flash it that many times as hours in one color, then tens of minutes in other, then units of minutes in other. Like red-red-red-red blue-blue-blue yellow-yellow-yellow-yellow-yellow would be 4:35. Easy to read.

This looks the most practical to me.

However, as others express interest in different formats, it is plain that no one format will please everyone. Probably the best would be create an application with selectable options for different displays (this format, morse code, resistor color code, roman numeral, etc.)

Edit:
Whoops, I should look at the dates in the thread!

TiagoTiago 2010-10-12 12:33

Re: [in devel] LED pattern clock while on charger
 
Here are two ideas i got, they might not be as easy to ready, nor as blipconomical, but would be interesting to see:


Quote:

6 Digits total (hours, minutes and seconds, with zero padding where necessary)

Before each digit, a white blinking pattern, all white patterns have the same length, but blink a different amount of times (all lit for zero, and 5 blinks for fifth)

Each digit is represented as a hue, from red to violet, the rainbow scaled for the range of that digit (or optionally made absolute from 0 to 9 for all digits)


Or perhaps, give a noticeable blink in full red for hours, full green for minutes and full blue for seconds before the two digits of each.



the other one:
Quote:

Each digit pair is one of the color components, all played simultaneously and in synch.

For minutes and seconds, blink 0 to 9 times, equal durations for on and off, the amount of times it went on is how many 10s, if it's past *5s flip the on and off moments ( 180 degrees off phase i think)

For hours, blink 0 to 10 for the hours from midnight to 10 am, then for divide the on time into two faster blinks, with the same amount of off time, and blink 1 to 10 for for 11 am to 8 pm, now make the blink be 3 instead of two and do 1 to 3 for 9 pm to 11 pm
Edit: oh and since we're talking about geeks here:
Quote:

Get the number of seconds in a day, in binary

Split the binary digits into 3 equally sized groups (or as close to equal you can)

Give each group to one of the color components, and have them read the ones and zeros as on and off (with a user setable duration per bit) simultaneously and in synch

Optionally pause and repeat the reading after the first read to for confirmation.


edit: perhaps to make it easy to identify each individual bit when more than one 1 goes in sequence, briefly turn off the LED between each digit (also take that same time after a zero so all bits stay aligned)



All times are GMT. The time now is 10:40.

vBulletin® Version 3.8.8