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)

IDis 2010-05-18 13:19

[in devel] LED pattern clock while on charger
 
LED clock

concept:
time display with LED. When the phone is on charge.

Why do you want?
when I go to sleep.I usually put my phone (N900) away from me.
because I can turn the alarm off in my sleep.
is convenient when you can see the time at a distance.

implementation
use Morse code (only idea morse code)
12 hour 57 minute
looks like this: -** -----****(*)** //- long signal LED * short signal LED (*)signal brighter //

does not look very comfortable.
offer a minute rounded up a dozen
that is
12 hour 57 minute = 1 hour (code: *)
4 hour 16 minute = 4 hour 20 minute (code: **** **)
9 hour 33 minute = 9 hour 30 minute (code: ****(*)**** ***)
12 hour 22 minute = 12 hour 20 minute (code: -* **)
3 hour 42 minute = 3 hour 40 minute (code: *** ****)

pelago 2010-05-18 13:23

Re: LED clock
 
I don't know about the Morse code thing, but have you seen flipclock? http://talk.maemo.org/showthread.php?t=32832

felbutss 2010-05-18 13:37

Re: LED clock
 
Quote:

Originally Posted by IDis (Post 664110)
LED clock

concept:
time display with LED. When the phone is on charge.

Why do you want?
when I go to sleep.I usually put my phone (N900) away from me.
because I can turn the alarm off in my sleep.
is convenient when you can see the time at a distance.

implementation
use Morse code (only idea morse code)
12 hour 57 minute
looks like this: -** -----****(*)** //- long signal LED * short signal LED (*)signal brighter //

does not look very comfortable.
offer a minute rounded up a dozen
that is
12 hour 57 minute = 1 hour (code: *)
4 hour 16 minute = 4 hour 20 minute (code: **** **)
9 hour 33 minute = 9 hour 30 minute (code: ****(*)**** ***)
12 hour 22 minute = 12 hour 20 minute (code: -* **)
3 hour 42 minute = 3 hour 40 minute (code: *** ****)







lol still would be cool

IDis 2010-05-18 13:39

Re: LED clock
 
The idea "LED clock" is that not coming to the phone to know the time.

LED clock use LED
http://s49.radikal.ru/i123/1005/75/f70c7c1254c2.jpg

pelago 2010-05-18 13:52

Re: LED clock
 
Ah I see what you mean. Interesting idea!

pH5 2010-05-18 13:55

Re: LED clock
 
It shouldn't be too hard to write a daemon that wakes up every minute to replace the PatternBatteryCharging LED pattern in /etc/mce.ini and to restart MCE.

It would be nice if there was a cleaner way to do this without writing to flash and restarting MCE all the time.

s15mos 2010-05-18 14:05

Re: LED clock
 
hows bout if u made something like espeak caller but instead make it play with the alarm and saying what time it is

zehjotkah 2010-05-18 14:06

Re: LED clock
 
I admire you, if you can count the lights and think which time it is based on the pattern in the night, directly after awaking.
I think I couldn't..
But nevertheless very cool and geeky idea. Shouldn't be that difficult.

IDis 2010-05-18 14:09

Re: LED clock
 
if LED is working.
let them work with benefit

Professional who use Morse code.
never not consider point and dash.
Use intuition

pH5 2010-05-18 20:32

Re: LED clock
 
It seems to work without restarting MCE all the time.
A proof of concept package uploaded to extras-devel: Charging LED Clock

swst 2010-05-19 13:51

Re: LED clock
 
I reckon this is a great idea, but the morse code seems a bit complicated.
I realise its not so accurate but I would be happy just knowing what hour it is, 3 flashes would be 3 am/pm ( i say pm cos i work nights too!)

Cheers
swst

F2thaK 2010-05-19 13:57

Re: LED clock
 
do it in 24 hr time.......... its 2400..... so 24 flashes

IDis 2010-05-19 16:39

Re: LED clock
 
excellent! Thanks! Very grateful to you

PS. how to restart LED Clock after reboot?

Several requests:
put a pause of 2 seconds between showing the time
allocate each 5 signal (brightness level or color)
Dozens little bit longer

Quote:

do it in 24 hr time.......... its 2400..... so 24 flashes
no 24 flashes
Only: 2 long flashes and 4short flashes.

pH5 2010-05-19 19:06

Re: LED clock
 
Quote:

Originally Posted by IDis (Post 666317)
how to restart LED Clock after reboot?

If you have rootsh installed, use "vi /etc/event.d/chledclk" to replace the "start on started mce" line with "start on started hildon-desktop". Or start it manually with "start chledclk".

Edit: This should be fixed in version 0.0.2-1.

Quote:

Originally Posted by IDis (Post 666317)
put a pause of 2 seconds between showing the time
allocate each 5 signal (brightness level or color)
Dozens little bit longer

