Active Topics

 


Reply
Thread Tools
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#61
Fading siren pattern:
Code:
PatternCommunicationEmail=30;1;0;rB;9d8004ff05ffe004e1000000;9d80e08004ff05ffe0020000
@villo
The above should do it - to learn more about how it works please check the LED Patterns article in the wiki.

@f2thak
I've just noticed that someone's added a modified pattern for device power-on here on the Community-Made Patterns section of the LED Patterns wiki article.

Last edited by codeMonkey; 2010-02-22 at 15:52.
 

The Following User Says Thank You to codeMonkey For This Useful Post:
Posts: 29 | Thanked: 20 times | Joined on Feb 2010
#62
Originally Posted by blue_led View Post
@skalogre : every N900 user must be happy so here is the code
Code:
PatternBatteryCharging=50;4;0;rgB;9d804000e004481f331f7f007f000000;9d804000e080427f0d7f0000
This is so nice. I want to use it for my DeviceOn LED but slow it down, so it just pulsates every 2-3 seconds. How can I do that?
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#63
It depends which bit you want to slow down. If you want the speed of the led the same but add more of a gap before it flashes again you'll need a few more 7f00 steps at the end of both engine patterns before the 0000's.
 
Posts: 29 | Thanked: 20 times | Joined on Feb 2010
#64
nevermind, I think I figured it out... Unless there is a more elegant way than adding a few 7f00:

Code:
PatternDeviceOn=254;0;0;rgB;9d804000e004481f331f7f007f007f007f007f000000;9d804000e080427f0d7f0000
The added 3x 7f00 causes a delay between pulsations of about 1.5 secs. I don't know much about hex numbers so please let me know if there is a more efficient way to cause the LED to break. The N900 default message alerts have a few seconds break in between flashes, .... and I don't see a bunch of 7f00s lol...
 
Posts: 29 | Thanked: 20 times | Joined on Feb 2010
#65
yes that's what I wanted, the same pulsations just a longer break between. thanks codeMonkey for the confirmation that a bunch of 7f00 is the way to go.
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#66
The sms notifications and things use a 7108 instead.
Technically that should be used to decrease the brightness of an led - but since it's already out it does add an effective pause.
 

The Following User Says Thank You to codeMonkey For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#67
Originally Posted by codeMonkey View Post
Fading siren pattern:
Code:
PatternCommunicationEmail=30;1;0;rB;9d8004ff05ffe004e1000000;9d80e08004ff05ffe0020000
@f2thak
I've just noticed that someone's added a modified pattern for device power-on here on the Community-Made Patterns section of the LED Patterns wiki article.

thanks dude, any possiblitty you could do the fade on my white>blue version of this?? would really appreciate it

Last edited by F2thaK; 2010-02-23 at 12:01.
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#68
White and Blue with fading:
Code:
PatternCommunicationEmail=30;1;0;rgB;9d8004ff05ffe100;9d8004ff05ff04ff05ffe002
 

The Following User Says Thank You to codeMonkey For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#69
Originally Posted by codemonkey View Post
white and blue with fading:
Code:
patterncommunicationemail=30;1;0;rgb;9d8004ff05ffe100;9d8004ff05ff04ff05ffe002
thanks!!!!!!!!! :d
 
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#70
working with pauses and ramps

as you know command format is hexadecimal number xxyy where
xx is timer value and yy is steps of brightness

a little discussion on xx.

bit 76543210
=== 0PtttttD

legend: P prescale, ttttt steps, D direction

legal values are in range 02-7F ( 2 - 127 decimal ) bit7 always is 0
if xx is greater than 3F, mean bit6 ( P ) is set, then step time is 0.0156 s else step time is 0.00049 s
ttttt - bit5:1 value mean time quantum and range from 1 to 31 ( decimal ) so
when bit 6 is 0 we have the range 0.00049 - 0.01519 seconds per brigtness step
and when bit 6 is 1 we have thye range 0.0156 - 0.4836 seconds per brightness step
bit0 choose brightness change bit0=0 increase ; bit0=1 decrease
so if you want to insert pause wit NO brightness change maximum pause is 31 steps of 0.0156 s = 0.4836 s ( code 7f00 or 7e00 no matter what ), but we can do a little trick modifying brightness few steps, the eye can not discern this. change become visible after 2 steps because 00 step and 01 step mean both 1 step ( cycle ).
Pattern like this >>> rg;9d8040007f0040ff7f000000;9d800000 will flash orange ~1s period with 50% duty cycle instead rg;9d8040007f0240ff7e020000:9d800000 will flash ~2 seconds period.

ramps:
if you want to rise brightness from 0 to maximum ( 255 decimal , ff hexadecimal ) in 3 seconds you have 3/255 = ~0.01176 s per step . this is longer than prescale 1 step ( 0.0156 s ) so you must choose prescale 0 step and step time is 0.01176 / 0.00049 = ~24 decimal ( 11000 binary ) so code is
bit7=0 ( always)
bit6=0 ( prescale)
bit5=1
bit4=1
bit3=0
bit2=0
bit1=0
bit0=0 ( incremental )

put together timecode is 00110000 = 30 hexadecimal ( transform with calc changing binary to hexa ) and final cycle code is 30ff. decreasing is obtained with 31 code

fading with 9d80400030ff31ff0000 result breathing light with 6 sec period

don't choose brightness larger than 7f ( 128 ) because your eyes can't see difference and led will drain more battery power

a strange behavior i found. pattern like rg;9d804000307f317f0000;9d80000 result orange light but pattern rgB;9d804000307f317f0000;9d80000 will result true YELLOW color . strange because engine2 have no pattern.
so this add a new pattern to choose :TRUE YELLOW
Code:
PatternBatteryCharging=50;4;0;rgB;9d80400002ff03ff02ff03ff71080000;9d800000

Last edited by blue_led; 2010-02-23 at 22:50.
 

The Following 5 Users Say Thank You to blue_led For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:41.