maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Another LED pattern thread (https://talk.maemo.org/showthread.php?t=42201)

codeMonkey 2010-02-24 13:22

Re: Another LED pattern thread
 
Quote:

Originally Posted by mackan1 (Post 544212)
i missed out a 0.
u able to tell me how to add a longer pause in this.
also if you have the time to make it do 3 lost of flashing befor it pauses?

The second one should work.

Quote:

Originally Posted by pH5 (Post 544266)
Nice description. I'm a bit confused by the 0x01ff command used in the power down pattern to set full brightness. I'd expect that to be 0x40ff instead - do you happen to know what it is exactly that 0x01ff does differently?

01ff would incrementally decrease the brightness, rather than set it immediately, as per the wiki.

pH5 2010-02-24 13:47

Re: Another LED pattern thread
 
Quote:

Originally Posted by codeMonkey (Post 544287)
01ff would incrementally decrease the brightness, rather than set it immediately, as per the wiki.

But it doesn't. PatternPowerOff uses it, and the effect seems to be an immediate increase to full brightness.
The step time (bits 0x3e00) is zero, so maybe the prescale bit (0x4000) and the sign bit (0x0100) are just ignored and 0x40yy / 0x41yy / 0x01yy commands have the same effect?

codeMonkey 2010-02-24 13:56

Re: Another LED pattern thread
 
You're right. 00ff seems to do exactly the same thing.

If I'd had to guess 00ff should've increased immediately (in one step) and 01ff decreased immediately to obey the 'even is increase, odd is decrease' rule.

mackan1 2010-02-24 14:09

Re: Another LED pattern thread
 
Quote:

Originally Posted by codeMonkey (Post 544287)
The second one should work.



01ff would incrementally decrease the brightness, rather than set it immediately, as per the wiki.


woopee it did work, does it 3 times and around 4-5 sec pause and starts agen.

A police-siren style pattern, This pattern fades between red and blue x3 and pauses for 5sec's and starts agen
Code:

PatternCommunicationEmail=30;1;0;rB;9d8004ff05ffe004e10004ff05ffe004e10004ff05ffe004e10071080000;9d80e08004ff05ffe002e08004ff05ffe002e08004ff05ffe0020000
thanks for the help

blue_led 2010-02-24 15:08

Re: Another LED pattern thread
 
for 01ff code step time according my description is 0
i think all * step time 0 actually set brightness

* 40 , 41 , 00, 01
40, 41 mean prescale 1
41 ,01 mean down but, as i say, all have step time =0

it can be a hardware mechanism doing set brightness when bits5:1=0

making loops
command is a000 + 80 * times + start_loop_step_number
calculations are done in hexadecimal format
legal values :
start_loop_step_number = 0-15 decimal ( 0 - f hexa ) but 15 is stupid
times = 0 - 63 decimal ( 0 -3f hexa ) , 0 mean infinite loop

example of simple loops commands
a180 repeat 3 times from beginning ( step 0 )
a281 repeat 5 times from step 1

so acording to this "police with pause" will become

Code:

rB;9d8002ff03ffe004e100a1817f0b0000;9d80e08002ff03ffe0020000
a181 = repeat 3 times from step 1 ( 02ff )
notice: 1 step is always executed and 3 times loop will result 4 runs of pattern
7f0b = pause 5 sec

new commands not found in wiki

tip
very often we choose consecutive triggers like e004e100 or e080e002
they can be combined in one command only if they are consecutive
e004e100 become e104
e080e002 become e082

so the shortest "police" with 4 runs + 5 sec pause is
Code:

rB;9d8002ff03ffe104a1817f0b0000;9d80e08002ff03ffe0020000
enjoy :D

Playing more with loops
SOS pattern
Code:

R;9d80e104150fa101e104a104150fa104e104150fa1087f0b0000;9d80e08040ff140f4000e0020000

mackan1 2010-02-25 06:52

Re: Another LED pattern thread
 
How can i get this pattern to flash White + Blue (same as the one below but White not red)
and
also a pattern to flash Yellow + Blue (same as the one below but Yellow not red)

I have been at this for hours. so thought i should ask for some help befoe i trash my n900


A police-siren style pattern, This pattern fades between red and blue x3 and pauses for 5sec's and starts agen
Code:
Code:

PatternCommunicationEmail=30;1;0;rB;9d8004ff05ffe004e10004ff05ffe004e10004ff05ffe004e10071080000;9d80e08004ff05ffe002e08004ff05ffe002e08004ff05ffe0020000

blue_led 2010-02-25 08:10

Re: Another LED pattern thread
 
yellow - blue

Code:

rgB;9d8004ff05ffe104a10171080000;9d80e08004ff05ffe00020000
white - blue

Code:

rgB;9d80e00404ff05ffe100a10171080000;9d80e08004ff05ffa082e0020000

Lobi_Earl 2010-02-25 08:30

Re: Another LED pattern thread
 
yeah and I'm trying for hours to get a flashing pink and white or pink and light-blue....Could PLEASE anyone post that up for me, I can't get it managed.
I have only a normal pink led
if you neet the code i could post it have it copied from the first led thread.

Thank you

codeMonkey 2010-02-25 09:16

Re: Another LED pattern thread
 
Quote:

Originally Posted by blue_led (Post 544431)
new commands not found in wiki

making loops

Good work there!

F2thaK 2010-02-25 09:29

Re: Another LED pattern thread
 
this one is cool:

Cehteh's patterns with some comments
Same as PatternDeviceOn, but white:
(Slow dark glowing in white, never goes fully off, so you can locate the device in the dark: )

Code:

PatternBatteryFull=40;3;0;rgb;9d804001620863087f007f007f007f007f007f007f007f007f007f007f000000;9d800000
except id like it to slowly get to max brightness then fade again, rather than 1/2 brightness.. if someone could do this when they get a few minutes Id really appreciate it, Thanks!! :D ive got no idea


All times are GMT. The time now is 13:04.

vBulletin® Version 3.8.8