The timing can be made configurable, but a brighter 5th flash would make some patterns too long to fit into a single engine (16 commands). For example, the 19:55h pattern right now would already be:
Code:

9d80 4000 087f 09ff 047f 05ff a404 11ff 047f 05ff a208 043f 057f 7105 0000

blue_led 2010-05-19 19:58

Re: LED clock
 
if only one color is needed read this
http://talk.maemo.org/showpost.php?p...6&postcount=99
because only 14 commands are available we can make ( at first sight ) 7 loops like this ( 23 : 55 )
0 >> 9d80
1 >> e104 call & wait second engine
2 >> repeat step 2 for x times ( a081 for 2 cycles)
3 >> 7f02 interdigits pause
4>> e104 call & wait second engine
5>> repeat step 4 for Y times ( a104 for 3 cycles second digit )
6 >> 7f02 interdigit pause
7 >> e104 call & wait second engine
8>> repeat step 7 for x times ( a207 for 5 cycles third digit )
9 >> 7f02 interdigits pause
10 >> e104 call & wait second engine
11 >> repeat step 10 for x times ( a20a for 5 cycles four digit)
12 >> 7f00 last digit pause
13 >> a28c cycle for more pause
14 empty :)
15 >> 0000 reset

the second engine

9d80
087f pulse up
097f pulse down
e082 trig & wait from engine 1
4000 just in case ....
0000
it is a lot of command available even for black steps

engine 1 jump to second engine steps are the same e104
branch command a000 + 80 * times + start_loop_step_number ( in hexa )

for morse code lovers ... SOS pattern
Code:

R;9d80e104150fa101e104a104150fa104e104150fa1087f0b0000;9d80e08040ff140f4000e0020000

chemist 2010-05-21 11:16

Re: [in devel] LED pattern clock while on charger
 
moved to Apps

The Morse code idea is lovely! Having it one at a time makes it 20 signals long plus 3 gaps.

What about binary/hex? For digit by digit you only need 4 times 4 signals. For a 12hour pattern you need 11 and for 24hour pattern 12, so having the 12/24h pattern is the shortest. For hex you could use Morse code, that would be just one pattern at a max of 10 flashes and one gap.

rash.m2k 2010-05-21 11:28

Re: [in devel] LED pattern clock while on charger
 
Not that I don't appreciate you guys trying to make this app - but I don't really see the point! Morse code is so long and you need to concentrate and count the dots/dashes!

A better idea would be to create and app that every 20minutes or so slowly increases the display brightness and shows the time then slowly disappears.

This way it's not disturbing, and doesn't require much concentration to see the time!

mannakiosk 2010-05-21 11:36

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

Originally Posted by rash.m2k (Post 669111)
Not that I don't appreciate you guys trying to make this app - but I don't really see the point! Morse code is so long and you need to concentrate and count the dots/dashes!

A better idea would be to create and app that every 20minutes or so slowly increases the display brightness and shows the time then slowly disappears.

This way it's not disturbing, and doesn't require much concentration to see the time!

But that might require me to stare into the darkness for close to 20 minutes in the middle of the night if I wake up and wonder what time it is.

Andrew_b 2010-05-21 11:45

Re: LED clock
 
Quote:

Originally Posted by swst (Post 666069)
I reckon this is a great idea, but the morse code seems a bit complicated.
I realise its not so accurate but I would be happy just knowing what hour it is, 3 flashes would be 3 am/pm ( i say pm cos i work nights too!)

Cheers
swst

I like this as a rough idea of the time. It is likely to be used in the small hours by the vast majority, so perhaps avoid 24hr clock, but the LED colour could be used to interpret this. Seriously, though. If you don't know already if it's am or pm right now, you need to get out more! The hours could be represented by long flashes, followed by either one, two, three or four short flashes to signify which quarter of the hour you're in e.g. flaaash, flaaash, flash, flash would mean between quarter past and half past two.

rash.m2k 2010-05-21 11:57

Re: LED clock
 
Quote:

Originally Posted by Andrew_b (Post 669130)
I like this as a rough idea of the time. It is likely to be used in the small hours by the vast majority, so perhaps avoid 24hr clock, but the LED colour could be used to interpret this. Seriously, though. If you don't know already if it's am or pm right now, you need to get out more! The hours could be represented by long flashes, followed by either one, two, three or four short flashes to signify which quarter of the hour you're in e.g. flaaash, flaaash, flash, flash would mean between quarter past and half past two.

This is probably a better idea! Morse code was a bad idea.

But using different colours to represent times would be better, in total we would need 4 different colors - (2^4 = 16 > 12) plus 2 colours for the minute hand.

We have blue, green, orange and white as four colours.

We can flash the four colours quickly - then pause for 1/2 second then flash two colours representing 15, 30, 45, 60.

Tuukka 2010-05-21 11:58

Re: [in devel] LED pattern clock while on charger
 
Instead of morse code you could change the brightness/color of the led depending of the time. In the evening the led could start to turn darker and in early morning it could start turning brighter again.
Usually you don't need to know exact time when you wake upp in the middle of the night, therefore an approximate time would suffice.

You could even add some gimmicks, when full moon the led could blink yellow from time to time or maybe it could blink according to the weather?

IDis 2010-05-21 11:58

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

A better idea would be to create and app that every 20minutes or so slowly increases the display brightness and shows the time then slowly disappears.
if you do not want to take the signals.
You can use different colors.

10 - long signals
5 - red light
2 - violet light
[white color] - separate hours and minutes

17:25 = 17:30 (long signals+ red light + violet light) is the hour [white color] (violet light + 1signal) minutes
19:37 = 19:40 (long signals+ red light + violet light+ violet light) is the hour + [white color] (violet light +violet light )minutes

pause between displaying the time 5 seconds (indicates charge level. yellow or green Color)

mannakiosk 2010-05-21 12:10

Re: [in devel] LED pattern clock while on charger
 
[Edit:] Dang, I thought I read the thread, but I didn't notice there was similar proposals all ready! [Edit2:] No, on second glance, the similar ideas appeared while I was slowly typing my first idea[/Edit2][/Edit]

Using 4 coulours and three blinks to convey the time at an accuracy of 15 minutes just popped into my head:

The first blink of one of four colours could represent a quadrant of the clock, a second blink of one of three the hour in that quadrant and a third blink could represent 0,15,30 or 45 minutes...

(First I had an other idea, that is not as straightforward, but I'll paste it below, just because I had all ready typed it: If this app will evolve to have loads of different options, one novel idea could be the "Colorful compass clock concept":

With 4 distinct colours, representing North, East, South and West, one could have the blinks indicating what time it is.

One "North" blink would be around 12 o'clock. Two blinks, for example North-East would be about 1:30. East-North-East would be ... around 2:15 (?). With four blinks, one would get an accuracy of 22.5 minutes, with 5 blinks, half that...

This would of course only ever require 2 colours at a time... )

KapCaveman 2010-05-21 12:29

Re: [in devel] LED pattern clock while on charger
 
So. one more idea for the pot. Roman LED

I=red=1
V=Yellow=5
X=Blue=10
L=White=50

all short blips

1 long blip White= hour/minute separator ( : )

example 4:56am
Roman IV:LVI

LED red,yellow,Long White,white,yellow,red.

fw190 2010-05-21 15:10

Re: [in devel] LED pattern clock while on charger
 
It would be nice to switch it on and off from the settings menu:)

Patola 2010-05-21 15:20

Re: [in devel] LED pattern clock while on charger
 
Why make it so complicated to read the hours?
Think, you will be sleepy. 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.

attila77 2010-05-21 15:27

Re: [in devel] LED pattern clock while on charger
 
Also consider backporting to N810. It had a WAY cooler led than the N900 (and also multicolour).

KapCaveman 2010-05-21 22:48

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

Originally Posted by Patola (Post 669436)
Why make it so complicated to read the hours.

Possibly, because we can, on a practical level this project is utterly useless to me personally, if i wake up in the middle of the night the amount of light coming through the window will allow me to approximate the time, if Ineed to get up for a particular time I will set an alarm.


This project raises some interesting questions though,

What is the most efficient way to display the time using only one multicolour LED?

What is the easiest way to understand the time using only a single LED?

If I was deaf. how could I set an alarm.

If I was blind, how could I tell the time. Etc Etc.

mannakiosk 2010-05-22 12:52

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

Originally Posted by Patola (Post 669436)
Why make it so complicated to read the hours?
Think, you will be sleepy. 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.

The concept of what you propose is easy for anyone to understand and could perhaps be easy to read for many people, but I'm sure I'd have a hard time concentrating on the number of flashes.

I'd still go with my three color coded flashes, even though the learning curve of reading them would be steeper.

Anyway, I'm sure customizing any kind of ... "protocol" for the led will be made relatively easy and everyone can have whatever they want.

What other useful information could the flashing and colour of the led be used for?

blue_led 2010-06-18 18:26

Re: [in devel] LED pattern clock while on charger
 
i am very familiar with resistors color codes ( electric )
so only four pulses are needed for showing the clock.
we have only 2 engines available for front led
the third engine is mapped to keyboard leds

but

when keyboard is closed we can remap third engine . theoretically possible.

resistor codes
black =0
brown=1
red=2
orange=3
yellow=4
green=5
blue=6
purple=7
gray=8
white=9

the code have some problems like brown, black and gray.
I thought to replace black with white short pulse and gray with double white short pulse.
brown ? hard to say
another combination . black double pulse( like " " :) ) , brown 1 short pulse , gray triple short pulse

ex:
23:44 >> red orange yellow yellow
18:52 >> (brown?), double pulse white, green, red
00:26 >> short pulse white , short pulse white , red , blue
( double white, double white , red, blue )

no need for hour - minute separator

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